TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Lupo76 on February 22, 2012, 01:41:09 AM
-
Hello everyone,
sorry for the silly question, but I could not find a solution.
I use the command "copy" in a reactor, so I can not use the (command "_copy" ......) but a function vlisp.
I think the proper function is "vla-CopyObjects" but I have not understand how I use it.
The function that I try to copy an object from p1 to p2
Do you have any advice?
Thanks in advance.
-
use vla-copy/vla-move;<------ instead of vla-copyobjects , totally different
sample
(defun c:test (/ ss p1 p2)
(vl-load-com)
(if (and (ssget "_:L")
(setq p1 (getpoint "\nPick basepoint: "))
(setq p2 (getpoint p1 "\nPick Next point: "))
)
(progn
(vlax-for
itm (setq ss (vla-get-activeselectionset
(vla-get-activedocument
(vlax-get-acad-object))))
(vla-move
(vla-copy itm)
(vlax-3d-point p1)
(vlax-3d-point p2))
)
(vla-delete ss)
)
)(princ)
)
-
You could use something like this as well:
(defun _copyobject
(obj from to
/ result
) )
result
)
)
)
-
You could use something like this as well:
(defun _copyobject
(obj from to
/ result
) )
result
)
)
)
Yeah that too. :-D
-
Thanks to both!