daiharv Posted October 3, 2006 Share Posted October 3, 2006 Is there a multiple offset commnad? I'm using AutoCA 2007 (Full). If not maybe some LSP routine? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 3, 2006 Share Posted October 3, 2006 It's always wise, with new software, to check under "Help" to see if there have been any improvements to commands. Yes, there is a "multiple" option available in AutoCAD 2007. The exact text reads: "Specify point on side to offset or [Exit/Multiple/Undo]." At this prompt, type "M" for multiple. The next prompt will read: "Specify point on side to offset or [Exit/Undo] ." That's where you pick the second object you wish to offset. However, keep in mind, the offset distance will be the same as it was for the first object. Quote Link to comment Share on other sites More sharing options...
daiharv Posted October 3, 2006 Author Share Posted October 3, 2006 In that case call me wise! Unfortunately what you I may have not maid clear enough for some people, is that I needed to be able select multiple objects to offset in one go, not have to select one object, then offset, than another object, which would only be marginally quicker than the ordinary select. Thankfully others did understand what I was after and sent through a lsp routine (see below). ;| OFFSET POLYLINES mfuccaro@hotmail.com September 2003 |; (defun c:pof( / plines ; selection set of polylines ext ; extrnal point dist ; distance to offset poly ; a polyline from plines plist ; the list of poly del ; polyline to delete int ; internal point i) (command "undo" "begin") (princ "select polylines") (setq plines (ssget) i 0 ext (getvar "limmax") dist (getdist "distance")) (repeat (sslength plines) (setq poly (ssname plines i)) (setq plist (entget poly)) (command "offset" dist poly ext "") (setq del (entlast) int (polar (cdr (assoc 10 (entget del))) (angle (cdr (assoc 10 (entget del))) (cdr (assoc 10 plist))) (* 2 (distance (cdr (assoc 10 plist)) (cdr (assoc 10 (entget del))))))) (command "offset" dist poly int "") (entdel del) (setq i (1+ i))) (command "undo" "end") (if (= "Y" (strcase (getstring "\ndelete initial polylines? (Y/N)"))) (command "erase" plines "")) ) Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 3, 2006 Share Posted October 3, 2006 Sorry mate, my mistake. Glad to see someone rode to your rescue. Always a good day when one learns something new. Thank you mfuccaro. Quote Link to comment Share on other sites More sharing options...
fuccaro Posted October 4, 2006 Share Posted October 4, 2006 Quote Link to comment Share on other sites More sharing options...
cntrk77 Posted July 31, 2007 Share Posted July 31, 2007 In that case call me wise! Unfortunately what you I may have not maid clear enough for some people, is that I needed to be able select multiple objects to offset in one go, not have to select one object, then offset, than another object, which would only be marginally quicker than the ordinary select. Thankfully others did understand what I was after and sent through a lsp routine (see below). ;| OFFSET POLYLINES mfuccaro@hotmail.com September 2003 |; (defun c:pof( / plines ; selection set of polylines ext ; extrnal point dist ; distance to offset poly ; a polyline from plines plist ; the list of poly del ; polyline to delete int ; internal point i) (command "undo" "begin") (princ "select polylines") (setq plines (ssget) i 0 ext (getvar "limmax") dist (getdist "distance")) (repeat (sslength plines) (setq poly (ssname plines i)) (setq plist (entget poly)) (command "offset" dist poly ext "") (setq del (entlast) int (polar (cdr (assoc 10 (entget del))) (angle (cdr (assoc 10 (entget del))) (cdr (assoc 10 plist))) (* 2 (distance (cdr (assoc 10 plist)) (cdr (assoc 10 (entget del))))))) (command "offset" dist poly int "") (entdel del) (setq i (1+ i))) (command "undo" "end") (if (= "Y" (strcase (getstring "\ndelete initial polylines? (Y/N)"))) (command "erase" plines "")) ) Dear sir, Thanks for your lisp code but i would like to ask you it is possible to select external offset instead of internal? Regards. Quote Link to comment Share on other sites More sharing options...
cntrk77 Posted July 31, 2007 Share Posted July 31, 2007 Hi, i have loaded your multiple offset lisp code succesfully but it offset internal we cannot offset to outside. How can we solve this problem is it possible to choose int or external? Best Regards, ilke Quote Link to comment Share on other sites More sharing options...
fuccaro Posted July 31, 2007 Share Posted July 31, 2007 Here is a quick and dirty fix: (defun c:pof1 (/ plines ; selection set of polylines ext ; extrnal point dist ; distance to offset poly ; a polyline from plines plist ; the list of poly del ; polyline to delete int ; internal point i) (command "undo" "begin") (princ "select polylines") (setq plines (ssget) i 0 ext (getvar "limmax") dist (getdist "distance") ) (repeat (sslength plines) (setq poly (ssname plines i)) (setq plist (entget poly)) (command "offset" dist poly ext "") ;(setq del (entlast) ;int (polar ;(cdr (assoc 10 (entget del))) ;(angle ;(cdr (assoc 10 (entget del))) ;(cdr (assoc 10 plist))) ;(* 2 (distance (cdr (assoc 10 plist)) ;(cdr (assoc 10 (entget del))))))) ;(command "offset" dist poly int "") ;(entdel del) (setq i (1+ i)) ) (command "undo" "end") (if (= "Y" (strcase (getstring "\ndelete initial polylines? (Y/N)")) ) (command "erase" plines "") ) ) Quote Link to comment Share on other sites More sharing options...
cntrk77 Posted July 31, 2007 Share Posted July 31, 2007 Million times thanks for your kind reply. Warm Regards, ilke Quote Link to comment Share on other sites More sharing options...
ChrisCMU Posted December 3, 2007 Share Posted December 3, 2007 This works nice, but the only problem I saw is that it does not trim the lines like offsetting a polyline does automatically. I'd like to be able to select multiple lines, offset them all inward at a specified distance, and have them trimmed automatically. The result could be one polyline or multiple lines, I don't care. I could snap to the current lines, make a new polyline and offset it. Or offset each line and do a 0 degree fillet on all the corners. Unfortunately this process has to be done thousands of times so any step savers would be great. Any ideas? Quote Link to comment Share on other sites More sharing options...
CAB Posted September 27, 2008 Share Posted September 27, 2008 FYI, I modified the code posted over here. http://forums.cadalyst.com/showthread.php?t=6194&goto=newpost Quote Link to comment Share on other sites More sharing options...
kevsta69 Posted March 31, 2009 Share Posted March 31, 2009 hi all, great lisp command, is there anyway of adding into that command to be able to get the offset to go to current layer, i have this function for single offsets but would be great for multi object offsets, thanks Quote Link to comment Share on other sites More sharing options...
CAB Posted April 1, 2009 Share Posted April 1, 2009 I think it goes to current layer. Quote Link to comment Share on other sites More sharing options...
4ever Posted January 16, 2010 Share Posted January 16, 2010 Thanks CAB, it works great for offsetIN, but offsetOUT, I can't choose the current layer to offset, could you please help me with this. Best Regards, Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 19, 2010 Share Posted January 19, 2010 Did the multi line filleting get added ? it can be quite easily done for any amount of lines must though have an equal number on both sides but offset distances can be anything just draw a line over the first group and 2nd line continue over other group. You can then create two lists of points which are used with the fillet command. If you need more info let me know. Quote Link to comment Share on other sites More sharing options...
4ever Posted January 19, 2010 Share Posted January 19, 2010 Thanks Bigal, the lsp works great for offsetin, but the offsetOUT wont go to the current layer. Code: ;| OFFSET POLYLINES mfuccaro@hotmail.com September 2003 Clean up by CAB 09.24.08 added curent layer for new objects made minor adjustments here & there CAB 09.27.08 Removed the Change command & added entmod Revised the YesNo code |; (defun c:OffsetIN (/ plines ; selection set of polylines ext ; extrnal point dist ; distance to offset poly ; a polyline from plines plist ; the list of poly del ; polyline to delete int ; internal point i ) (command "_.undo" "_begin") (princ "\nSelect polylines") (setq plines (ssget) i 0 ext (getvar "limmax") dist (getdist "\nEnter Distance: ") ) (repeat (sslength plines) (setq poly (ssname plines i)) (setq plist (entget poly)) (command "_.offset" dist poly "_non" ext "") (setq del (entlast) int (polar (cdr (assoc 10 plist)) (angle (cdr (assoc 10 (entget del))) (cdr (assoc 10 plist)) ) (* 0.1 ; CAB (distance (cdr (assoc 10 plist)) (cdr (assoc 10 (entget del))) ) ) ) ) (command "_.offset" dist poly "_non" int "") (if (equal del (entlast)) (princ "\n** Error-Offset too small.") (progn (setq elst (entget(entlast))) (entmod (subst (cons 8 (getvar 'clayer)) (assoc 8 elst) elst)) ) ) (entdel del) (setq i (1+ i)) ) (command "_.undo" "_end") (initget "Yes No") (if (= "Yes" (getkword "\nDelete initial polylines? (Y/N) ")) (command "_.erase" plines "") ) (princ) ) (defun c:OffsetOUT (/ plines ; selection set of polylines ext ; extrnal point dist ; distance to offset poly ; a polyline from plines plist ; the list of poly del ; polyline to delete int ; internal point i ) (command "._undo" "_begin") (princ "\nSelect polylines") (setq plines (ssget) i 0 ext (getvar "limmax") dist (getdist "\nEnter Distance: ") ) (repeat (sslength plines) (setq poly (ssname plines i)) (setq plist (entget poly)) (command "_.offset" dist poly "_non" ext "") (entmod (subst (cons 8 (getvar 'clayer)) (assoc 8 elst) elst)) (setq i (1+ i)) ) (command "_.undo" "_end") (initget "Yes No") (if (= "Yes" (getkword "\nDelete initial polylines? (Y/N) ")) (command "_.erase" plines "") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
fuccaro Posted January 19, 2010 Share Posted January 19, 2010 4ever Please stop posting the same request again and again! Be sure the moderators will continue to delete all your duplicate posts. Quote Link to comment Share on other sites More sharing options...
kristix Posted March 13, 2010 Share Posted March 13, 2010 I got autocad 2006 and the lsp works only in offesting out. There is no way I tried the offsetIN to work, and I tried different ones!! Is it a problem of 2006 version??? Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted February 6, 2012 Share Posted February 6, 2012 I love the POF lisp you wrote. i was wndering if there is a way for you to add two things to it? 1. remember the last distance 2. offset the line to the current layer? Quote Link to comment Share on other sites More sharing options...
Ufolocoperez Posted December 10, 2015 Share Posted December 10, 2015 (edited) Ok I know this is and old thread but anyways fuccaro thanks many, I think I fall in love... If you spend 5 minutes working with this lsp you will understand that it works perfect, in, out, current... etc... Edited December 10, 2015 by Ufolocoperez 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.