cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add features to a layer in J Link?

Participant

How do I add features to a layer in J Link?

Is it possible to add features to layers using J Link in Creo 1? I see where I can add a ModelItem and that works fine for some things but how do I add something like a datum plane to a layer? The documentation says that you cannot add several model item types to a layer including coordinate system and axis. I am trying to add datum planes to a datum plane layer, coordinate systems to a coordinate system plane...



Does anyone have any experience doing this or ideas?



Thank you,


Scott

1 REPLY 1

How do I add features to a layer in J Link?

Usually in the pfc APIs for Pro/E and Creo the class for features is a
“subclass” of items. So in a lot of cases you can simply pass the handle to
a feature where (regarding to the documentation) an item has to be used.
When placing features to a layer it is different to adding items to the
layers. This is shown by different symbols in the layer tree (when
expanding the layer in the tree).



Method 1:

Simply pass the handle to the feature to the desired method.



Method 2:

Get the feature’s name. Then get the model’s modelitem that has the same
name as the feature (ModelItemOwner.GetItemByName()). Add the item to the
layer.



The only thing I am not sure of:

Is it possible to add a model’s modelitem (or feature) to a DRAWING LAYER ?
In interactive mode it is done by user selection. I don’t know if this works
with the APIs.





Andreas