- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I'm just getting into iLogic and I figured I'd try making a rule for setting the length for DIN rails. What I would like to do is make it so I can select a rail and have it prompt me to specify the length. I have the part for specifying the length working just fine.
iLogicVb.UpdateWhenDone = True Parameter("DIN Rail:1", "Rail_Length") = InputBox("Set DIN Rail Length")
What I am having trouble is finding out how to return the component/document name of the selected item so that I can use a variable in place of "DIN Rail:1". I'm familiar with VBA, I've been using it in Excel and Visio for years, it's just a matter of finding the appropriate properties and methods to accomplish certain things.
Dim oDIN As ICadComponent '?????? oDIN = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartBodyFilter, "Select a DIN Rail")
I know how to pick the part, but I'm not sure what type of object to set the oDIN variable as to be able to return a name. I've tried various things and not had much luck. I even opened the Inventor library in Excel and tried using the object browser to see if I could trace a component name through parents and I wasn't having much luck there either.
Any help you can provide would be greatly appreciated.
Solved! Go to Solution.