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: 

Macro that checks for a command to have been executed in PowerMill

Message 1 of 3
396 Views, 2 Replies

Macro that checks for a command to have been executed in PowerMill

Hi all, I am looking to create a macro for an initial setup to allow each user to have the same workflow for each part.


We work on car Line so each part is orientated from a point in space. I am looking to create a Workplane from 3 points of a machining fixture and then have the block and everything else created from that. When using the Workplane from 3 points it requires you to pick the 3 points which is fine this works for what we need to do. But I need the macro to wait at that point and check through the echo commands until it sees the WPFROM3PTS ACCEPT\r to then allow it to continue running the rest of the Macro as the rest of the Macro requires the Datum to be set so the Z is correct on the fixture. Can this be done and if so what would be the best way to do this.


What I believe I am looking for is a loop with a variable called $WaitForPick = '' that then sets $WaitForPick = 0 checks through the Echo commands for the command WPFROM3PTS ACCEPT\r to be called then sets the variable to $WaitForPick = 1 and once it is 1 then the Macro can continue. Any help would be appreciated, It's been a while since I have done any Macro work and I am trying to get back into it more.


Also what Language are the Macro's in? I am looking at doing some Coding courses to help with creating Macro's in the future.




Labels (2)
Message 2 of 3
in reply to: Anonymous

you could use the macro pause and then pick your points:

MACRO PAUSE "Pick your stuff, then resume"

as far as the macro language goes, it is its own thing. I think it is more similar to c# than anything else. I'd advise reading through the Macro Programming Guide located under Help,Documentation. If you need help as you go, this forum is a great resource for macro help as well, and is usually pretty responsive.


good luck!

the numbers never lie
Message 3 of 3
in reply to: Anonymous



I am sending you a PM on some macro training options.

Jonathan Artiss
Senior Applications Engineer | DSI

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

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

Post to forums  

Technology Administrators

Autodesk Design & Make Report