nmulder Posted July 2, 2009 Posted July 2, 2009 I am pretty new to AutoCad programming. I've become fairly familiar with AutoLisp, but have no idea where to start with VBA. Here is what I am trying to achieve: After running the AECTOACAD (or EXPORTTOACAD) command, I want the routine to automatically open the created file and closes the current drawing. I currently have a routine that runs the AEC command with options (not binding xrefs, for one). I want the routine to also open the created file--which is the file name with "1-Export-" as a prefix. I haven't been able to figure out how to do this using LISP, and have found some opinions that say VBA is the way to go for this one. Any help would be greatly appreciated. Thanks. Quote
BIGAL Posted July 3, 2009 Posted July 3, 2009 You could do it with lisp I would use a script to make it work the trick is though to use lisp to write the script ! Get the name of the drawing and as you know the new name of the exported dwg you can write this into a script file, very simply not actual code! (lisp to get acad dwgname) (setq new aecexportname etc) (write script runmynewdwg) last line of lisp is (command "script" runmynewdwg) runmynewdwg.scr = close dwg etc if required Open 1-export-newdwg Quote
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.