Community
Hey All
I try to make a iLogic code that takes value from a loop, and adds this to a aarylist.
My problem is to get the value when I have selected a loop, with Measure tool.
Some who can help me?
Dim app As Inventor.Application app = ThisApplication Dim LoopList As New ArrayList 'Set RUsure frist time RUsure = vbYes While RUsure = vbYes Dim oControlDef As ControlDefinition oControlDef = app.CommandManager.ControlDefinitions.Item("AppMeasureLoopCmd") oControlDef.Execute2 (True) 'Add loop length top Arrylist 'Add the lengt from measure tool to LoopList RUsure = MessageBox.Show("Will you ad more loop´s to custom iProperty", "Loop Length", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If RUsure = vbNo Exit While End If End While 'Get total loop lengt LoopValues = LoopList sum = 0 For Each oval in LoopValues sum += oval Next MsgBox(sum)
Solved! Go to Solution.
I do not have an example for it's usage but there is a method for MeasureTools.GetLoopLength check the VBA object browser or API documentation for more information.
Hey Ken
Thanks for the info about Measure Tools.GetLoopLength!
It works great!
To pick the sketch path I found this:
Can't find what you're looking for? Ask the community or share your knowledge.