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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

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

sbots
10-Marble

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1

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


Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags