LUA Netfabb Inputdlg

LUA Netfabb Inputdlg

Anonymous
Not applicable
416 Views
1 Reply
Message 1 of 2

LUA Netfabb Inputdlg

Anonymous
Not applicable

I have a problem with Inputdlg system function in LUA Script. Function includes 3 strings and the last one is the input value displayed in window. How can I get the value? I know that LUA automation in Netfabb doesn't support input and output facilities. Is there any function to read the last string? Is there possibility to include I/O Library?Untitled.jpg

0 Likes
Accepted solutions (1)
417 Views
1 Reply
Reply (1)
Message 2 of 2

steffen_anders_adsk
Autodesk Support
Autodesk Support
Accepted solution

Hello, @Anonymous,

 

Welcome to the Netfabb Forum!

 

The last string is a default value that is used when the user does not enter anything.

This is how you use it:

local userinput = system:inputdlg("Input something","Your input:","nothing to say");
system:messagedlg(userinput);

 

Result:

inputdlg-10-nothing.png

inputdlg-20-nothingresult.png

 

inputdlg-30-something.png

inputdlg-40-somethingresult.png

Clicking OK returns whatever is currently written in the input field, default value or otherwise. Clicking Cancel always returns the default value, regardless what is currently written in the input field.

All strings must be present, but can be empty; so, although of limited value, this would be correct syntax:

local userinput = system:inputdlg("","","");

 

 

Best regards,

Steffen

Steffen Anders
Autodesk Netfabb team

Netfabb resources: Online helpSystem requirementsKnowledge baseForumsHomepageYouTube

How to get Netfabb Basic: VideoHelpDownload

0 Likes