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: 

extract toolpath folder in project folder

5 REPLIES 5
Reply
Message 1 of 6
karan30782
545 Views, 5 Replies

extract toolpath folder in project folder

HI, There !

I'm exploring through a macro that must create folders in "Nc programs" explorer.
Folders are already in "Toolpath" explorer.

And these "Nc programs" folder must be created in Project > Ncprograms.


I'm working on this code below ...........

// macro start ===========

 

 

STRING $dirpath = project_pathname(0) + "/ncprograms/"
MKDIR $dirpath
EXPLORER SELECT TOOLPATH ROOT


STRING LIST TPFOLDERS = get_folders('TOOLPATH')
FOREACH tp IN TPFOLDERS {

CREATE FOLDER project_pathname(0) + '\ncprograms\' $tp


}

 

 

can someone add their idea, where I'm wrong.

 

11.JPG

 

Thank you !

5 REPLIES 5
Message 2 of 6

Hi,

TRY THESE MACROS. HOPE WILL HELP.

 

THANK YOU.

Message 3 of 6

Thanks for replying,

With your code It extract folders from "toolpath" to "nc program".

That's fabulous.

But, even after so many attempt I'm unable to create those folder in project > ncprogram (folder)

 

Thanks again !

Message 4 of 6

Hello,

you have to save your project and run the "02_folder_matching.mac". Afterward when you write your NCPROGRAM it will be written in the same position (tree) in ncprogram file.

Message 5 of 6

Hi ! @kmarkopouliotis 

 

I just followed th steps and it worked somewhat.

I still didn't got final solution and yet working on it.

 

But, anyway your code helped me alot.

 

Thank you !

Message 6 of 6
kl1445
in reply to: karan30782

Hi

I had the same problem before, but I have solved it, I hope you can use it

 

STRING $dirpath = project_pathname(0) +"/ncprogram"+"/"
MKDIR $dirpath
EXPLORER SELECT TOOLPATH ROOT

 


STRING $path = project_pathname(0) + "/ncprogram"
MKDIR $path


EDIT NCPROGRAM ALL FOLDER PROJSELECTOR $path

 

NCGLOBAL APPLY
NCGLOBAL ACCEPT

 

 

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

Post to forums  

Autodesk Design & Make Report