TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: amc.dicsac on September 26, 2017, 02:34:34 PM
-
Hi, how are you? I need your help.
I want to make a lisp do the same as this script
_.
open "C:\My Folder\Drawing1.dwg" _.circle
0,
0,
0 5 _.save _Y _.
close
if anyone has an idea how to do it.
-
LISP only runs in the current document; if you start it from one document it cannot switch to another, so you cannot do this by following commands.
You can use VLISP and ObjectDBX to access the DWG file without opening it in the editor, add the entity, and then save and close.
That's a *very* basic example - is there some specific task you're building up to?
-
You can achieve this using microsoft excel. Please check attached Files. There are two files :-
(1.) LISP file which contains the commands which you want to run on multiple AutoCAD Files.
(2.) Excel File containing VBA macro which asks you to select one or multiple AutoCAD Files to run the selected LISP.
Source :
https://www.theswamp.org/index.php?topic=52112.0 (https://www.theswamp.org/index.php?topic=52112.0)
-
One cannot pronounce LISP without Lee:
( (not LM:ODBX
) (prompt "\nPlease load Lee's Object DBX wrapper.") ) (
(LM:ODBX
)
(list "C:\\My Folder\\Drawing1.dwg") T ; Save
)
)
)
The above code requires Lee's ObjectDBX Wrapper (http://lee-mac.com/odbxbase.html) loaded.
-
One cannot pronounce LISP without Lee:
the 11th commandment :-D
-
mailmaverick. That was pretty slick. Its amazing all the different ways one can batch drawings.
Excel Batching
Lee's OBDX Wrapper
Script Pro
acaddoc.lsp
I know there are more ways. Just naming some that I like to use.