Nil used in a list

BobBuilder

Usenet Archive
Joined
Aug 6, 2003
Messages
23
Reaction score
0
Hi,

am trying to create a lisp to insert a block to redefine an existing one, then to exit from the command without actually inserting the new block. then i want to close and save the drawing. I have no idea what i am doing but here is what i have so far:- ;BEGIN SCRIPT (command "-insert" "a0=" nil) (command "-insert" "a1=" nil) (command "-insert" "a2=" nil) (command "-insert" "a3=" nil) qsave ;END SCRIPT

but when i run the script and it get to nil it totally stops the lisp file. any ideas?
 
Try using control C to instead of nil to exit the insert command. (command "_.insert" (strcat blk (chr 61) fl2) ^c)
See if that helps.

Bill
 
Perhaps the script will perform better if you

(command "-insert" "a0=") (command)

?

BobBuilder said:
Hi,
am trying to create a lisp to insert a block to redefine an existing one, then to exit from the command without actually
inserting the new block. then i want to close and save the drawing. I have no idea what i am doing but here is what i have so far:- ;BEGIN SCRIPT (command "-insert" "a0=" nil)
 
Any cancel in a script will stop the script.  Stop thinking like a

drafter and more like a programmer.  Instead of cancelling,

go ahead and insert it and then erase it.  The script will

take almost no more time.  LISP is not required for such

a simple task and just complicates things.

"BobBuilder" <> wrote:

Hi,

am trying to create a lisp to insert a block to redefine an existing one, then to exit from the command without actually inserting the new block. then i want to close and save the drawing. I have no idea what i am doing but here is what i have so far:- ;BEGIN SCRIPT (command "-insert" "a0=" nil) (command "-insert" "a1=" nil) (command "-insert" "a2=" nil) (command "-insert" "a3=" nil) qsave ;END SCRIPT

but when i run the script and it get to nil it totally stops the lisp file. any ideas?
 
Insert blahblah= 0,0 1 1 0

erase l

insert blahblah2= 0,0 1 1 0

....

"BobBuilder" <> wrote:

Ok what do you recommend, i have hundreds of drawings to do?
 
Make that

erase (entlast)

 

Using "L" will only catch

those objects on the screen.

 

Either that or zoom and use an insertion point

that you know will be on the screen of each drawing.

"Doug Broad" <> wrote:

Insert blahblah= 0,0 1 1 0

erase l

insert blahblah2= 0,0 1 1 0

....

"BobBuilder" <> wrote:

Ok what do you recommend, i have hundreds of drawings to do?
 
Or... (if and only if a part of the block appears @ viewctr <center of screen>)

Insert blahblah= (getvar"viewctr") 1 1 0
erase l

- Doug's method will find the block in the Database - instead of the Display! Use his...(it's better)... but knowing this variation will help you grasp Why his works one way, and this another.
 
Back
Top