Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Menu Script CAM Question

Hello All,

I'm trying to call an NX Open .dll after the Postprocessing button has been pressed from within CAM but I'm having a few problem that I'm hoping that someone can assist with.

 

Following the documentation I've created two files and placed them in a "startup" directory, but within NX I'm getting the following errors

 

 

In NX9

MB_LOADED_MENU_FILE Loaded startup menu file: D:\NX_Data\NXOPEN\DNC_Transfer\startup\cam.men

MB_MENU_FILE_LOAD_FAILED Startup menu file load failed for: D:\NX_Data\NXOPEN\DNC_Transfer\startup\DNCMenu.men

   Cannot edit menu bar! Menu bar has not been created.

 

In NX75

MB_LOADED_MENU_FILE Loaded startup menu file: I:\NX_Data\NX75custom\NXOPEN\DNC_Transfer\startup\cam.men

MB_LOADED_MENU_FILE Loaded startup menu file: I:\NX_Data\NX75custom\NXOPEN\DNC_Transfer\startup\sample.men

Syntax_Error Syntax error at line 4 in file: I:\NX_Data\NX75custom\NXOPEN\DNC_Transfer\startup\DNCMenu.men

   Cannot MODIFY button UG_CAM_ONT_OUT_MACHINE_DATA. The button does not exist.

MB_LOADED_MENU_FILE Loaded startup menu file: I:\NX_Data\NX75custom\NXOPEN\DNC_Transfer\startup\DNCMenu.men

 

 

 

cam.men

 

VERSION 130

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY

APPLICATION_BUTTON UG_APP_MANUFACTURING

MENU_FILES DNCMenu.men

END_OF_MODIFY

 

 

DNCMenu.men

 

VERSION 121

EDIT UG_GATEWAY_MAIN_MENUBA

MODIFY

BUTTON UG_CAM_ONT_OUT_MACHINE_DATA

LABEL Postprocess & Transfer to DNC

ACTIONS/POST DNC_Transfer.dll

END_OF_MODIFY

 

Any Ideas?#

 

Jason

4 REPLIES
Solution
Solution
Accepted by topic author MrJSON
‎10-07-2015 05:52 AM

Re: Menu Script CAM Question

What I'm guessing....

The CAM menu stuff doesn't exist when NX starts.

So you have to do these menu edits as (or after) CAM is started.

 

What I did for drafting (to replace all the dialogs to fill in the titleblock)

Put this .men in the \startup\ folder

VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY
  APPLICATION_BUTTON UG_APP_DRAFTING
  MENU_FILES GTAC_Populate_Title_Block.men  
END_OF_MODIFY

Then put this .men in the \application\ folder

 

VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY
  ! This button is for populate title block command launched from Drawing Format toolbar
  BUTTON UG_DRAFT_DRAWING_FORMAT_TITLE_BLOCK_POPULATE
  ACTIONS/REPLACE GTAC_Populate_Title_Block.dll

  ! This button is for populate title block command when a MB3 > Populate on title block is invoked
  BUTTON UI_TITLE_BLOCK_EDIT_TITLE_BLOCK
  ACTIONS/REPLACE GTAC_Populate_Title_Block.dll
  
  ! This button is for populate title block command when a new drawing is created
  BUTTON UI_DRAFT_EDIT_TITLE_BLOCK_FOR_DRAWING
  ACTIONS/REPLACE GTAC_Populate_Title_Block.dll
  
  ! This button is for populate title block command when a new sheet is inserted
  BUTTON UI_DRAFT_EDIT_TITLE_BLOCK_FOR_SHEET
  ACTIONS/REPLACE GTAC_Populate_Title_Block.dll

END_OF_MODIFY

 

 

I *believe* if you do a similar setup for CAM, you should be able to modify the "postprocess" button.

 

Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Menu Script CAM Question

Thanks for the suggestion Ken, I moved the DNCMenu.men file to the application folder but that still didn't work. The error message appeared further on in the log file

 

 

MB_LOADED_MENU_FILE Successfully loaded menu file: C:\Program Files\NX\90\ugii\menus\ug_cam.men

MB_LOADED_MENU_FILE Successfully loaded menu file: C:\Program Files\NX\90\ugii\menus\ug_synchronous.men

MB_LOADED_MENU_FILE Successfully loaded menu file: C:\Program Files\NX\90\mach\auxiliary\batch\application\ug_cam_batch.men

MB_MENU_FILE_LOAD_FAILED Error loading menu file: DNCMenu.men

 

Cannot edit menu bar! Menu bar has not been created.

 

Maybe this can't be achieve within CAM?

 

Many Thanks

 

Jason

Re: Menu Script CAM Question

DNCMenu.men needs to be in the application folder.

 

BUT

Did you add a SEPARATE .men file in the \startup\ folder?

with the UG_APP_MANUFACTURING (or whatever it is)?

 

Maybe you did (it kind of looks like it), but you didn't say.

 

Maybe the button names are different than you think?

I'd comment everything that changes behavior out in DNCMenu.men, make sure the .men loads that way.

Then uncomment one button at a time, see if OK or error.

 

You might want to contact GTAC about this.

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Menu Script CAM Question

Thank Ken, I've now solved it with your help. After following your instructions that at first didn't appear to work, I've found there was a typo in the menu I was editing

EDIT UG_GATEWAY_MAIN_MENUBA

should have been

EDIT UG_GATEWAY_MAIN_MENUBAR

 

Your a Star!

Learn online





Solution Information