Multiple Inputs on iLogic

Multiple Inputs on iLogic

felix.cortes5K3Y2
Advocate Advocate
1,839 Views
3 Replies
Message 1 of 4

Multiple Inputs on iLogic

felix.cortes5K3Y2
Advocate
Advocate

Hi forum,

 

I'm looking for a command compatible in iLogic similar to the Forms that provides an input box with multiple lines on the same window. 

 

Here's the functions that I am aware of, but doesn't fit the application.

iLogicForm.Show("Form")

InputBox("Description", "Title", "Prefix")

 

I cannot use forms because the assemblies do not have the parameters established. It's under my understanding that forms need parameters on the file so that would not work for me.

 

Ideally, I want to use InputBox; that one works absolutely fantastic. However, on that dialog box I can only input one line at a time. Is there a way to use InputBox that would display more than one line to input?

 

Thanks,

Felix Cortes

0 Likes
1,840 Views
3 Replies
Replies (3)
Message 2 of 4

philip1009
Advisor
Advisor

You can put the same parameters in assemblies just like in part files.  And no, unless it's a hidden function I'm not aware of, there's no Input Box that supports multiple lines.

 

What's the purpose of your multi-line text parameter?  I'm just curious in case there's another solution we could come up with.

 

Also, for future reference, iLogic questions are better suited for the Inventor Customization forum, you'll get better and faster help, the regular forum is more for general questions and issues with the main Inventor software.

0 Likes
Message 3 of 4

felix.cortes5K3Y2
Advocate
Advocate

Hi Phillip,

 

I'm coming up with a code that creates drawings from existing ones with certain updated properties on them that are only text. Now, I need this code in several assemblies and was hoping to copy and paste the code for different assemblies without having to add Text Parameters in each one and that's why I really liked the InputBox function.

 

Also, thanks for the tip about the forum. Will definitely do so in the future.

0 Likes
Message 4 of 4

philip1009
Advisor
Advisor

If you want, you can put some code at the beginning of your rule to check if a parameter with a certain name exists in the current document, and if no parameter with that name exists, create it:

 

blnParamCheck = False
colUserParams = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters
For Each objUserParam As UserParameter In colUserParams
	If objUserParam.Name = "PARAMETER_NAME" Then blnParamCheck = True
Next
If blnParamCheck = False Then colUserParams.AddByValue("PARAMETER_NAME", "", kTextUnits)

After double checking, the Input Box function and no other Input function provided by iLogic allows for multiple lines of text, just a really long single line.  If each line has a specific purpose, you could have multiple text parameters, but I'm not sure of the amount you'll have to go through.

 

I'd say you'll just have to bite the bullet and paste that code and form (unless it's a global form and rule) in every assembly.

 

Good Luck, hopefully others will have more suggestions.