×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

User Exit on Save
2

User Exit on Save

User Exit on Save

(OP)
What is the user exit for Save All in NX

For save/save work part only we have ufput()

RE: User Exit on Save

Note that you can also use MenuScripts to provide pre- and post- actions on any menu item. Below is the sample code for a .men file which if found in your start-up folder in your user_defaults folder which will cause a program to be executed when you select the File -> Save-As... menu item:

*******************************************

! Add custom menu items or customizations
! Revised: 20 Feb 2004
! Note: Actions lines are 132 chars max.
!
VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY

BUTTON UG_FILE_SAVE_AS
ACTIONS/PRE <path to executable program>

END_OF_MODIFY


*******************************************

The ACTIONS/PRE opti
on will execute the program BEFORE the Save-As is performed, while an ACTIONS/POST will cause the program to execute AFTER the Save-As operation is performed.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: User Exit on Save

(OP)
so, what is the difference between user exit and a pre action.

I want my program to be triggered before saving of parts.

RE: User Exit on Save

It depends on what you want to do in your program when you do a Save All.

Using the menuscript ACTION/PRE your program will execute then the internal NX code for Save All will execute.

Using the user exit for Save All, you will have to include the save function in your program for all parts in your assembly.

Menuscripts run before or after the NX code, user exits replace the NX code.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: User Exit on Save

(OP)
For Pre-Actions can we send any arguments in the menu file.

RE: User Exit on Save

Mukundh,

Sending arguments from menuscript ACTIONS/ to a dll is currently not supported.

Regards, Joe

RE: User Exit on Save

(OP)
Hi Jpetach,

Menu file itself sends the argument to the ufusr/main with the button.

RE: User Exit on Save


Hi Mukundh,

You are correct.


At the risk of straying further away from the original menuscript topic... winky smile

NX 8.5 will provide formal support for argument passing for NXopen and Journal programs using the "Customize" user interface.

Please see the attachment for the new dialog.

Regards, Joe

RE: User Exit on Save

(OP)
Thanks for the info Joe

RE: User Exit on Save

(OP)
Hi

Pre/post action and userexit are not triggered with program save (Saving part automatically in program)

Is there any way we can trigger pre/post action utilities.

RE: User Exit on Save

What do you mean by "saving part automatically"? If you have an automated save function that is triggered by a menu or a timer, then I would not expect the pre/post or user exits to work.
The pre/post menu script options and the user exit are triggerred by selecting File/Save, ctrl/S or the Save icon. Any other method will not run the programs associated with the Save function.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: User Exit on Save

(OP)
Hi Loosli,

Good that you have mentioned "pre/post or userexit" will not work with automated save function. But, if we want to trigger or execute the utility is there any way for it...?

RE: User Exit on Save

How are you triggering the automatic save?
How does the automatic save work?
Is it a program written by someone for you?

If I remember right, there is no built-in auto-save in NX. They eliminated it at UG2-V10 in 1994!

If you have a custom program for auto-save, can it be modified to incorporate your pre/post save requirements?
What does your pre/post save function do?
Is there another method that would accomplish what you need?

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: User Exit on Save

(OP)
Hi Loosli,

I have written a utility which will update the drawing views and save's part in program. But, when execute this program Pre\Post and user exit is not triggered. So, I want to check for any way to handle the pre\ post actions.

RE: User Exit on Save

Just call the program(s), that you would have run as a pre/post action, at the appropriate point during the execution of the utilty program itself.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: User Exit on Save

(OP)
John,

How do we execute utility in ufunc program. Is there any relevant call (For NXOPen we have Session.Execute()) can you suggest similar call in ufunc


Thanks in advance
Mukundh

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources