Jump to content
sidhu412

Multi Offset with Different Distances

Recommended Posts

sidhu412

Hello,

 

I have a Drawing in which I need to draw thousands of parallel lines (offset) on different distances. Is there anyway or Lisp Routine which can help me to Draw all the offsets at once for each line.

 

see the screenshot below for reference.

 

 

Thank You,

 

 

Regards,

 

 

Sidhu

 

Offset.jpg

Edited by sidhu412

Share this post


Link to post
Share on other sites
RobDraw

This could be done with the copy command if you keep a running total of the distance from the first line.

Share this post


Link to post
Share on other sites
sidhu412
This could be done with the copy command if you keep a running total of the distance from the first line.

 

Thnx for reply, but those are not only the Straight Lines to take the offsets but the Polylines including curves as well. So the copy command will not work.

 

Any other Solution please???

 

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
RobDraw

I'm sorry. Your OP does say "thousands of parallel lines". No mention of other objects.

 

Repeating the offset command only takes a couple of clicks. The tedious part is going to be inputting all of those distances.

Share this post


Link to post
Share on other sites
sidhu412
I'm sorry. Your OP does say "thousands of parallel lines". No mention of other objects.

 

Repeating the offset command only takes a couple of clicks. The tedious part is going to be inputting all of those distances.

 

It's ok no problem, I will keep waiting for other replies. Because I believe this could be done with a LISP Routine.

 

Thanx again.

 

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
RobDraw

Even if you do a get a LISP, you are still going to have to input all those values. In the big scheme of things, it's not really going to save you much time. Repeating the offset command doesn't take much time. Do it a couple of times and you will be a pro and could be getting the job done while you are waiting for someone to write a LISP that will do the repeating for you.

Share this post


Link to post
Share on other sites
ReMark

Would the "Through" option of the Offset command work?

Share this post


Link to post
Share on other sites
RobDraw

How would you specify the distances, ReMark?

Share this post


Link to post
Share on other sites
sidhu412
Even if you do a get a LISP, you are still going to have to input all those values. In the big scheme of things, it's not really going to save you much time. Repeating the offset command doesn't take much time. Do it a couple of times and you will be a pro and could be getting the job done while you are waiting for someone to write a LISP that will do the repeating for you.

 

I know I have to insert all the offset values (which are typical e.g 0.23, 0.01, 0.5, 1.25 etc.....). But currently I m doing it manually so no worries for wastage of time ;). So let's see if some genius can do it for me.

 

 

Thnx,

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
sidhu412
Would the "Through" option of the Offset command work?

 

No....!

because with "Through" you will be able to specify only 1 value each time. whereas I have 4 - 5 different distances to take the offsets.

 

Hope you understand now.

 

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
sidhu412
How would you specify the distances, ReMark?

 

:thumbsup: correct....!

That's what my problem is.

Share this post


Link to post
Share on other sites
RobDraw

If you only have a certain number of distances that will be used multiple times, you could set up buttons with preset offsets.

Share this post


Link to post
Share on other sites
Dadgad
I know I have to insert all the offset values (which are typical e.g 0.23, 0.01, 0.5, 1.25 etc.....). But currently I m doing it manually so no worries for wastage of time ;). So let's see if some genius can do it for me.

 

 

Thnx,

 

Regards,

 

 

Sidhu

 

Whether or not this lisp will do it, I suspect you will be happy to know about it.

 

http://www.lee-mac.com/dynamicoffset.html

 

I haven't used this one of Lee Mac's, but as a student of

history I can only assume it will be as brilliant as all of his, upon which I rely heavily every day.

 

Thanks Lee! :beer:

Share this post


Link to post
Share on other sites
sidhu412
Whether or not this lisp will do it, I suspect you will be happy to know about it.

 

http://www.lee-mac.com/dynamicoffset.html

 

I haven't used this one of Lee Mac's, but as a student of

history I can only assume it will be as brilliant as all of his, upon which I rely heavily every day.

 

Thanks Lee! :beer:

 

 

Thanx for reply, But I have already gone through this link and checked the LISP. It will just draw multiple offsets instead of 1 on both sides of the source line / circle / arc @ the same distance. What I need is to draw offsets only on 1 side @ different distances.

 

Got my point?

 

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
sidhu412
If you only have a certain number of distances that will be used multiple times, you could set up buttons with preset offsets.

 

HOW?????

Will be really appreciated if you can guide me.

 

Regards,

 

Sidhu

Share this post


Link to post
Share on other sites
Dana W

Point already understood. Again, whether or not a program does the offsets, since the distances are random and different, each one will have to be input one at a time.

 

There is the method of using an input text file for a program, but still someone will have to build the file. Writing a program, and building the file still takes more time than just getting it done manually.

Share this post


Link to post
Share on other sites
RobDraw
HOW?????

Will be really appreciated if you can guide me.

 

Regards,

 

Sidhu

 

It's not that hard but I cannot guide you through it as our ribbon is locked down and I cannot test. It shouldn't be very hard. Get one set up and then it's just a matter of making buttons, copying the macro, and adjusting the distances.

Share this post


Link to post
Share on other sites
sidhu412
Thanx for reply, But I have already gone through this link and checked the LISP. It will just draw multiple offsets instead of 1 on both sides of the source line / circle / arc @ the same distance. What I need is to draw offsets only on 1 side @ different distances.

 

Got my point?

 

 

Regards,

 

 

Sidhu

 

Sir,

 

I just tried this, and it really have many cool functions. Now the only thing remaining is "Different Distances".

 

Regards,

 

 

Sidhu

Share this post


Link to post
Share on other sites
asos2000

I think that it is good start

(defun c:mofst (/)
 (setq doc (vla-get-ActiveDocument (setq *acad (vlax-get-Acad-Object)))
spc (if (zerop (vla-get-activespace doc)) (if (= (vla-get-mspace doc) :vlax-true) (vla-get-modelspace doc) (vla-get-paperspace doc)) (vla-get-modelspace doc)))
 (vl-load-com)
 (setq uFlag (vla-startUndoMark doc))
 (setq obj (entsel "\nSelectObject"))
 (setq s (getpoint "\nPick Offset side"))
 (setq o1 (getreal "\nWhat is distence for 1st offset?"))
 (setq o2 (getreal "\nWhat is distence for 2nd offset?"))
 (setq o3 (getreal "\nWhat is distence for 3rd offset?"))
 (vl-cmdf "_.offset" o1 obj s "")
 (vl-cmdf "_.offset" o2 obj s "")
 (vl-cmdf "_.offset" o3 obj s "")
 (setq uFlag (vla-EndUndoMark doc))
 )
(defun *error* (msg) (and uFlag (vla-EndUndoMark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ))

Share this post


Link to post
Share on other sites
RobDraw
If you only have a certain number of distances that will be used multiple times, you could set up buttons with preset offsets.

 

Doesn't anyone make buttons anymore? I haven't done it on the ribbon and really wish I could help out the OP. If someone could guide him to get one set-up with a preset distance, he can make the others easily.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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