Jump to content

Centre Offset


VisDak

Recommended Posts

Hi All,

 

Good day, is there some of route that will off on that selected a center line and offset side by side and atomatically divided according to distance to be offset to be exact the distance of offset side by side,

 

or possible create a centre line then offset a a distance to be offset side by side exact distance,

 

Please see attached image for your reference,

 

Thanks in advance,

CENTRE OFFSET.jpg

Link to comment
Share on other sites

Hi,

most of your questions are not clear, So could please direct your question to the idea that you wanted?

 

I would be more than happy to help if I could

Tharwat

Link to comment
Share on other sites

Hello Visdak.

 

I do not know if I got you right so this might be what you look for;

 

Command Line:copy;

select objects;

specify the base point:

mtp

specify end point of first line and after that second point of line.

 

I hope that what you wanted.

Tharwat

Link to comment
Share on other sites

Hello,

 

Nice kick Mr.Lee Mac..

 

Is it activeX the language that you have used with this lisp file (doff.lsp) ?

 

I am proud of your programming lisps.

Have a good day.

 

Tharwat

Link to comment
Share on other sites

thanks Lee,

 

Nice route, sorry for my explainations not clear,

Lee is this possible that that the specific distance offset must be on both end line that offset, i mean the offset distance must be not specified on centre line, distance must be divided both side

 

for example :

select line,

specify distance offset " 100 ",

(the selected line must offset on "50" both side) must be divided to 2 equal the distance so that both offseted line are distance to "100"

 

Thanks again,

Link to comment
Share on other sites

Oh, look what the search button found...

 

http://www.cadtutor.net/forum/showpost.php?p=329318&postcount=3

 

Hi Lee

Thanks for this link,

 

I have modified this code to fits my need,

 

(defun c:dOff ( / *error* ofa undo doc ss )

(vl-load-com)

(defun *error* ( msg )

(and undo (vla-EndUndomark doc))

(or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")

(princ (strcat "\n** Error: " msg " **")))

(princ)

)

(if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE")))

(setq of (getdist "\nSpecify Offset Distance: "))

(setq ofa (/ of 2)))

(progn

(setq undo

(not

(vla-StartUndomark

(setq doc

(vla-get-ActiveDocument

(vlax-get-acad-object)

)

)

)

)

)

 

(vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))

(mapcar

(function

(lambda ( o )

(vl-catch-all-apply

(function vla-offset) (list obj o)

)

)

)

(list ofa (- ofa))

)

)

(vla-delete ss)

(setq undo (vla-EndUndoMark doc))

)

)

(princ)

 

Thanks Again :)

Link to comment
Share on other sites

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