Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

SNAP usage.

Status
Not open for further replies.

palopjay

Mechanical
Jun 28, 2011
6
Hi

I need some information by users about SNAP in NX.

I'm starting to learn/program with this tool, I'm reading the SNAP Getting started guide, and I cannot understand if this tool can help me to do what i need: For example
- make a multi-page drafting starting from an assembly,
- do a check on a lot of components and their subassembly, to find and refine some attributes
- run a subsequence of operations which include NX operation and external operations (created using VB by third-party) in same time.

I have an idea how to do to compile my VB/SNAP program for above purpose, but I cannot define what is the limit of this SNAP tool.
Can anyone make me an example on what cannot i do with this SNAP, out of simple modeling or simple drafting? Can I manage large assemblies, create new files and do a switch between applications inside UG (model/drafting/routing) all in a unique program with SNAP? Or is VB the right way to do this, without SNAP?

Thanks in advance.

Paolo
 
Replies continue below

Recommended for you

The good news is: you can use both. Within your program, you can call the SNAP functions and the 'regular' NXOpen functions. If you have a SNAP license, my advice would be to take advantage of the SNAP commands where you can and call the NXOpen commands where you need them.

www.nxjournaling.com
 
So, as cowski describes, the beauty of SNAP is that you don't have to use it in isolation.

SNAP is really just a hand-crafted .NET library that simplifies a bunch of common NX Open tasks. I'm not sure whether you're using SNAP with VB or C# (it works with either) but the important thing is that you can use SNAP for whatever you can accomplish with SNAP, and then start using regular NX Open VB.NET or C# calls within the same application. In the end, it's all the same .NET, whether you're using VB, C#, SNAP, or any combination of the above.

The SNAP documentation will help you understand the exact limits of SNAP, relative to your project, but then the NX Open documentation for .NET will show you the much bigger world available there. Certainly, drawings, checking and sequences of internal and external operations are all fair game. :)

Does that help?

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

me too I'm interested in developing some tools with the help of SNAP. As palopjay, I would like to create simple tools for manage large assembly, create automated drafting and deal with third party programs.
Reading the getting start guide there are some point that are not clear:

-First of all, what really SNAP can give for help to create a small program (if it's not only about parametric modelling) it's an easy to use library for user interface. For create a program you still need to use journal, NX Open, or Visual Basic. Is it worth the price of SNAP license?
-I don't need automation for modelling for parametric solid. I need to deal with large assembly, attributes of single parts and automated drafting. Is it SNAP what I really need?
-if for create a program I still need to write in NX Open, do I need NX Open Author license too for sign the program?

Thx in advance.
Dous
 
A couple of people asked "can I just use VB". Yhe answer is "no". VB is just a programming language. If you want to use NX capabilities, then you need a library of functions that your VB code can call to give you access to those capabilities. There are two libraries available: SNAP and NXOpen. You write a program in the VB language (or in C#, if you prefer), and this program can include calls to SNAP functions, NXOpen functions, other .NET functions, or other code you wrote yourself -- anything you like.

Regarding the specific applications you asked about:
(1) Creating drawings. SNAP is no use; it has very few drafting functions. Use NXOpen.
(2) Cycling through an assembly, doing things with attributes. SNAP is good for this.
(3) Mix NX operations and external operations. Yes -- your code can call SNAP functions, NXOpen functions, or anything else.

NXOpen has a much broader range of functions, but the SNAP ones are much easier to use. So, if you have licenses for both SNAP and NXOpen, I'd recommend that you call the SNAP functions when they have the capabilites you need, and fall back on the NXOpen functions otherwise. Mixing the two is perfectly fine. Price-wise, a SNAP Author license is a lot less expensive than an NXOpen Author license (I think).
 
Hi,
thanks for all your replies. I'd like to try SNAP full function to create a group of tasks help me and my co-workers to complete some tasks in a standard workflow we apply everytime we start a new job. But I'm only a curious user of NX, not a programmer: this is the reason for my interest on SNAP programming.

I already read the "getting started" guide to understand the "deepness" of SNAP capabilities, but a lot of doubt still in my mind. In any examples i found on that guide, there is no one applicable to tasks who work through assembly attributes. SNAP is (as per its definition by NX's programmers), a user oriented tool, and it looks like a single-task based, rather than a simplified and summarized pack of libraries of NXOpen. I'll try to work with SNAP, but I'm afraid than the most part of work shall be to avoid the limits of SNAP, rather than take advantage of it, in my case.
If any user of SNAP can help me to understand what i can do on assemblies
with this tool, I would be grateful. As an example: I need to create an assembly, with a basic code (same for all components) with a service code added to it (something like NAME_SERVICECODE_REV00) to have a starting standard subdivision on my assembly. It results something like this:

NAME_rev00
+NAME_servicecode1_REV00
+NAME_servicecode2_REV00
....

every component with its DESCRIPTION attribute filled in.

I need to do this with a simple user interface window, and i think the right way for me is to use VB and SNAP. Anyone can help me to understand if with some SNAP functions is there a way to obtain this user interface easily, or i need NXOpen to link the VB to NX for those operations?

Thanks in advance.

Palopjay
 
There's a whole chapter of the SNAP Getting Started guide that talks about assemblies. Specifically, it tells you how to cycle through all the components in an assembly, doing various things with each one.

To find out how to use SNAP to work with attributes, look in the SNAP Reference Guide (the CHM file). The Snap.NX.NXObject class has all the functions for reading and writing attributes. Since a Component is an NXObject, all these attribute functions work on components, too.

If you have problems, you can get good help either here, at NXJournaling.com, or in the Siemens Customization and Programming forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor