本帖最后由 qiushizhda 于 2015-12-30 17:18 编辑
经常用到move 和 copy 命令,对这两个命令进行小改造:
- (defun c:mx ( / p1)
- (command "move" (ssget) "" (setq p1 (getpoint "\n请点取基点:")) (subst (car (getpoint "\n请点取参考点:")) (car p1) p1))
- (princ)
- )
- (defun c:my ( / p1)
- (command "move" (ssget) "" (setq p1 (getpoint "\n请点取基点:")) (subst (cadr (getpoint "\n请点取参考点:")) (cadr p1) p1))
- (princ)
- )
- (defun c:cx ( / p1)
- (command "copy" (ssget) "" (setq p1 (getpoint "\n请点取基点:")) (subst (car (getpoint "\n请点取参考点:")) (car p1) p1))
- (princ)
- )
- (defun c:cy ( / p1)
- (command "copy" (ssget) "" (setq p1 (getpoint "\n请点取基点:")) (subst (cadr (getpoint "\n请点取参考点:")) (cadr p1) p1))
- (princ)
- )
|