×
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

Call Vb to run journal file recorded in NX7.5

Call Vb to run journal file recorded in NX7.5

Call Vb to run journal file recorded in NX7.5

(OP)
Hi, I am a design engineer for plastic mold. I know the basics of visual basic programming and not very much understand NX7.5 syntax. I actually started to create a component library for my design work use. I created one interface using visual basic in visual studio 2008 and there i can customize the size i want for my design. I recorded a journal file so that i can modify it and generate a new model. But is there any function to call out to run the journal file i recorded?
For my logical thinking, I would like to have my sequence to run like this:
1. Execute the .exe file in NX by File-->Execute-->NX Open
2. Opening the interface i have created, change the size to what i want and one button to generate
3. By generating, it will flow to the journal file i recorded earlier on and modify the value to the value I just set and NX7.5 will run the journal to create the model.
Please let me know if my sequence will work in NX7.5 and if it's correct, how to ask NX7.5 to run the journal by itself?
Thank you very much in advance.

Nelson

RE: Call Vb to run journal file recorded in NX7.5

Nelson,

Here's the basic steps to run a Visual Studio NX journal:

- Build a .dll, not an .exe.
- To run from (interactive) NX use Ctrl-U and select your dll.

If you start from one of the Visual Studio NX Open Wizards project templates then the VS project will be correctly set up and you can drop your code. Recording is a good way to get most of the code you need.

Also in you project properties under Debug set "Start external program" to "C:\Program Files\Siemens\NX 10.0\UGII\ugraf.ex" (or your path) and then when you click start it will launch NX with the debugger attached.

From the NX Help home page look at Programming Tools for more background.

Paul

Paul Turner
CAD & Process Engineer
Mastip Technology

RE: Call Vb to run journal file recorded in NX7.5

> Build a .dll, not an .exe.

It doesn't matter whether you build a DLL or EXE. And, in fact, in the .NET world, there's not much difference between the two.

> Recording is a good way to get most of the code you need.

Not so sure about that. I think recording is a good way to find out what functions you need to call, but the recorded code is pretty horrible, in my view, and I wouldn't want it in any app that I write.

Another good source of info for beginners is the "Getting Started with SNAP" guide. Even if you're not going to be using SNAP functions, the basic background and logistics info is still relevant and useful, IMO.

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