Post Processor Script: Checking axis mode for all toolpaths

Post Processor Script: Checking axis mode for all toolpaths

Jaanyaar
Advocate Advocate
685 Views
6 Replies
Message 1 of 7

Post Processor Script: Checking axis mode for all toolpaths

Jaanyaar
Advocate
Advocate

Hi!

 

There are built in parameters that check a toolpath axis mode:

1. Axis Mode

2. Toolpath Axis Mode

 

These are useful for one toolpath or move. I need a function or expression to check all toolpaths at the beginning of the post processing.

If all toolpaths are 3 axis then A.

If there is a non 3 axis toolpath then B.

 

Thanks in advance.

 

 

0 Likes
Accepted solutions (1)
686 Views
6 Replies
Replies (6)
Message 2 of 7

iamcdn79
Mentor
Mentor

If you write an if expression in the 'Toolpath Start' command like %p(Toolpath Axis Mode)% == "3AXIS" with your commands underneath it. 

 

Then an else if expression like %p(Toolpath Axis Mode)% != "3AXIS" with your commands underneath that and end if to close it, wouldn't that work for all toolpaths?

 

iamcdn79_0-1697199501855.png

 

 


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 3 of 7

Jaanyaar
Advocate
Advocate

@iamcdn79 

That expression is suitable for one toolpath. It doesn't check all toolpaths in a program. Your structure is correct but the expression is not. A tweak is needed.

0 Likes
Message 4 of 7

Jaanyaar
Advocate
Advocate

By more examination, I've found that the following expression works for the 1st toolpath.

 

program.Toolpaths.Item(1).AxisMode=="1"

Where 1 = 3AXIS

2 = 5AXIS

and...

 

How can I check all toolpaths? 

0 Likes
Message 5 of 7

iamcdn79
Mentor
Mentor

I think the only to do what you want is to create a UDP https://forums.autodesk.com/t5/powermill-forum/get-toolpath-tool-parameters-in-ampu-script/m-p/97363...


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 6 of 7

Jaanyaar
Advocate
Advocate

Axis mode for every toolpath is stored in CLData. So it is enough to have a script or expression to check those stored values. No need to a UDP.  I guess it's simple but beyond my knowledge. 

0 Likes
Message 7 of 7

Sean571
Advocate
Advocate
Accepted solution

Sean571_0-1697482504532.png

 

Sean571_1-1697483474101.png

 

Sean Wroblewski
Applications Engineer

0 Likes