Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

looking for a lispfile that will move some attributes

1 REPLY 1
Reply
Message 1 of 2
hansx
170 Views, 1 Reply

looking for a lispfile that will move some attributes

Hi,

I'm looking for a lispfile that will move some attributes to a specific height and centre them on the insertionpoint of the block

for example, I will select the block, and 3 attributes with the TAG DESCRIPTION1, DESCRIPRTION2 and DESCRIPTION3 must be centered by the insertionpoint of the original block and after that they must be moved to for eample the height Y=250 for DESCRIPTION1, the height Y=245 for DESCRIPTION2 and the height Y=240 for DESCRIPTION3 for the X value I must take the X value from the block what is selected.

can somone help me with this?

Thanks
1 REPLY 1
Message 2 of 2
st0neface
in reply to: hansx

without any error checking, but should you turn into the right direction:



(setq en (car (entsel)))
(setq p1 (cdr (assoc 10 (entget en))))

(setq y1 (car p1)
x1 (cadr p1)
y2 250.0 ;or relative to block insertion: y2 (+ y1 250)
y3 245.0
y4 240.0
at1 (entnext en)
at2 (entnext at1)
at3 (entnext at2)
atl1 (entget at1)
atl2 (entget at2)
atl3 (entget at3)
)

(setq atl1 (subst (cons 10 (list y2 x1 0.0))(assoc 10 atl1) atl1)
atl2 (subst (cons 10 (list y3 x1 0.0))(assoc 10 atl2) atl2)
atl3 (subst (cons 10 (list y4 x1 0.0))(assoc 10 atl3) atl3)
)
(entmod atl1)
(entmod atl2)
(entmod atl3)

(princ)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost