- Code: Select all
flatPanel = ent.add_group
fp_face = flatPanel.entities.add_face (@pt)
fp_face.pushpull(-fp_T)
component_instance = flatPanel.to_component
component_instance.definition.name = ("FlatPanel")
component_instance.layer = "NewPanel"
def_Panel = component_instance.definition
UI.messagebox("Panel Definition Name " + def_Panel.to_s + "component_instance " + component_instance.to_s )
component_instance.erase!
def_Panel.clear!
I create this panel and can delete the instance but the cannot delete the definition. The message box shows values for both the instance and definition. Run fails with error " Cannot determine parent of entity" When I comment out the last line the code runs and deletes the component instance.
Keith