crazyman0005 Posted August 29, 2008 Share Posted August 29, 2008 Hi I have taught myself a few minor things about Macros and can create small macros but i was wondering if you could answer a few questions about them One thing is that i can make a macro to save a DWG as a certain name like ''temp.dwg'': (^c^c_saveas temp) but i am trying to find out how to do somthing like make it more dynamic ie. if i open a drawing called temp.dwg i would like it to make it save as the existing name and then ''REV 1'' as a suffix so it would be ''tempREV 1.dwg'' But then be able to open another drawing ''tempxyz.dwg'' and then, using the same macro, save it as ''tempxyzREV 1.dwg'' Any help on this subject would be really helpfull as i am just starting to understand macro's thanks Mike Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 29, 2008 Share Posted August 29, 2008 Try something like this, using LISP (setq dn (getvar "dwgname")) (command "._saveas" "" (strcat (substr dn 1 (- (strlen dn) 4)) "REV 1")) Quote Link to comment Share on other sites More sharing options...
crazyman0005 Posted August 29, 2008 Author Share Posted August 29, 2008 hmm all this talk about LISP... i have no idea what it is i only started macro's yesterday... but ok i will have a look and google it etc but thank you in advance Quote Link to comment Share on other sites More sharing options...
crazyman0005 Posted August 29, 2008 Author Share Posted August 29, 2008 ok... have now got the idea with LISP... but how do you give it a command? iv created the file exactly like what you have said but it just says: Command: _appload Zone.lsp successfully loaded. Command: ; error: malformed list on input ...when i try to load it... :S thanks Quote Link to comment Share on other sites More sharing options...
crazyman0005 Posted August 29, 2008 Author Share Posted August 29, 2008 woot! all done... forgot the ending bracket at the end of the command thanks all Quote Link to comment Share on other sites More sharing options...
crazyman0005 Posted September 9, 2008 Author Share Posted September 9, 2008 ok now i have managed to add the ''rev1 to it... is is possable to make a LSP that can tell if it is ''rev1'' and i press the command it will save it as ''rev2''? and then ''rev3'' etc etc etc... is this possable? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.