Message 1 of 3
COPY IN THE SPACE AND PASTE IN WORLD UCS

Not applicable
10-25-2016
09:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im working in my second lisp. Its a very simple series of commands: with some objects rotate in a random space, the idea is to put the ucs with a face of the objects, copy them, return in the world ucs and paste the original objets oriented in the world ucs.
My first lisp was this:
(DEFUN c:CW ( / P1 P2 P3 ) (SETQ P1 (GETPOINT "\nSelect first UCS point")) (SETQ P2 (GETPOINT "\nSelect second UCS point")) (SETQ P3 (GETPOINT "\nSelect third UCS point")) ;click the 3 ucs points (command "_ucs" "_3p" "_non" P1 "_non" P2 "_non" P3) ; rotate the ucs in the objects plane (command "_select" pause ) ; select objects to copy (command "_copyclip" "_p" "" ) (command "_ucs" "_w") ; return in world ucs (command "_pasteclip" ) ; paste objects in the world ucs (PRINC) )
but the paste objets is not close to the insert point of the paste command. To solve it i was thinking to use the "copybase" command in this way:
(DEFUN c:CW1 ( / P1 P2 P3 P4 P5 ) (SETQ P1 (GETPOINT "\nSelect first UCS point")) (SETQ P2 (GETPOINT "\nSelect second UCS point")) (SETQ P3 (GETPOINT "\nSelect third UCS point")) ;click the 3 ucs points (SETQ P4 (GETPOINT "\nSelect base point of the copy objects")) ;click the base point (command "_ucs" "_3p" "_non" P1 "_non" P2 "_non" P3) ; rotate the ucs in the objects plane (command "_select" pause ) ; select objects to copy (command "_copybase" "_non" P4 "_p" "" ) (command "_ucs" "_w") ; return in world ucs (SETQ P5 (GETPOINT "\nSelect base point to paste the objects")) ;click the base point (command "_pasteclip" "_non" P5 ) ; paste objects in the world ucs (PRINC) )
but when i paste the objects are invisible and i paste them in a custom position in the layer (also if its asking me the base point in the copybase command.
Im a rookie, i must forgive something, so i will be glad for any help.