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!

Learning to program in NX using VB 1

Status
Not open for further replies.

Cthulhu40

Industrial
Jun 9, 2015
1
I was wondering if I could get some help creating a specific program. I feel like all the pieces to this experimental project are there I just don’t understand how to put it all together.

As a disclaimer I am still learning how to program in vb and python so I am not as skilled as I would like to be, so if you know of any good books or tutorials that can teach me how to program for NX in VB please let me know!

Ideally what I want is a program that I can run after I have finished modeling a part and the program will go down the NX model history tree and read the model history and save out to a text file the steps used to create the part including the information found within the sketches, essentially what journal feature does when you record the creation of a part. So that later on I can create a vb form and attach the text to a button and when the vb exe is run within NX I can press that button and it will create that part in NX. I can see that if I record a journal that what I want kind of already exists in NX. Journals already records how a part is made and NX lets you replay the journal to recreate a part, so I feel like all the pieces to my experimental project are there I just don’t understand how to put it all together.

Can anyone help?
 
Replies continue below

Recommended for you

is the best resource I found to understand the NX open library.

It does seem possible to make a journal to do what your saying, but NX has modeling tools that are probably better suited.
 
If your intention is to execute the code and recreate the geometry, then Journaling is DEFINITELY the right way to go here.

Presumably your form will be used to change some of the creation parameters?

If the changes you're going to have users make to the inputs are just parametric changes (different expression values, for instance) then a tool like Product Template Studio can help you wrap a nice NX-style block dialog user interface around any part or assembly without doing any coding at all.

On the other hand, if you're just experimenting to see what you can do with VB, then by all means, record a Journal of your operations, and then slap on a VB form. :)

I would concur that [URL unfurl="true"]http://www.nxjournaling.com/[/url] is a great resource for getting started. In your case, you might look particularly at:

"Using WinForms in Journals"
[URL unfurl="true"]http://www.nxjournaling.com/content/using-winforms-journals[/url]

"User input: input boxes"
[URL unfurl="true"]http://www.nxjournaling.com/content/user-input-input-boxes[/url]

and

"Start journal from custom button"
[URL unfurl="true"]http://www.nxjournaling.com/content/start-journal-custom-button[/url]

Good luck! :)

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor