Edit attribute within nested block script

Edit attribute within nested block script

leeUT3Y6
Enthusiast Enthusiast
1,080 Views
3 Replies
Message 1 of 4

Edit attribute within nested block script

leeUT3Y6
Enthusiast
Enthusiast

Hi, 
I found a script by Lee Mac on the forum for changing a nested block attribute with a lisp.
I'm trying to change it so instead of predefined set of values, the script will ask you for a block, and then ask you for the value you would like set in its nested attribute.
I'm new to LISP and no luck so far.
The original scrip and the modified are attached.
Please help

BR
Lee

0 Likes
Accepted solutions (2)
1,081 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

All you need is this to change in original code:

 

  (initget 1)
  (setq int (getint "\nEnter an integer: "))
  (setq data (list (cons "MYATT" (itoa int))))
;;; '( ;;; ("NUM" . "1") ;;; ("ID" . "01/12/2011") ;;; ("ADRESS" . "FOR REVIEW") ;;; ("CODE" . "MAL") ;;; ("ROOMNR" . "01/12/2011") ;;; ) ;;; )

 

0 Likes
Message 3 of 4

leeUT3Y6
Enthusiast
Enthusiast
Accepted solution

Thanks! It Works!
I prefer it first to ask for the block, and then for the attribute.
The code is attated.

Message 4 of 4

ВeekeeCZ
Consultant
Consultant

You got it, cool!

0 Likes