Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Text Format & Size options - MessageBox, InputBox, InputListBox & InputRadioBox

Text Format & Size options - MessageBox, InputBox, InputListBox & InputRadioBox

It would be so helpful if we had access to more options for the Text Format & Text Size when calling a MessageBox, InputBox, InputListBox, or InputRadioBox, in iLogic, without having to use an iLocig "Form".  Or if there was just an additional version of a MessageBox that had these options available (for example one called "FormatableBox", or "InfoBox").

These options could be set in which ever way is easiest to get implemented.  There could be a Default Text Format & Default Text Size for MessageBoxes (and other message types) in the iLogic Configuration, Application Options, or someplace similar.  We could either modify the Default format & text size or specify temporary values for them on seperate lines in the rule just before we call the MessageBox.  We could specify these within the (), either before, or after the message or title.  You might be able to add another option besides ".Show" after MessageBox., like "MessageBox.DefaultTextSize(12)" or "MessageBox.DefaultTextSize = 12" if you wanted to set it to 12.

 

It would also be nice to be able to specify the physical size of the box,  But by default, if you don't specify a size, it just attemts to autoresize to fit the text, like normal.

Right now, sometimes the "Title" can be longer than the "Message", and you can't see the whole tite.  And since you can't even resize the MessageBox with your mouse pointer after it is on your screen, you can't read what the designer is telling you, which can cause problems.

 

5 Comments
WCrihfield
Mentor

I probably haven't revisited this Idea since posting it, due to lack of others commenting about it, but I now realize it needs an update.  At the time of posting this Idea, not coming from a professional computer/software programming background, I assumed that all of those user interaction tools mentioned were created within the iLogic system of Inventor.  I quickly realized that was not entirely true.  The MessageBox tool is defined within the VB.NET coding language, under the System.Windows.Forms hierarchy, so Inventor's iLogic Add-in doesn't likely have much control over it's design and functionality, other than maybe making it easier to create by providing some quick snippets of code that can be dropped into your rules, and a Wizard tool (in the iLogic Rule Editor dialog) to help users create them.  The InputBox tool seems to have also been defined within the VB.NET coding language, under the Microsoft.VisualBasic.Interaction hierarchy (same hierarchy as the MsgBox tool that I use heavily), so the iLogic Add-in likely doesn't have much control over its design or functionality either.

 

However, I never found any other references/uses of the InputListBox tool, or the InputRadioBox tool outside of Inventor's iLogic, so Autodesk may have more control over them, and hopefully something can still be implemented there that might allow us more control over its various text, formatting, & size aspects.

jbwaiteG7526
Participant

I have also found a need to be able to re-size a message box such as the InputListBox. I am using in a sheet metal part to allow input of a material selection that is then used in our in-house material planning software. I have tried to make the title descriptive as to what the drop down list is for but if it is much at all the title is just cut off. I HAVE been able to re-size the box using the mouse but that is NOT professional when the user has to adjust the box size to find out what's in it.
I feel it is a failure on the part of Inventor to provide a tool and not the control over it. 4 optional parameter passed to the method would allow the size of the box and the position to be defined. That would make it a very usefull feature.
It is also a failure in VB.net if a platform is used for development of interfaces and DOES NOT give an easy method for defining the graphical feature

StuartRoodt
Contributor

I've had the same issue and found that the InputListBox can adjust its width according to either the ListName or Title length, using whichever is longer.

 

Because ListName is not referenced anywhere else, you're able to safely pad the text with spaces to set the default width of your InputListBox (see ListName below):

 

 

 

'User selection for titleblock
oSelectedTitleBlock = InputListBox("",TitleList, TitleList.Item(0), Title := iLogicVb.RuleName, ListName := "Titleblock options:                               ")

 

 

 

I agree though, the fact that the InputListBox does not automatically adjust its width is frustrating. 

WCrihfield
Mentor

After being notified about the last comment by @StuartRoodt, I had another look at this post.  I had actually found some other related resources since my last response back in 2021, that folks here might find useful.  These resources I found are related to those last two message types (InputListBox & InputRadioBox) that I mentioned might be controlled at least partially by Autodesk and their iLogic system.  When in the iLogic Rule Editor environment, you can type the following lines of code on new lines to get a reference to the object Types being used/created by Autodesk (behind the scenes) when those two tools are used.  As expected, they are simply custom variations of the System.Windows.Forms.Form Object, which have been formatted to suit their specific needs.

For the InputRadioBox tool:

Dim oIRB As Form = New Autodesk.iLogic.Runtime.GenericRadioButtonBox("Title", "Prompt", "Button1", "Button2", True)
oIRB.Show

The result of this simple code above does not yet look exactly the same as what you get from using InputRadioBox, but is pretty close.  I imagine they have some additional formatting applied to this Form when it is created with that specific iLogic shortcut snippet.

For the InputListBox tool:

Dim oOptions As New List(Of String) From {"Option 1", "Option 2", "Option 3"}
Dim oILB As Form = New Autodesk.iLogic.Runtime.InputListBoxDialog("Title", "ListName", "Instructions", oOptions, oOptions.Item(0), 6, 6)
oILB.Show

This one looks a little bit closer to the same results, but does not fully function the same yet.  Again, I would assume that there is likely a block of code somewhere that gets ran when you use this iLogic shortcut snippet, which further formats & adds to its functionalities.

 

Then of course, you have a regular System.Windows.Forms.Form object, with all if its tons of available tools (properties, methods, & events) that you can customize the way you want them before showing the form.  At this point it can get so detailed/complicated that it may go over some folks heads, but at least the pathway to more control is there, if you should choose to take advantage of it.

 

JBerns
Advisor

I too would favor a custom iLogic message box that would offer more control of formatting.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report