Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

NX Open - creating menus

Status
Not open for further replies.

christophersrikanth

Structural
Apr 1, 2013
15
0
0
GB
I'm struggling with this since yesterday.

I need to create menus in NX 8.5 and then create callbacks (menu event handlers) for calling my own code/subroutines in C++ which are all ready and tested.

Firstly, I'm struggling to create menus itself"

I have the NX Open docuemntation and I'm referring the examples available with NX (see the link to the attached file).

Now, if you read the attached file 'ReadMe.txt', I have done all the steps corresponding to Windows platform, i.e.

christophersrikanth said:
Windows
-------
1. Using Visual studio - create a new project using the NXOpen AppWizard.
This is described in the Automation -> NXOpen -> Open for C/C++ ->
Open C Reference Guide -> Overview -> Setting up your system -> Windows operating system setup.
When setting the Application Settings, select "Create an Internal application"
and select C++ as the language.
2. Remove all the existing files from project.
3. Add the MenuBarCppApp.cpp, MenuBarCppApp.h to Source Files and Header files respectively
by selecting the Project pull down and select "Add Existing Item...". Select the file
using the popup window.
4. Build the internal image by going to the Build menu and selecting either
"Build Solution" or "Rebuild Solution".
This will create an executable called MenuBarCppApp.dll and MenuBarCppApp.lib in the 'Debug' directory.

I got the MenuBarCppApp.dll and MenuBarCppApp.lib files.All Ok till here.

Now, the next step:

christophersrikanth said:
----------------------------
Settings before Launching NX
----------------------------
1. Create the below folder structure in any of the system drives and place the following files:
+ MenuBarCppApp
+ application
a. MenuBarCppApp.men
b. MenuBarCppApp.dll on Windows or MenuBarCppApp.so on Linux (This file is obtained from the build steps)
c. MenuBarCppApp.lib on windows or MenuBarCppApp.o on Linux (This file is obtained from the build steps)
+ startup
a. MenuBarCppAppButton.men

2. Set the varaible UGII_USER_DIR pointing to the directory MenuBarCppApp location in NX command prompt.
For ex: if MenuBarCppApp is created in the location D:\MenuBarCppApp then the setting should be "set UGII_USER_DIR = D:\MenuBarCppApp" on Windows.

I did the above as stateted in the 'ReadMe.txt' document.

Then, the docuemnt 'ReadMe.txt' states that:

christophersrikanth said:
Settings after Launching NX
----------------------------
1. Change the Role to Advanced with full menus if not set.

-----------------------
Example execution steps
-----------------------

1. Start NX.

2. Create a new part or open any part file

3. To launch Sample CPP application, go to Start->All Applications-> Sample CPP Application. This will create "Sample CPP" menu next to Help.

4. Click on the different buttons under the menu "Sample CPP" to verify the callbacks associated with the button names.

However, when I go to Start->All Applications, I do not find Sample CPP Application.

What am I doing wrong?

Pls help as I'm really need to demo a prototype soon!

Anyone please?

Chris
 
Replies continue below

Recommended for you

Do you really need to create a custom application module (something on the same level as Modeling, Drafting, Sheet metal, etc) or just create a few custom menus?

If all you need is a few custom menus on your computer, you can do that through Tools -> Customize. Add the required menus/items and point them to your custom code.

If you need to roll this out to an entire group of users, using MenuScript would be the better choice (edit the .men file(s) and create a group 'startup' directory). In this way the customization management is centralized, the changes will affect all users.

www.nxjournaling.com
 
Status
Not open for further replies.
Back
Top