juicequad Posted March 21, 2009 Share Posted March 21, 2009 was wondering if anyone can help with a 2foot offset button. i want the 2foot offset then change the offset to the object layer i have ^C^C_offset 2' where do i go from there? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 22, 2009 Share Posted March 22, 2009 In VL, it may look like this: (defun c:2off (/ ss) (vl-load-com) (if (setq ss (ssget (list (cons -4 "<NOT") (cons 0 "INSERT,VIEWPORT") (cons -4 "NOT>")))) (progn (foreach obj (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) (mapcar 'vla-put-layer (vlax-safearray->list (vlax-variant-value (vla-offset obj 2))) (list (vla-get-layer obj))))) (princ "\n<!> Nothing Selected <!>")) (princ)) Quote Link to comment Share on other sites More sharing options...
Cad64 Posted March 22, 2009 Share Posted March 22, 2009 The Offset command already has an option for moving the offset entity to the current layer. Just watch the command line. Example: Command: OFFSET Specify offset distance or [Through/Erase/Layer] : L Enter layer option for offset objects [Current/Source] : C Specify offset distance or [Through/Erase/Layer] : 2' You could automate this with a simple macro like this: ^C^C_offset;L;C;2';\ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.