NX/Open Sample Applications

NX3 ships with many sample NX/Open applicatons

The sample applications are located at: UGII_BASE_DIR/UGOPEN/SampleNXOpenApplications, default location is: C:\Program Files\UGS\NX 3.0\UGOPEN\SampleNXOpenApplications

These sample applications are mostly .Net based technology. They use either VB (visual basic) .Net or C# (C Sharp) .Net, with a couple of applications that are C++ based in NX/Open.

c# samples:

  • AssemblyViewer
  • CycleAssemblies
  • InteropNXOpenWithUFWrap
  • NXOpenExamples
  • SnagImage (c# version)

vb samples:

  • CreateNote
  • DrawingCycle
  • DrawText
  • FeatureBrowser
  • File2Points (with a Grip file for comparision)
  • FilloutTitleBlock
  • LayerOrganize
  • PolygonTool
  • Preferences
  • QuickExtrude
  • Selection
  • SketchShape
  • SnagImage (vb version)
  • SpellChecker
  • TitleBlock

c++ (C Plus Plus) samples:

  • File2PointsCPP
  • InteropNXOpenWithUFunc

As you can see the majority of sample applications are written in vb (visual basic). Probably because that is the target audience for getting quick applications up and running. For C++ programmers and C# programmers they probably assume they’ll figure it out anyways. That is just a guess. Regardless of they type of programmer you are, which language you previously worked on you’ll see examples on how to use the NX/Open api namespaces to build your applications.

There will be another post of a step by step on creating a NX/Open application wired to a winform dialog.



19 Responses to “ “NX/Open Sample Applications”

  1. paresh deshmukh says:

    i ve been working on nxopen applications sinnce last 6 months as a beginnner.i just wanted to know if its possible to write a code for creating the view label.if yes please give me some reference.

  2. When you say view label, do you mean a section view with a label of A-A for example? Or do you want to associate some text to the view? What version of NX are you using, and what API?

  3. subzwari kashif says:

    i wanted to know how to use a macro files ?

  4. admin says:

    If you are using NX3 or greater, I would look at Journal files first. But in any case, from NX you go to: Tools -> Macro -> Start Record…

    When finished with recording Macro:
    Tools -> Macro -> Playback

    The same process is for Journal files as well. Journals have a lot more potential power though.

  5. Sovan says:

    Hi ppl, I am just trying start with NX open Api in C++.
    Other than the documentation, what would be the best option for learning NX open.

  6. tolsma says:

    Reference applications and code snipits are a good option for learning about the API. Log into GTAC (http://support.ugs.com , uganswer) and turn off all filters except for 'Open' and look through the sample code that's out there. Most of it will be the older ufunc API though.

  7. sai says:

    i want select face,on block,where can i add the following code,in my journal,plz help

    Dim obj As NXObject
    Selectface(obj)
    If obj Is Nothing Then
    Return
    End If
    Dim face1 As Face = Ctype(obj, Face)
    Dim surface1 As Isurface = Ctype(face1, Isurface)

  8. sarala says:

    i want select face,on block,where can i add the following code,in my vb.net journal,plz help

    Dim obj As NXObject
    Selectface(obj)
    If obj Is Nothing Then
    Return
    End If
    Dim face1 As Face = Ctype(obj, Face)
    Dim surface1 As Isurface = Ctype(face1, Isurface)

  9. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  10. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  11. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  12. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  13. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  14. tolsma says:

    Try asking this on the NX discussion board. http://groups.google.com/group/NX_CAX

  15. ear says:

    Hi ppl, I am just trying start with NX open Api invb.net
    Other than the documentation, what would be the best option for learning NX open.

  16. tolsma says:

    login to GTAC, and turn off all filters except the programming box, and see the examples that are out there. Also in the NX Install are some example programs in different languages.

  17. quick says:

    Hi ppl, I am just trying start with NX open Api invb.net
    Other than the documentation, what would be the best option for learning NX open.

  18. Gangadhar says:

    Hi
    I want to create a ufunc code to automate the stacked ballon in NX5-Drafting.

  19. tolsma says:

    I would look at the autoballoon capabilities in NX Drawing. Search the API for that feature, and see how you can extend it.

Leave a Reply