Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Create Post Processor warning dialog for a particular toolpath

iamcdn79
Mentor

Create Post Processor warning dialog for a particular toolpath

iamcdn79
Mentor
Mentor

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

0 Likes
Reply
Accepted solutions (3)
2,438 Views
42 Replies
Replies (42)

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

iamcdn79
Mentor
Mentor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

iamcdn79
Mentor
Mentor

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

0 Likes

evo80
Collaborator
Collaborator

Try

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

0 Likes

evo80
Collaborator
Collaborator

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

Missed the parenthesis.

0 Likes

iamcdn79
Mentor
Mentor

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

0 Likes

Sean571
Advocate
Advocate

You need to use this:

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

0 Likes

iamcdn79
Mentor
Mentor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor
Accepted solution

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

iamcdn79
Mentor
Mentor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

Sean571
Advocate
Advocate
Accepted solution

@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

iamcdn79
Mentor
Mentor

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

0 Likes

Jonathan.Artiss-DSI
Advisor
Advisor

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

0 Likes

iamcdn79
Mentor
Mentor

@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

0 Likes

evo80
Collaborator
Collaborator

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?

0 Likes