Jump to content

Recommended Posts

Posted

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?

Posted

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))

Posted

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';\

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...