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

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

darkfprh
Advocate Advocate
2,293 Views
4 Replies
Message 1 of 5

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

darkfprh
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
2,294 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant
Accepted solution

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
Advocate
Advocate

Thank you so much! It works well 🙂

0 Likes
Message 4 of 5

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

ancrayzy
Advocate
Advocate

Thank you so much.

0 Likes