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

Create Post Processor warning dialog for a particular toolpath

42 REPLIES 42
SOLVED
Reply
Message 1 of 43
iamcdn79
2095 Views, 42 Replies

Create Post Processor warning dialog for a particular toolpath

There are times when I forget to set cutter comp. to LEFT in the NC Program settings when post processing for Corner Pencil toolpaths. I want to create a warning dialog to say something like cutter comp is not set for this toolpath.

 

I am wondering if it is possible and how.

 

I am thinking of creating an if statement like if the toolpath Corner pencil exists and if Cutter Comp is set to None then to pop up a warning when posting.


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

42 REPLIES 42
Message 2 of 43

Hey Andre

 

See the attached post, I added some logic to the toolpath end, and a switch to the cutter comp off and toolpath start. This is the only way I can see this working unless you create a script to scan and capture the cutter comp setting and throw a warning. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 3 of 43

I tried what you had in the provided post but it never popped an error message if the cutter comp was set to off. So I just created a script and it seems to work as intended *fingers crossed*


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

Message 4 of 43

Your trap must have been missing something, or something was different in the cut file. 

 

Glad you got it sorted. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 5 of 43

I am trying to run the same script for Drilling toolpaths using Helical but it's not working. Do I have the correct expression for that type of toolpath or am I missing something?

 

I tried 

 

iamcdn79_1-1699362413985.png

 

and

 

iamcdn79_0-1699362152536.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

Message 6 of 43
evo80
in reply to: iamcdn79

Try

if %p(Toolpath Type)%=="DRILLING" && %p(Drilling Cycle Type)%=="HELICAL"

Message 7 of 43
evo80
in reply to: iamcdn79

if (%p(Toolpath Type)%=="DRILLING" && %p(Drilling Cycle Type)%=="HELICAL")

Missed the parenthesis.

Message 8 of 43
iamcdn79
in reply to: evo80

No, still doesn't work


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

Message 9 of 43
Sean571
in reply to: iamcdn79

You need to use this:

%p(Toolpath Strategy Subtype)% == "Helical"
Sean Wroblewski
Applications Engineer


Message 10 of 43
iamcdn79
in reply to: Sean571

That's not working either 

iamcdn79_0-1699375114736.pngiamcdn79_1-1699375175578.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

Message 11 of 43

Are you falling into the trap, or is it missing? Add a text block to identify if it's working. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 12 of 43

The problem here is that your trap is only going to run if compensation is turned on. Cutter compensation isn't an easy thing to trap. This was why I built a switch into my sample posted above with the trap at the toolpath end. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 13 of 43

I suggest that you move your warning or error trap to toolpath end. Inside cutter comp on, create a new trap to check for "Left" and have it set a user parameter "switch" from 0 to 1. Then inside your toolpath end trap, if the switch is set to 1, trip your message. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 14 of 43

Ok, your way worked in this application but didn't work for Corner Pencil 😕


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

Message 15 of 43

Add a text block into each trap. Where does it fail?

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 16 of 43
Sean571
in reply to: iamcdn79

@Jonathan.Artiss-DSI  is correct. I believe you can also put something like this in toolpath start and it should still work:

Sean571_0-1699379249630.png


Just don't put your check inside Cutter comp on.

Sean Wroblewski
Applications Engineer


Message 17 of 43
iamcdn79
in reply to: Sean571

Is having %p(Toolpath Type)% == "DRILLING" optional or not needed?

 

iamcdn79_0-1699380536244.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

Message 18 of 43

I don't think you need to look for drilling toolpaths when you specify the subtype. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

Message 19 of 43


@Jonathan.Artiss-DSI wrote:

Add a text block into each trap. Where does it fail?


I went back to troubleshoot your original suggestion but now it works 🙃 



But I like Sean's solution better to just add this to toolpath start, it's less work lol and more straightforward

 

iamcdn79_0-1699382322187.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

Message 20 of 43
evo80
in reply to: iamcdn79

Good Day,

I've have his throw up an error within the posted programs, but how do I configure the post to not post if the comp condition hasn't been met?

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

Post to forums  

Autodesk Design & Make Report