Create a Dropdown Menu in iLogic Form

Create a Dropdown Menu in iLogic Form

Anonymous
Not applicable
3,855 Views
7 Replies
Message 1 of 8

Create a Dropdown Menu in iLogic Form

Anonymous
Not applicable

Hello everyone.

To begin, I am not very savvy in the iLogic department so please bare with me.  I have created an iLogic form that I use to create Certification drawings with.  Essentially, I punch in the information (tool number, project number, part name, capacity, etc.) into the form and it populates my text in the desired locations.  Very convenient as I have multiple spots where the same information is required (tool number for example).  I would like to take this a step further and have a drop down menu where I can select the bolt size (imperial) as well as the corresponding tap size.  As it stands now, I have to look up the bolt/thread size and enter these values manually.  Eventually I would also like to have it select the corresponding torque value based on a bolt suppliers recommended torque value.

Can someone point me in the right direction of how to achieve this?  Perhaps even a simple iLogic code in which I can use to get started?  If you require any additional information, please ask as I will be following this thread closely.  I have attached an image of my current form so you can get an idea of what I am currently using.  The "Diameter of Bolts" is where I would like to have the dropdown menu which will also populate the Torque value.

 

Thank you in advance.


  GSE Form.jpg

0 Likes
Accepted solutions (1)
3,856 Views
7 Replies
Replies (7)
Message 2 of 8

mcgyvr
Consultant
Consultant

Where do you want the data to be pulled from?

Just written into the ilogic? Excel? csv?

Will this data be used as a parameter that changes the model?

Must the values in one list change the values in another? (aka... 2 dropdowns with car brand and model would Jeep selection in the first only allow Wrangler, Renegade,etc.. in the other?)

 

 

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 3 of 8

Anonymous
Not applicable

Where do you want the data to be pulled from?  Just written into the ilogic? Excel? csv?  Excel or iLogic would be ideal. I can manually enter the information and use that as the Drop Down selection.

Will this data be used as a parameter that changes the model? No.  The models I use for the drawings are typically client supplied and have no information.  Most often the model does not change unless the FEA indicates a problem.

Must the values in one list change the values in another? (aka... 2 dropdowns with car brand and model would Jeep selection in the first only allow Wrangler, Renegade,etc.. in the other?) Yes.  If I select a 1"-8 NC bolt from the drop down menu, I would like the torque value to automatically change based on this selection.  If this is not feasible, another drop down menu would be ideal.

0 Likes
Message 4 of 8

Curtis_Waguespack
Consultant
Consultant

Hi GSE_Dan_A,

 

If  understand correctly something like this would work. See attached 2017 file.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

 

MultiValue.SetList("Bolt_Diameter", _
"3/4" & Chr(34) & "-10", _
"7/8" & Chr(34) & "-9", _
"1" & Chr(34) & "-8")

If Bolt_Diameter = "3/4" & Chr(34) & "-10" Then
	Torque = 111 
Else If Bolt_Diameter = "7/8" & Chr(34) & "-9" Then
	Torque = 222
Else If Bolt_Diameter = "1" & Chr(34) & "-8" Then
	Torque = 333
End If

EESignature

Message 5 of 8

Anonymous
Not applicable

This is excellent Curtis! Thank you! I have fumbled through it and have got the form to work as required.  My only issue now is that when I enter the information, the text is not populated to my drawing.  I was using Custom drawing iproperties to achieve this.  Is there another ilogic part I am missing?

0 Likes
Message 6 of 8

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi GSE_Dan_A,

 

It depends on how the iprops are linked to the drawing, but in the attached example the title block and notes are looking at the custom iprops, and the code sets those iprops to be the same as the parameter value.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

'set the list
MultiValue.SetList("Bolt_Diameter", _
"3/4" & Chr(34) & "-10", _
"7/8" & Chr(34) & "-9", _
"1" & Chr(34) & "-8")

'set the parameters based on selection
If Bolt_Diameter = "3/4" & Chr(34) & "-10" Then
	Torque = 111 
Else If Bolt_Diameter = "7/8" & Chr(34) & "-9" Then
	Torque = 222
Else If Bolt_Diameter = "1" & Chr(34) & "-8" Then
	Torque = 333
End If

'update iprops
iProperties.Value("Custom", "Bolt_Diameter") = Bolt_Diameter
iProperties.Value("Custom", "Torque") = Torque

'update the drawing/title block 
'this line might not be required, but it doesn't hurt
InventorVb.DocumentUpdate()

EESignature

Message 7 of 8

Anonymous
Not applicable

You the man! Thank you very much! This worked like a charm!

Message 8 of 8

bsnyderACLUW
Enthusiast
Enthusiast

Hi ,

 

I am trying to fiddle around with what you have posted here but i am having trouble making the trailing drop down menu dependent of the previous menu. How Should I go about this?

 

Thank you,

 

0 Likes