Inventor General Discussion

Inventor General Discussion

Valued Contributor
Posts: 61
Registered: ‎01-25-2011
Message 1 of 3 (271 Views)
Accepted Solution

How to create a rule in iLogic?

271 Views, 2 Replies
04-18-2012 05:58 AM

Hi - Im setting up a standard steel plate template file and I was hoping someone could help me with iLogic (as I am useless with it!)


I want to create a rule that will warn the user when the plate thickness they are using is not standard.  I have already created a multivalue parameter for plate thickness, which lists all standard steel plate thickness's and also allows for custom values.


I was hoping I could create a rule that would prompt a dialogue box warning when the user creates a custom value for plate thickness.


I know this can be done,  but like I said,  Im bloody useless with iLogic and find it hard to come across relevent examples and/or tutorials online.


Thanks and advance and regards,



*Expert Elite*
Posts: 2,898
Registered: ‎03-08-2006
Message 2 of 3 (253 Views)

Re: How to create a rule in iLogic?

04-18-2012 10:39 AM in reply to: Infallable

Hi Infallable,


Here's a quick example (and sample file) that compares a user input value to the MultiValue.List parameter value and informs the user if the input is not in the list.


I hope this helps.
Best of luck to you in all of your Inventor pursuits,



'get the Inventor user name from the Inventor Options
oName= ThisApplication.GeneralOptions.UserName

'define an arraylist to hold the list of thicknesses
Dim values As New ArrayList()

'set the list of thickness to the array list
values = MultiValue.List("Edge_Thickness")

'prompt the user for input
oUserInput = InputBox("Enter a thickness", "Current Thickness = " & Edge_Thickness, Edge_Thickness)

'check to see if the Thickness arraylist contains the value input by the user
If Not values.Contains(oUserInput) Then
            MessageBox.Show("Hello " & oName & ", this is a custom thickness.", "iLogic")   
End If

'set the model parameter to use the input value
Edge_Thickness = oUserInput 

'update the model
iLogicVb.UpdateWhenDone = True
'zoom all




  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.

Valued Contributor
Posts: 61
Registered: ‎01-25-2011
Message 3 of 3 (233 Views)

Re: How to create a rule in iLogic?

04-19-2012 04:22 AM in reply to: Curtis_Waguespack

This is Excellent!  Thank you for the response - This has completely answered my question and more.


Thanks and regards,



Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.