PDA

View Full Version : Block insert and explode lisp routine


rayski
2005-05-18, 05:32 PM
I'm trying to create a simple lisp routine to insert and explode a block from a file. The file is the block itself, but need to be exploded to be worked with. I would add an "explode previous" to the routine but the new object is not considered a previous selection. What is the easiest way to accomplish what I need?

-Rayski
Ames, Iowa

scwegner
2005-05-18, 05:45 PM
I'm trying to create a simple lisp routine to insert and explode a block from a file. The file is the block itself, but need to be exploded to be worked with. I would add an "explode previous" to the routine but the new object is not considered a previous selection. What is the easiest way to accomplish what I need?

-Rayski
Ames, Iowa Use "last" instead of "previous". "Last" is the last created visible object, i.e. your block, whereas "previous" is the last created selection set. For example, the difference between the copy of an object and the object being copied.

Mike.Perry
2005-05-18, 11:10 PM
Hi Rayski

Please note I've *moved* this thread from the AutoCAD Customization (http://forums.augi.com/forumdisplay.php?f=118) Forum to this one as I feel this particular Forum is a more appropriate place for such a topic.

Thanks, Mike

Forum Moderator

kennet.sjoberg
2005-05-19, 01:45 AM
Use "last" instead of "previous". "Last" is the last created visible object
If paned or zoomed out "Last" is last in that particular screen position.
To use (entlast) is much more safe, that is the last created object.

: ) Happy Computing !

kennet

CADmium
2005-05-19, 03:21 PM
if you use the Filename with "*" at the begin , the block will explod during the insert-routine
for instance (command "_insert" "*d:\\test.dwg")