Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I have what is probably a simple question that has me stumped. I am working on a macro that resizes my drawing size and then resizes the elements to fit in the new drawing. I then want to export the file out to a CGM file. I do not want to add the filename manually, I want to be able to put the ActiveDoc.name in the command "EXPORT". What I need help with is how do I have the "Path" portion of the EXPORT command use the ActiveDoc.name in the path?
Thanks for any help,
Keith
Sorry for the delay. Busy day.
Below you'll find a macro that should do what you want. What I've found by trial and error is that when you use any of the macro commands that require multiple specifications, you can't build the string in that command. In this case, build your string for the path and assign to a variable. Then use the variable in the export command.
Macro CGM_Export
#Define variables.
Define MyPath as String
Define FullPath as String
#Build path string.
MyPath = "C:\temp\"
FullPath = MyPath + StripExt(ActiveDoc.Name) + ".cgm"
#Export CGM.
Export FullPath "CGM"
End Macro
Trevor,
Thank you for your help. Being new to IsoDraw and their macros your help is greatly appreciated.
One thing I was able to do on this macro is we always save our files as CGM files. So I set my preferences up to always save as a CGM file. This helps with the macro I am writing I just now have to remember to do a save as when I need to keep the ISO file.
Keith
Hi Jessica,
your comment "a macrothat resizes my drawing size and then resizes the elements to fit in the new drawing"
Did you manage to build that macro successfully. Which version of Isodraw did you use?