How to setup NC program preferences in PowerMILL with a macro

Modified on Thu, 3 Apr at 12:13 PM

Issue:

How to quickly set the settings in the post preferences using a macro.
  
 

Solution:

A macro can be recorded to speed up the settings of the NC code preferences and to quickly change the type of machine tool:   
  1. Start recording macro.
  2. Select the name/location folder of macro.
  3. Set the NC program preferences.
  4. Stop recording macro.
  5. Repeat from step 1 for each machine type.
 Note: to apply nc program preferences as default settings to each PowerMILL session add the macro lines below to the macro pmuser.mac.


Example macro:
FORM NCPREFERENCES
PATHSELECTOR PATHLISTS LISTCHANGE OUTPUT PATHSELECTOR PATHLISTS CLEAR PATHSELECTOR PATHLISTS ADD PROJSELECTOR
"D:\"
OPTIONFILE SELECTFOR NCPROGRAM PREFERENCES
OPTIONFILE SELECT -1 NEW
OPTIONFILE BROWSE FILEOPEN
"D:\Post\base\Fanuc_base.pmoptz"
EDIT NCPROGRAM PREFERENCES TAPEOPTIONS 'D:\Post\base\Fanuc_base.pmoptz' FORM ACCEPT SelectOptionFile
EDIT NCPROGRAM PREFERENCES FILEMASK "{ncprogram}.s"
EDIT NCPROGRAM PREFERENCES MACHINETOOL ""
EDIT NCPROGRAM PREFERENCES WORKPLANE ""
EDIT NCPROGRAM PREFERENCES CONNECTION ROTATE_MOVE
NCPREFERENCES ACCEPT 
Generic

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article