Autodesk Inventor - New to iLogic? Start here!

Zen Admin
Zen Admin
  • Updated

By Clint Brown

If you are new to iLogic and want to start getting into how it works, give this a try as your first bit of code.

We are going to try create a rule that will create a message box showing the mass of the part or Assembly file we are in. To do this, follow this workflow:

Show your iLogic Browser (Manage Tab, iLogic Browser)

Create a new rule, this can be done by right clicking on the part/assembly at the top of the iLogic Browser, or click on "Add Rule" on the Manage tab

Copy and paste the code below into the new rule window, click OK

 

'Start of iLogic code
MessageBox.Show(iProperties.Mass, "Mass of Model in Kilograms")
'End of iLogic Code




Try this with Volume and Area too (see some code below)

MessageBox.Show(iProperties.Volume, "Volume of Model centimetere Cubed")
MessageBox.Show(iProperties.Area, "Area in centimeters squared")

Enjoy!

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.