handasa Posted December 11, 2015 Share Posted December 11, 2015 Greetings everybody i want a routine lisp or a method to make these polylines equally spaced as show in the attached image hoping some one to help me saving alot of time of redrawing these polylines which i have alot of them in my drawings thanks in advance sorry for my bad English as it's not first language Quote Link to comment Share on other sites More sharing options...
TheCADnoob Posted December 14, 2015 Share Posted December 14, 2015 Greetings everybodyi want a routine lisp or a method to make these polylines equally spaced as show in the attached image hoping some one to help me saving alot of time of redrawing these polylines which i have alot of them in my drawings thanks in advance sorry for my bad English as it's not first language i would be tempted to just make a block of the new ones and replace the old ones. I think this would probably be about the same amount of time consumed as i assume the call for the script would be per instance of the geometry. Are there aspects of the drawing which would make this not possible? Quote Link to comment Share on other sites More sharing options...
YZ Posted December 14, 2015 Share Posted December 14, 2015 Do you know what the equal distance needs to be? Is it the same every group? Or will some sets have a different equal distance to another set? I could think of a way to write code but you'd still have to click once on each polyline... How many times does the process need to be repeated? Quote Link to comment Share on other sites More sharing options...
handasa Posted December 15, 2015 Author Share Posted December 15, 2015 i will be very grateful if you do ... if there is a lisp i suggest to ask the user for the offset between lines and ask the user to select the lines/polylines to make them spaced by equal distance acquired in the first step Quote Link to comment Share on other sites More sharing options...
handasa Posted December 15, 2015 Author Share Posted December 15, 2015 Do you know what the equal distance needs to be? Is it the same every group? Or will some sets have a different equal distance to another set? I could think of a way to write code but you'd still have to click once on each polyline... How many times does the process need to be repeated? i will be very grateful if you do ... if there is a lisp i suggest to ask the user for the offset between lines and ask the user to select the lines/polylines to make them spaced by equal distance acquired in the first step Quote Link to comment Share on other sites More sharing options...
Dadgad Posted December 16, 2015 Share Posted December 16, 2015 (edited) You will likely find the following http://www.lee-mac.com/dynamicoffset.html helpful. I haven't used this one, but am quite sure there will be something here that will help you. This is just one of the great many wonderful lisps made available, quite generously, to the global cad community on Lee's outstanding site. Thanks Lee! Edited December 17, 2015 by Dadgad Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 17, 2015 Share Posted December 17, 2015 YZ Use a fence option to read all the lines Quote Link to comment Share on other sites More sharing options...
handasa Posted December 17, 2015 Author Share Posted December 17, 2015 you will likely find the following http://www.lee-mac.com/dynamicoffset.html helpful. I haven't used this one, but am quite sure there will be something here that will help you. This is just one of the great many wonderful lisps made available, quite generously, to the global cad community on lee's outstanding site. Thanks lee! it didsn't help much ... Thanks though for your reply this lisp make a copy of the selected lines and offset them as is without offsetting them in between Quote Link to comment Share on other sites More sharing options...
handasa Posted December 17, 2015 Author Share Posted December 17, 2015 yz use a fence option to read all the lines please explain more thanks in advance Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 18, 2015 Share Posted December 18, 2015 I gave YZ a hint on how to pick multiple objects ssget "f" I am out of the office else would have a go at doing something, post a dwg with before and after. YZ. I have a multi fillet lsp any number of lines will post soon on holidays limited internet. Quote Link to comment Share on other sites More sharing options...
kanikaagarwal19 Posted December 18, 2015 Share Posted December 18, 2015 You can use divide command (Draw>Point>Divide) for maintaining equal distance. Let me know if it helps!! Quote Link to comment Share on other sites More sharing options...
RobDraw Posted December 18, 2015 Share Posted December 18, 2015 That will show you equal distances. It will do nothing for assigning or maintaining those distances. The OP is looking for an automated way to move those lines and maintain connectivity. It's gonna require some nifty code. Quote Link to comment Share on other sites More sharing options...
handasa Posted December 18, 2015 Author Share Posted December 18, 2015 You can use divide command (Draw>Point>Divide) for maintaining equal distance.Let me know if it helps!! thanks for interesting... But it seems it won't help much as these lines sre already drawn... All what I need is to offset them by equal distance Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 19, 2015 Share Posted December 19, 2015 Hang in there the answer maybe very easy but I am on holidays and will post a multi fillet lsp that can be modified to do offsets 1st then redo all the line fillets in one go. It really is not that hard if you a re using lines plines will be a problem. As I am moving every day I have limited internet for my laptop. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 21, 2015 Share Posted December 21, 2015 Here is the multi fillet as many as you like pick the 3 points as a L will try soon to add the new lines at an offset. ; Multi fillet of multiple lines in one go ; By Alan H DEC 2015 (defun AH:Fmulti ( / ss fpts num num2 x y) (alert "pick outside-inside-outside") (setq fpts '()) (setq fpts (cons (getpoint "Pick outside")fpts)) (setq fpts (cons (getpoint "Pick inside") fpts)) (setq fpts (cons (getpoint "Pick outside") fpts)) (setq ss (ssget "F" fpts (list (cons 0 "LINE")))) (setq num (sslength ss)) (setq num2 (/ num 2.0)) (if (= (- (fix num2) num2) 0.5) (progn (Alert "you have an odd number of lines please check") (exit) ) ) (setq x 0) (setq y (- num 1)) (setvar "filletrad" 0.0) (repeat (fix num2) ; not a real (setq obj1 (ssname ss x)) (setq obj2 (ssname ss y)) (command "fillet" obj1 obj2) (setq x (+ x 1)) (setq y (- y 1)) ) ) ; defun (AH:fmulti) Quote Link to comment Share on other sites More sharing options...
krishn1234 Posted December 22, 2015 Share Posted December 22, 2015 First you have to make equally distance vertical line. Change position of vertical line. Setq for x and y. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 22, 2015 Share Posted December 22, 2015 Ok part 2 now a multi offset that replaces the number of existing lines with same number of fixed offset lines. ps next post is answer to original post ; change offset lines to fixed spacing ; by Alan H Dec 2015 (defun aH:mulfrom1 ( / pt1 pt2 pt3 num fpts ss1 inc dist) (setq pt1 (getpoint "\nPick outside")) (setq pt2 (getpoint "\nPick inside")) (setq pt3 (getpoint "\nPick outside")) (setq fpts '()) (setq fpts (cons pt1 fpts)) (setq fpts (cons pt2 fpts)) (setq ss1 (ssget "F" fpts)) (setq num (sslength ss1)) (setq y -1) (repeat (- num 1) (command "erase" (ssname ss1 (setq y (+ y 1))) "") ) (setq dist 0) (setq inc (getreal "\nEnter offset distance")) (setq obj (ssname ss1 (- num 1))) (repeat (- num 1) (setq dist (+ dist inc)) (command "_.offset" dist obj pt2 "") ) ) (Ah:mulfrom1) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 22, 2015 Share Posted December 22, 2015 Part 3 original request combine the two. Handasa please try to make new lisp only way to learn. Note the Pt3 request in second code. We are here to help so have a go. Quote Link to comment Share on other sites More sharing options...
handasa Posted January 15, 2016 Author Share Posted January 15, 2016 Part 3 original request combine the two. Handasa please try to make new lisp only way to learn. Note the Pt3 request in second code. We are here to help so have a go. MANY MANY THANKS , Bigal this helped me alot ... if u can modify the previous lisps to run with commands as every time i need to call them i write in autocad (Ah:mulfrom1) or (AH:fmulti) which is sort of hard... and many thanks again this is a great idea Quote Link to comment Share on other sites More sharing options...
handasa Posted January 16, 2016 Author Share Posted January 16, 2016 @Bigal if you can modify these lisps to select lines instead of choosing three points this will be a great ... thanks for your interesting and for everything though 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.