sidhu412 Posted August 18, 2014 Posted August 18, 2014 (edited) 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 Edited August 18, 2014 by sidhu412 Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 This could be done with the copy command if you keep a running total of the distance from the first line. Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 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. Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 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. Quote
ReMark Posted August 18, 2014 Posted August 18, 2014 Would the "Through" option of the Offset command work? Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 How would you specify the distances, ReMark? Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 How would you specify the distances, ReMark? correct....! That's what my problem is. Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 If you only have a certain number of distances that will be used multiple times, you could set up buttons with preset offsets. Quote
Dadgad Posted August 18, 2014 Posted August 18, 2014 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! Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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! 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 Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
Dana W Posted August 18, 2014 Posted August 18, 2014 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. Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 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. Quote
sidhu412 Posted August 18, 2014 Author Posted August 18, 2014 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 Quote
asos2000 Posted August 18, 2014 Posted August 18, 2014 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)) Quote
RobDraw Posted August 18, 2014 Posted August 18, 2014 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. Quote
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.