Copy objects using previous basepoint

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys,
I currently have a small LISP program that i wrote that will copy an object to multiple positions and the basepoint would change according to the new position.
Now the problem i have with my LISP program is that when i call up the COPY command, i cannot temporarily disable my snaps after i have selected the new position. When i place an object down and want to copy the object 3000mm to the right (can be any length or direction), it will snap to any other object in the vacinity of the new position.
I have had a look at using the standard COPY command, the only problem with that is if i want it to update my basepoint, i have to pick a basepoint, and then shift-right-click and select "From", then select the basepoint again before i can carry on, and i will have to do this every time i use the COPY command.
Below is the Lisp program, if anybody could help, it would be highly appreciated.
(defun C:BASECOPY( / selset pt xsel)
(defun *error* (msg)
(princ "Error: ")
(princ msg)
(setvar "OSMODE" cosmode)
(command "COLOR" ccolor)
(setvar "CLAYER" curlayer)
(command "LINETYPE" cline)
(setvar "cmdecho" 1)
(princ)
)
(setq cosmode (getvar "OSMODE")
ccolor (getvar "COLOR")
curlayer (getvar "CLAYER")
cline (getvar "LINETYPE"))
(setq selset (ssget))
(setq pt (getpoint "\nSpecify Base Point:"))
(while
(setq xsel (entlast))
(command "COPY" selset "" pt Pause "'_OSMODE" 0)
(setq pt (car (cdr (grread 1 4 1 ))))
(setq pt (getvar "lastpoint"))
(setq selset (ssadd))
(while (/= xsel nil)
(if (/= xsel nil)(setq xsel (entnext xsel)))
(if (/= xsel nil)(ssadd xsel selset))
)
(setvar "OSMODE" cosmode)
)
(princ)
)