Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

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

How to ncopy multiple at same place or pause the ncopy command?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
darkfprh
654 Views, 4 Replies

How to ncopy multiple at same place or pause the ncopy command?

Hi I want to copy some entities from xref and paste same place.

 

(command "ncopy" pause pause "0,0" "0,0")

 

So I tired to pause the command until selection in over.

But select multiple entities, it doesn't work... Please help me

4 REPLIES 4
Message 2 of 5
ВeekeeCZ
in reply to: darkfprh

Not so easy to do. Possibly like this

 

(while (setq e (cadr (nentsel))) (command "ncopy" e "" "" ""))

 

But is it really necessary? I mean, how difficult is it to hit enter a couple of times.

 

Anyway, just a few threads lower @pbejse posted a nice example of code how this could be done without the need to fight with ncopy. HERE 

 

(vl-load-com)
(defun c:demo (/ obj tmp)
  (while (setq obj	(nentselp "\nSelect object to copy "
		) ;_ end of nentselp
      )
    (progn
      (setq tmp (entmakex (entget (car obj))))
      (vla-transformby
	(vlax-ename->vla-object tmp)
	(vlax-tmatrix (caddr obj))
      )
      (Vla-put-layer (vlax-ename->vla-object (entlast)) (getvar 'clayer))
    )
  )
)

 

Message 3 of 5
darkfprh
in reply to: ВeekeeCZ

Thank you so much! It works well 🙂

Message 4 of 5
cadomatic
in reply to: ВeekeeCZ

very nice!
is there a way to select all objects in the selected object layer and transform them in one click?
Message 5 of 5
ancrayzy
in reply to: cadomatic

Thank you so much.

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