Skip to main content
1-Visitor
May 22, 2018
Solved

Delete components in jlink

  • May 22, 2018
  • 2 replies
  • 4999 views

Hello

I need to delete some components in an assembly with jlink. I noticed the method Model.Delete() but when i use it nothing seems to be deleted.

I havent seen any examples with this method call.

 

Thank you

Regards  

Best answer by sjuraj

Model.Delete() cause to remove model from session and disk. To remove model from assembly you need to consider the model as feature (ComponentFeat). You then need to perform component operation on this feature. To remove feature you need to create delete ops and then executre the ops. 

 

pfcSolid.Solid.ExecuteFeatureOps

pfcFeature.Feature.CreateDeleteOp

 

2 replies

RPN
18-Opal
May 22, 2018

A component is a feature!

vjoer1-VisitorAuthor
1-Visitor
September 4, 2018

Hello

 

Does this mean that a part can be deleted or not?

 

Thank you

Regards

RPN
18-Opal
September 6, 2018

JLink Doc

The important J-Link functions for assemblies are those that operate on the components of an assembly. The object ComponentFeat, which is an instance of Feature is defined for that purpose. Each assembly component is treated as a variety of feature, and the integer identifier of the component is also the feature identifier.

 

Regarding your question, you delete a feature, this will delete a member. After this operation you may able to delete the model, if you do not have other dependencies related to the model in session.

sjuraj15-MoonstoneAnswer
15-Moonstone
October 10, 2018

Model.Delete() cause to remove model from session and disk. To remove model from assembly you need to consider the model as feature (ComponentFeat). You then need to perform component operation on this feature. To remove feature you need to create delete ops and then executre the ops. 

 

pfcSolid.Solid.ExecuteFeatureOps

pfcFeature.Feature.CreateDeleteOp

 

vjoer1-VisitorAuthor
1-Visitor
October 25, 2018

Hello

 

When I try to manually delete a part in Creo, I get a window with all children part the reference the current part. I can choose to Fix, Suppress, or Delete the child part.  

When I try to delete the part via JLink,  I dont know how to choose the FIX option for the Child/referencing parts and the references mess up. I end up with a traceback and Creo shuts down.

Can you indicate how can I remove the part in Jlink without affecting the other child parts?

 

Thank you

Regards