Jump to content

Recommended Posts

Posted

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.

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...