Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Journal with multiple User Input Boxes in one form

Status
Not open for further replies.

Barnon

Mechanical
Jul 23, 2016
97
I'd like to simply allow the user to input several variables in one form. I found the command below but it seems to only allow one input at a time.

answer = NXInputBox.GetInputString("prompt", "title bar caption", "initial text")

Is the only way to do this thru Winforms and the Block UI Styler? Both seem to generate a tremendous amount of code for several user inputs.

I'm having a little trouble using the Block UI Styler. We run off a Blade Server and I haven't been able to set the environment variables so my Journal can't find the .dlx file.
 
Replies continue below

Recommended for you

The block styler is probably your best bet if you have a license. There are a few different "user interface" commands included in NXOpen, but they are fairly "old school" and there isn't a good way to combine them into a single "form". SNAP has the ability to create simple dialogs through code. I don't currently have a SNAP license, so I'm not sure what all is possible with it. Have a look at the SNAP guide for more info.

For testing, I don't think your DLX file needs to be in a specific location, but your code file does need to point to its location. You can put both the code and DLX file in the same folder and add this code to the "New()" sub:
Code:
Dim journalPath As String = theSession.ExecutingJournal
Dim journalFolder As String = System.IO.Path.GetDirectoryName(journalPath)

theDlxFileName = System.IO.Path.Combine(journalFolder, "YourDlxFileName.dlx")

This will make the code look for the DLX file in the same folder that contains the code.

www.nxjournaling.com
 
Thx Cowski! Your suggestion for the Block UI Styler works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor