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.
Thank you !
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 !
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.
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 !
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.