View Full Version : Offset my rogue polylines
20th Jun 2003, 02:58 pm
Im sure someone else asked this question before,cant find it though.Its possible to offset some polylines but how do I offset a polyline that bends horizontal and vertical?When they offset ,they zig zag across my drawing which useless. :( If Im leaving an offset gap either side of pipework(shown as polyline),so that one pipe appears to run under the other,I have to form my own cutting edges then trim,its quite slow when I'm repeatedly doing this!Anyone got any ideas?
24th Jun 2003, 07:32 am
Seemingly there is a known bug with offsetting polylines which are some distance from the origin of the drawing. You could try setting your UCS close to the polyline before offsetting it.
Over in the Acad NG a person called Jamie Duncan wrote the following lisp to provide a solution to the problem:
(defun c:ofp (/ ss1 pt1 pt2 offdist en1 looper cosmo)
(defun getthatpoly (/ temp)
(setq temp T)
(while (not (setq ss1 (ssget ":S"))))
(if (or (= (cdr (assoc 0 (entget (ssname ss1 0)))) "POLYLINE")
(= (cdr (assoc 0 (entget (ssname ss1 0)))) "LWPOLYLINE")
(setq temp nil)
(princ "\nSelect a Polyline!:")
(setq offdist (getdist "\nInput Offset Distance:")
pt2 '(0 0)
(setq cosmo (getvar "osmode"))(setvar "osmode" 0)
(setq pt1 (getpoint "\nIndicate Offset Point <eXit>:"))
(if (or (= 'str (type pt1))(= pt1 nil))
(setq looper nil)
(command ".move" ss1 "" pt1 pt2)
(command ".offset" offdist (ssname ss1 0) pt2 "")
(setq ss1 (ssadd (entlast) ss1))
(command ".move" ss1 "" pt2 pt1)
(setq ss1 (ssadd))
(setvar "osmode" cosmo)
You may want to give it a try.
The other part of your post sounds like a lisp routine is needed to speed up a repetitive task - sorry can't help you there - I haven't done lisp programming!
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.