Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

May I use Lisp to open a new file in CAD 2004?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
181 Views, 2 Replies

May I use Lisp to open a new file in CAD 2004?

(command "open" "")........can not work

I have a lisp I want to run it on every DWG
Is there any good Lisp example?

thanks
homling
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

You need to run a LISP inside many drawing files, without necessarily
opening each file yourself, and your LISP requires no user input?

Then create a simple SCRIPT file calling your lisp, then use the free
SCRIPTPRO utility that is part of Migration Assistance (either on your
product CD, or Autodesk's website), select the DWG files you want, then
select the script file.

HELP in AutoCAD explains script files.

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 3 of 3
Anonymous
in reply to: Anonymous

This was posted by Frank Whaley eons ago:

(defun cmdOpen (name)
(vl-load-com)
(if (= 0 (getvar "SDI"))
(vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) name))
(vla-sendcommand
(vla-get-activedocument
(vlax-get-acad-object))
(strcat "(command \"_.OPEN\")\n" name "\n") )
)
)

--
jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services

In article , Homhsu wrote:
> (command "open" "")........can not work
>
> I have a lisp I want to run it on every DWG
> Is there any good Lisp example?
>
> thanks
> homling
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost