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

copy selected objects to selected points

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
cool.stuff
1188 Views, 3 Replies

copy selected objects to selected points

Hi!

 

I need a lisp to copy selcted objects to selected points.

 

I've found this:

 

https://www.cadtutor.net/forum/topic/50163-copy-and-paste-on-multiple-points/

 

The proble is that if I use a diferent ucs it assumes the global not the local, I think..

 

Can someone help please?

 

Many thanks!

Tags (1)
Labels (1)
3 REPLIES 3
Message 2 of 4
ВeekeeCZ
in reply to: cool.stuff

Try this change

(setq pt (cdr (assoc 10 (entget entpt))))

 

to 

(setq pt (trans (cdr (assoc 10 (entget entpt))) 0 1))

 

Tags (1)
Message 3 of 4
cool.stuff
in reply to: ВeekeeCZ

It works like a charm! :))

 

Many thanks!!!

Message 4 of 4
stevor
in reply to: cool.stuff

If trans worked, and you have more to do, 

this old subr is the same:

 

; return UCS coords
(DeFun Dxf_EU (gn edL / vv )
 (if (and (setq vv (cdr (assoc gn edL)))
               (member gn (list 10 11 210 )))  ; others  codes may exist
   (trans vv (cdr (assoc -1 edl)) 1) vv ) )  ; 

S

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report