PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script Assistance

Message 1 of 11
1285 Views, 10 Replies

Script Assistance

In our shop, we use Sinumerik machines mostly. After post processing we change the feeds to parameters that can be set by the operator. To accomplish this,  the feeds in the program are renamed to parameters like F500 -> F=R21, etc.


Is there any way to get this done in the post processor itself ? I tried putting a script as follows :


function ReplaceFeeds()
var res = "";
res += StandardResponse();
return res;


and calling this script after post processing in the Script properties. I had an intuition that it is important to execute this script at the end of processing, maybe I am wrong. I don't know, any help would be greatly appreciated!


Thanks a lot!

Labels (2)
Message 2 of 11
in reply to: vishnuvbatl

See StandardResponse() help in AMMPU



Message 3 of 11

You could build a filter into the post to output the parameter using if/else logic rather than a script. 

You'll need to build logic to catch whatever parameters you wish to output. 

Example: F500 -> F=R21

If%p(Feed rate)%==500


Else if%p(Feed rate)%==750



If these are constants, F500 is always R21, this would be very easy to setup. If the numbers need to be sequential, it would be a bit more work to ensure every time the same feed rate is called, the correct assignment is used. But still easier than scripting, in my opinion. 


Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

Message 4 of 11
in reply to: Anonymous

Thanks for the reply, I guess this snippet should be called inside the feed block right ?

Message 5 of 11

Thanks for the reply, sorry to ask but should I put this inside feed block ?

I am still learning to PMPost. Could you please let me know a few good sources to learn PMPost ?

Thanks a lot.
Message 6 of 11
in reply to: vishnuvbatl

1. Create user parameters FQ, FR























2. Create script:














3. Modify Move Linear command



Message 7 of 11
in reply to: Anonymous

It is a good idea to type the following for the "Toolpath Start" or "Program Start" command:

Toolpath Start.PNG

To find all occurrences of "FeedRate" do this:



Message 8 of 11
in reply to: Anonymous

Thanks a lot for the reply, this really helps!!

One more doubt, are there any resources apart from PMPost help that gives more details on scripting and post generation ?

Thanks again!
Message 9 of 11
in reply to: vishnuvbatl

I only use the built-in help, but you can also study the generic postprocessors provided by Autodesk.
These are typically found here:
c:\Users\Public\Documents\Autodesk\Manufacturing Post Processor Utility 2021\Generic\

You may want to look at "c: \ Program Files \ Autodesk \ PowerMill 2021 \ lib \ help \ cldata \ cldata.htm" once, although it won't be of much practical use, but at least you'll see what's in the "engine room."

Message 10 of 11
in reply to: Anonymous

Hi There,

Sorry for the late reply. Here, I think I should call the Parametric feedrates function inside the move linear function, so that it gets executed everytime. Doing so solved the issue
Message 11 of 11
in reply to: Anonymous


No corresponding parameter is generated at the image mark

What is the reason?


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators

Autodesk Design & Make Report