ui->InputBox ??

ui->InputBox ??

RogerInHawaii
Collaborator Collaborator
1,239 Views
2 Replies
Message 1 of 3

ui->InputBox ??

RogerInHawaii
Collaborator
Collaborator

I THINK that I need to use the ui->inputBox for what I want to do but I can't find anything that really explains it.

I want my C++ script to bring up a dialog in which the user can select from among a set of operations that can be done.

If I were writing a C++ program using the windows interface I'd design a dialog with several radio buttons, one for each of the operations I might want to be able to perform. Something like this:

0  Make tank # 1 invisible

0  Move support #3 into it deployed position.

0  Move support #3 into its retracted position

0 Rotate Box #7


OK

 

and so forth.

 

With that dialog up I could then click on the operation I want to have performed, click the OK button, and the data I'd get back from the dialog would tell me which operation had been chosen.

But in a C++ Fusion script I have no clue how to go about doing that. I see that there's a simple ui->inputBox() but all the examples I find for that are extremely simple, like just getting some text back from the box. How can I do something more along the lines of what I have in mind, selecting from a set of radio buttons. Or is there some other preferred method for doing accomplishing this?

Ideally I would love for some kind of dialog box to actually REMAIN VISIBLE and be able to click on things in the dialog which immediately cause the related operation to occur. Think of having a robot on the screen and wanting to manipulate its arms and legs and head, and so forth, just by clicking on, perhaps, buttons in the dialog. Is that possible?

0 Likes
Accepted solutions (1)
1,240 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor
Accepted solution

You'll want to create a command.  A command provides several features that aren't available through other means.  The first of these is to add a button to the UI.  You can read more about that here:

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-F31C76F0-8C74-4343-904C-68FDA9BB8B4C

 

Second, is the ability to create a command dialog, which is what your question was really about.  You can read about that here in the link below.  It also provides an overview of commands.

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051

and here:

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-8B9041D5-75CC-4515-B4BB-4CF2CD5BC359

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 3

RogerInHawaii
Collaborator
Collaborator

Thank you muchly! I appreciate you're having taken the time to address my issue.

0 Likes