Output File Extension

Output File Extension

hrh46
Advocate Advocate
1,986 Views
12 Replies
Message 1 of 13

Output File Extension

hrh46
Advocate
Advocate

My output file extension is .tap by default. but Drilling g-codes are outputted without extension or not .tap

I have a macro for manipulating nc programs(g-codes) and does not work for none .tap files. does anybody know how can I force all outputs for   .tap or changing extensions to .tap by a macro?

thanks in advance.

0 Likes
Accepted solutions (1)
1,987 Views
12 Replies
Replies (12)
Message 2 of 13

TK.421
Advisor
Advisor

have you tried this code in your macro?

EDIT NCPROGRAM PREFERENCES EXTENSION "tap"

 

I run that to change my extensions at the beginning of my posting macros


the numbers never lie
0 Likes
Message 3 of 13

hrh46
Advocate
Advocate

Thank you for quick reply. I never used it before. I will test it tomorrow.

Thanks again.

0 Likes
Message 4 of 13

Jonathan_Artiss19
Advisor
Advisor

You can modify your post to output a specific file extension. Add the below to your script tab inside the post. 

 

OutputExtension = "tap";

Jonathan Artiss
Senior Applications Engineer | DSI

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

0 Likes
Message 5 of 13

Sean571
Advocate
Advocate

@Jonathan_Artiss19  The problem with doing that way is that now the "Open file in external program" button in the right click menu won't work if they don't also change the output file extension in the settings as well. 
So I guess the best solution would be to just set it in the post and in PowerMill ¯\_(ツ)_/¯

Sean Wroblewski
Applications Engineer

0 Likes
Message 6 of 13

hrh46
Advocate
Advocate

Many Thanks to all experts who shared their knowledge in this post. As I started this post, I found that only some ncprograms have the extension problem. I have a macro creating drilling toolpaths and ncprograms  automatically get their name from toolpaths  name. if hole size is not Integer and is real number we get toolpath name as “ Drill 10.5 “ the point in the toolpath name (from hole size) is therefore in ncprogram and when is post processed output g-gode file has no extension. So logically the remedy my be as:

  • Macro to check all outputted g-code files to check if they have not “.tap” at the end of name then add “.tap” at the end.
  • Forcing post processor to add “.tap”  at the end of file name even there is a dot “.” In the file name.

Again thanks to all experts, waiting from you which is the best way.

0 Likes
Message 7 of 13

Jonathan_Artiss19
Advisor
Advisor
Accepted solution

@hrh46 

 

This is totally up to you, it all depends on how many post's you have to maintain and switch to. There are macro approaches to set up any and all post-preference settings for a specific machine tool, and there are also foolproof ways to set it up. 

A macro approach is good if you need to setup specific things like, MTD models, post's, tool database, output location etc. 

You can try the method of having all post's in one directory, then point PowerMill to this location. Use the options in your PowerMill session to change the output type for each post. 

JonathanArtissDSI_0-1692130927816.png

 

You could use my preferred method, which, as @Sean571 mentioned, there is a flaw if you need to launch your code from inside PowerMill, personally, I see more upside to this than down. If I need to open my code for review, I can launch it from my File Explorer of open it from my notepad or text edit software. Use a script to force the output type required for each post. This way it's the same across the shop floor for whomever uses the post. Open your post, go to script, click on script on the upper left and paste in the below. 

OutputExtension = "tap"; 

JonathanArtissDSI_1-1692131725944.png

 

Jonathan Artiss
Senior Applications Engineer | DSI

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

0 Likes
Message 8 of 13

Jonathan_Artiss19
Advisor
Advisor

@hrh46 

 

Last ping, here is a link to an article I just published on this topic. It's got a step-by-step workflow on setting this up inside your options. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

0 Likes
Message 9 of 13

hrh46
Advocate
Advocate

Hi  Jonathan.Artiss , thanks for your clear and kindly reply. I tested your solution and it works . I ac...

anyhow I am not professional as you, but I handled a macro by another person and edited it to add a ".tap" to end of files if they don't have it, and my file become " Drill 8.5.tap" and works fine for me.

thanks a lot to all persons share their knowledge.

 

0 Likes
Message 10 of 13

Jonathan_Artiss19
Advisor
Advisor

I'd recommend removing the "." from the NC program name.

Jonathan Artiss
Senior Applications Engineer | DSI

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

0 Likes
Message 11 of 13

hrh46
Advocate
Advocate

How?

0 Likes
Message 12 of 13

hrh46
Advocate
Advocate

How ?

0 Likes
Message 13 of 13

Jonathan_Artiss19
Advisor
Advisor

If your NC Program name is "8.5mm hole" for example, PowerMill and the post would see the name as "8" and the file extension would be "5mm hole" rather than .tap

To correct this, you need to remove the "." between the 8 and the 5. 

Jonathan Artiss
Senior Applications Engineer | DSI

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

0 Likes