TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on June 19, 2006, 05:13:21 PM

Title: block insertion with attribute..
Post by: Andrea on June 19, 2006, 05:13:21 PM
Hi all,

I have a block with an attribute...
But i'm trying to insert this block and show an alert when the block is inserted..
I mean...after entering the attribute..

for the moment i have this.....

Code: [Select]
(command "_.-insert" CBF CBpick CBscale "" pause)


(if
  (while (eq (getvar "CMDACTIVE") 0))
  (alert "1")
)

But the alert comes BEFORE entering the attribute..

any idea how ?
Title: Re: block insertion with attribute..
Post by: Jeff_M on June 19, 2006, 05:23:53 PM
Like so?
Code: [Select]
  (setvar "attreq" 1)
  (setvar "attdia" 1)
  (setvar "cmdecho" 1)
(command "_.-insert" CBF CBpick CBscale "")
  (while (/= 0 (getvar "cmdactive"))
    (command pause)
    )
  (alert "Attributes are done....")
Title: Re: block insertion with attribute..
Post by: Andrea on June 19, 2006, 05:51:52 PM
thanks Jeff....it work.. 8-)

I forgot the attreq variable.. ^-^