- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
All,
Good morning! I used this post here to extract all the commands from Inventor and I'm trying to figure out how to edit a BIM Connector via iLogic. The command I found is the following:
AEC_Exchange:Command:Connector:Edit :: Edit Connector
Unfortunately, I don't know how to execute it. I use the code sequence below and it throws an error, I suspect because it does not recognize the feature name (the problem line is in the 3rd line from the bottom of the second box of code). If anyone can provide some examples or point me in the correct direction, as to how to edit a BIM connector via iLogic, I would really appreciate it. Thanks in advance for any assistance, hope all is well and have a most blessed day!
Peace,
Pete
' Get the CommandManager object. Dim oCommandMgr As CommandManager oCommandMgr = ThisApplication.CommandManager ' Get the collection of control definitions. Dim oControlDefs As ControlDefinitions oControlDefs = oCommandMgr.ControlDefinitions 'Define the individual control definition to launch a command. (We'll use this to edit BIM Connectors later) Dim oControlDef As ControlDefinition
'Index the Electrical Counter Elec_Count = Elec_Count + 1 'Create Electrical Connector Definition Dim oElecConn As BIMElectricalConnectorDefinition oElecConn = oPartDocBIM.Connectors.CreateElectricalConnectorDefinition(Elec_Coll) oElecConn.SystemType = BIMElectricalSystemTypeEnum.kPowerBalancedElectricalSystemType 'Add the Electrical BIM Connection oPartDocBIM.Connectors.Add(oElecConn) 'Change the name of the Electrical Connector 'The ".Parent" portion accesses the higher level BIMConnector object, where the name can be changed oElecConn.Parent.Name = "Elec_Conn_" & Elec_Count 'Open and edit the new Electrical BIM Connector oControlDef = oCommandMgr.ControlDefinitions.Item("AEC_Exchange:Command:Connector:Edit(oElecConn.Parent.Name)") ' Execute the command. Call oControlDef.Execute
Please give a kudos if helpful and mark as a solution if somehow I got it right.
Solved! Go to Solution.