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?
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).
Simply pass the handle to the feature to the desired method.
Get the features name. Then get the models 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 models modelitem (or feature) to a DRAWING LAYER ? In interactive mode it is done by user selection. I dont know if this works with the APIs.