Inventor Ilogic multiple selection window

Inventor Ilogic multiple selection window

Anonymous
Not applicable
1,905 Views
4 Replies
Message 1 of 5

Inventor Ilogic multiple selection window

Anonymous
Not applicable

I am wanting some help creating an Ilogic rule to allow me to pick multiple selections and select "OK" once and having the popup window close upon selecting "OK". 

 

I currenly am required to pick my selection and press okay individually for each selection and am required to press the X to have the code work each selection.

 

below is a snip of my current selection window and the code that completes it.

 

What I want to be able to do is have a multiple selection (yes/no) selection for each selection within 1 window.

see the microsoft paint visual of what I am wanting. 

 

amelhus_0-1617299605731.png

amelhus_1-1617300124943.png

 

Dim oTypes_Array As New ArrayList 
oTypes_Array.Add("SELECTION 1")
oTypes_Array.Add("SELECTION 2")
oTypes_Array.Add("SELECTION 3")
oTypes_Array.Add("SELECTION 4")
oTypes_Array.Add("SELECTION 5")
oTypes_Array.Add("SELECTION 6")
oTypes_Array.Add("SELECTION 7")
oTypes_Array.Add("SELECTION 8")
Dim oSelected As New ArrayList  

While True 
	oTypes_Selected = InputListBox("SELECT TYPE:", oTypes_Array, oTypes_Array(0), oRuleNo, X_oProp_Array)
	If IsNothing (oTypes_Selected) Then Exit While 
	oSelected.Add(oTypes_Selected)	
End While 

	For Each oText In oSelected
		
	
 MessageBox.Show(oText, "Selected items")
		
	Next

 

0 Likes
1,906 Views
4 Replies
Replies (4)
Message 2 of 5

A.Acheson
Mentor
Mentor

@Anonymous 

 

You may be able to do this with an iLogic form and boolean(true/false) parameter. But this will involve  having more parameters in your file and not in your code. 

 

The input box is pretty basic in ilogic you would need to do everything in a linear method with yes/no after each single selection in the input box . So not an ideal way to do it.

 

You would need to create a VBA form and  or windows form through vb.net to do the setup as you needed. 

If you want to move this post over to the customization forum more experience user would have more input. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 5

Anonymous
Not applicable

@A.Acheson 

 

I want to avoid needing to input anything within the file and keep this entirely external. I would assume there is a way to create stand alone boolean variables within the logic itself. But I am far from good at coding or programming to be able to understand how that would work from base 0. (if you can consider what I do programming)

 

I also figured I would need to extend beyond the Ilogic sphere and explore the base VBA coding to fully encompass my base inquiry. I just didn't know where to go, and google was only getting me so far.

 

Do I just include a tag "customization" on my post to get it over to that forum? 

 

Thank you for giving me a hand!

0 Likes
Message 4 of 5

A.Acheson
Mentor
Mentor

@Anonymous 

I am probably in the same boat as you so. My Knowledge could  be more described as hacking more than anything else lol. If you google VBA forms and search excel VBA Tutorial in Form creation  before you bring it in to Inventor VBA Editor. 

@johnsonshiue  Should be able to switch it over to the customization forum when he gets a chance. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 5 of 5

WCrihfield
Mentor
Mentor

Hi @Anonymous.  There is a way to do it all in one iLogic rule, without needing to create separate iLogic Form/VBA UserForm, but it would require a lot more code than you may be comfortable with.  I have created some iLogic rules before that included:  creating its own Windows Form, setting its content (seen and unseen), and specifies what to do when things happen to the form.   I haven't created one like you are talking about yet, but it certainly sounds doable.  Here is a link to one of my contribution posts that 'attempts' to show you how to make your own Windows Form within an iLogic rule.

However, if that sounds like too much complication and code, I'm thinking the next easiest way to make it happen is with the VBA Userform as @A.Acheson suggested.  They aren't nearly as simple to create & use as an iLogic form, but the iLogic form simply lacks the needed functionality to be able to supply it all the options without creating a bunch of local iProperties or Parameters.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes