Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Learning to customize NX 3

Status
Not open for further replies.

vktsn0303

New member
Sep 10, 2013
23
Hi everyone!

I have been working with NX for a couple of years now. I have an idea that can be made use of by customizing NX. I have never customized an application before and I have no knowledge on NX Open (I am assuming it is with NX Open that we customize) but I do have an experience in programming using basic C++ and basic JAVA. I would like to learn to customize NX so I can get my idea noticed by my team. Where must I begin? Are there any tutorials available I can make use of to learn NX Open?

Thanks in advance for all the answers.
 
Replies continue below

Recommended for you

Maybe start with an easy macro then execute it with an icon button, then work on the NXOpen stuff.
If you do a search in this forum you will find things on it.
 
Read the "Getting Started with SNAP" guide that's part of the standard NX documentation set. It's aimed at people just like you (people who have no previous programming exzperience and want to customize NX). Depending on what you're trying to do, the SNAP API may not be able to do all of it, and you may have to mix in some NX/Open calls, too. But, anyway, learning SNAP is a good way to get started with NX/Open.
 
From what I saw with snap, it does seem easier than learning VB, Java or C. I didn't go that route because it looks like you need a license for it and learning VB opr another language is much more universal. There also seems to be many more examples of journals written in VB than Snap.

As mentioned before is a good place to start. It is where I started looking at code along with this forum and other sources.
 
> From what I saw with snap, it does seem easier than learning VB, Java or C.

SNAP isn't a language (like GRIP), it's just a library of functions (like NX/Open). You can call SNAP and NX/Open functions from any .NET language you choose, including VB, C#, F#, and umpteen others. So, it's not a matter of choosing between VB and SNAP. VB and SNAP work together -- you write VB code that calls SNAP functions.

> many more examples of journals/programs written in VB than Snap.

There are lots of examples of journals written in VB. Many of these call only NX/Open functions, many call only SNAP functions, and some call a mixture. It may be true that there are more VB programs calling NX/Open fnctions than calling SNAP functions, just because SNAP is much newer. However, the SNAP Reference Guide has over 400 examples, which might be enough.

So, in summary, the process is:
(1) Choose a language. I would recommend either VB or C#.
(2) Choose a library -- either NX/Open alone, or SNAP alone, or a mixture.

 
I had gone through the website I see that all the explanation is based on VB. But I think learning to customize with JAVA will give a better scope even outside of NX automation. So I was wondering if there was any tutorial available where the explanations are based on JAVA syntax.
But then I also noticed that using JAVA to customize NX leads to longer programs. This again leads me to a dilemma. Please help.


vktsn0303
 
In the world of NX customization, VB is the most popular language. The NXJournaling site is almost all VB, as you saw, the SNAP docs only cover VB, and the discussions on the Siemens PLM Community forum are mostly about VB.

So, you'll find it much easier to get help if you use VB.

The only reason I'd recommend Java is if you are using multiple platforms (both Windows and Linux, for example). Java is a very popular language in the world at large, but VB and C# are pretty popular, too. All three are solid mainstream languages.

For me personally, Java is a non-starter, because it doesn't allow operator overloading, so I can't write vector stuff the way I want to. The only platform I use is Windows, and I use SNAP functions whenever I can. So I use either VB or C# for all my work.

Anyway, the complexity lies in the NX API (NX/Open), not in the programming language. So, once you learn how to write NX customizations in one language, switching to a different one is pretty easy. The SNAP Getting Started Guide tells you what you need to know about VB in 14 pages. That's a couple of hours of reading, at the most. So, my advice is to stop agonizing about languages, and just get started. Just work through the tutorial in the SNAP Getting Started Guide. You can do this by using MiniSNAP if you don't have a SNAP license. Then switch to Java if you still want to.
 
@Buddak,

Can you elaborate "Java doesn't operator overloading, so I can't write vector stuff the way I want to" ? I'd be interested in seeing some of your code snippets if you are willing to post. I am always open to different construction methods for writing code.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor