Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
New Member
1 Posts
0 Kudos
Registered: ‎03-25-2009
Post 1 of 2

looking for a lispfile that will move some attributes

64 Views, 1 Replies
03-25-2009 01:40 PM
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
Active Contributor
35 Posts
0 Kudos
Registered: ‎03-17-2009
Post 2 of 2

Re: looking for a lispfile that will move some attributes

03-26-2009 03:17 AM 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)

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post