A
A
alexpapay2013-04-29 23:50:19
C++ / C#
alexpapay, 2013-04-29 23:50:19

Working with UG Open API: where to start?

Good day, Khabravchane!
The question is more of a CAD topic, but still related to programming.
I faced the problem of implementing my theoretical research in the field of writing programs through the API of the well-known CAD / CAM tool in the Unigraphics NX system (now only NX).
The problem is that I can not quite understand where to start and how to interact with the user interface?
I would like to find any adequate docks or a guide for dummies, where the process of initializing work is written step by step. And then at this stage - the eyes run wide. There is a cloud in the class docks, there are interface objects and generated files. There are several example files of ready-made programs, but they are also difficult to enter.
I would be very grateful for any useful information.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Alekseev, 2013-12-24
@Murlord

Good afternoon,
If the question is still relevant, then here are some tips.
To create your own GUI, you need to open any model, and then go to the NX'a subroutine called Block Styler. The path to it:
Control Panel -> Start -> All Applications -> Block UI Styler.
Then you can transfer the necessary controls to your dialog box. In the settings, you can set for which PL to generate callbacks. Choice of: C++, C#, VB, Java.
Then it all depends on your needs. For example, I'm looking for the necessary classes and methods in the NXOpen .Net API Reference.
Another very helpful tip. If you want to automate some actions and / or want to know which method is responsible for a particular function from NX, then, first, write down the Journal (Journal). In Russian, this, of course, is called Macro, but the concept of "Macro" in NX is something else.
To write a log, you need to:
1) Install the PL for which you want to write it. To do this:
Preferences -> User Interface -> Journal.
2) Actually, the journal entry itself:
Tools -> Journal -> Record.
If you want to create a large project, for example, in C++, C# or VB, then the first thing to do is to install MS Visual Studio (for NX 8.0 and 8.5 - 2010, for NX 9.0 - 2012). And only then install (reinstall) NX. In this case, you will see the NX program wizards in VS. It is very convenient for writing code and for testing.
PS. If there are any questions - write. Email in profile.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question