cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Problems with "Save Layers" command and variables.

thendricks
3-Visitor

Problems with "Save Layers" command and variables.

If I open an existing .iso file run a command like the example below everything works fine. Save Layers "C:\temp\test.iso" "Art" The problem is that I am trying to set up a macro so I can run this on multiple files. I have the batch assign the current file name to a variable and then loop through the layers creating a string including "'" within the string. When I input these into the save layers command I end up with a generic "String expected" error. I've tried different approaches to feeding the command, but to no avail. Any suggestions? The code is below (seems ridiculous that I can't attach an .ism file considering this is the macro forum): Macro Update Define FilePath as String Define FileName as String FileName = ActiveDoc.Name Define SaveFile as String #Sets values of variables. i = ActiveDoc.LayerCount CurrentLayer = ActiveDoc.Layers[i] #Starts loop that goes through all existing layers and locks and makes visible each. While (Exists(CurrentLayer) = True) LayerName = LayerName + " '"+CurrentLayer.Name+"'" CurrentLayer = CurrentLayer.PreviousSibling End While Save Layers "'C:\Convert\"+FileName+"' "+LayerName End Macro
1 REPLY 1

I've almost solved the problem below but need one more piece to the puzzle. Is there a way to reload macros, during the execution of a macro, without terminating the current macro? Debug reset is close but it stops the macro from running. Any suggestiongs?
Announcements