×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Learning to program in NX using VB

Learning to program in NX using VB

Learning to program in NX using VB

(OP)
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?

RE: Learning to program in NX using VB

http://www.nxjournaling.com/ 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.

RE: Learning to program in NX using VB

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. smile

I would concur that http://www.nxjournaling.com/ is a great resource for getting started. In your case, you might look particularly at:

"Using WinForms in Journals"
http://www.nxjournaling.com/content/using-winforms-journals

"User input: input boxes"
http://www.nxjournaling.com/content/user-input-input-boxes

and

"Start journal from custom button"
http://www.nxjournaling.com/content/start-journal-custom-button

Good luck! smile

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources