Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun c:mOff (/ ss tmp safe lst)
- (vl-load-com)
- (or *moff (setq *moff 10.0))
- (setq doc (vla-get-ActiveDocument
- (vlax-get-acad-object)))
- (if (setq ss (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))))
- (progn
- (initget 6)
- (and (setq tmp (getdist (strcat "\nSpecify Offset <" (vl-princ-to-string *moff) "> : ")))
- (setq *moff tmp))
- (vla-StartUndoMark doc)
- (foreach var (mapcar (function (lambda (x) (vla-offset x *moff)))
- (mapcar 'vlax-ename->vla-object
- (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))))
- (cond ((<= 0 (vlax-safearray-get-u-bound
- (setq safe (vlax-variant-value var)) 1))
- (setq lst (cons (vlax-safearray->list safe) lst)))))
- (foreach Obj (setq lst (apply 'append lst))
- (if (vl-some
- (function
- (lambda (x)
- (vlax-invoke obj 'IntersectWith x acExtendNone)))
- (vl-remove Obj lst))
- (vla-put-color Obj acred)))
- (vla-EndUndoMark doc)))
- (princ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement