Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic Rule to measure loop length

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
st3v3
2115 Views, 3 Replies

Ilogic Rule to measure loop length

I’m looking for some help if possible

i have just started to use illogic, what i want to do is measure the length of a loop in a sketch and then use this measurement as a parameter.

I have found this rule that will measure the loop length and dispaly it in a message box

Dim se As SketchEntity = ThisDoc.Document.ComponentDefinition.Sketches(1).SketchLines(1) 

MsgBox(ThisApplication.MeasureTools.GetLoopLength(se)*10 & " mm") 

 

but i do not know how to capture the measurement as a parameter

 

Thanks in advance

 

Steve

 

 

3 REPLIES 3
Message 2 of 4
eljoseppo
in reply to: st3v3

there is a way around to do this:

 

Parameter("Length")= ThisDoc.Document.ComponentDefinition.Sketches.Item(1).Profiles.Item(1).RegionProperties.Perimeter * 10

 But to make a region you have to extrude your first sketch. Then you will have acces to this parameter (perimeter 😉 )

 

 

Message 3 of 4
st3v3
in reply to: eljoseppo

Thank you vey much, works a trerat

Message 4 of 4
eljoseppo
in reply to: st3v3

just accept a solution and give me kudo 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report