wrha Posted May 25, 2010 Share Posted May 25, 2010 dear all i search for offset with same value and opposite direction realy if i get that option it will save me more time . thanx for all Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 25, 2010 Share Posted May 25, 2010 So you want to offset the same distance in two directions at the same time? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 25, 2010 Share Posted May 25, 2010 Try this: (defun c:dOff ( / *error* of undo doc ss ) (vl-load-com) (defun *error* ( msg ) (and undo (vla-EndUndomark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))) (setq of (getdist "\nSpecify Offset Distance: "))) (progn (setq undo (not (vla-StartUndomark (setq doc (vla-get-ActiveDocument (vlax-get-acad-object) ) ) ) ) ) (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc)) (mapcar (function (lambda ( o ) (vl-catch-all-apply (function vla-offset) (list obj o) ) ) ) (list of (- of)) ) ) (vla-delete ss) (setq undo (vla-EndUndoMark doc)) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
wrha Posted May 25, 2010 Author Share Posted May 25, 2010 dear mr lee most thanx for ur good suport but plz could u help me in following request IF I HAVE TOW LINE LIKE IT APPEAR IN ATTACHED JPG I NEED BREAK OPTION WITH VARIABLES VALUE FROM CENTER OF THAT LINE AND CREATE IN THE CUT TOW LINES PERPENDICULAR IN BETWEEN IT THANX ALOT Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 25, 2010 Share Posted May 25, 2010 I'm sure that you can do a bit of trimming - we do have to work for our money sometimes.. Quote Link to comment Share on other sites More sharing options...
wrha Posted May 26, 2010 Author Share Posted May 26, 2010 Mr Lee In Double Offset Lisp Can I Add Option In That Lisp To Delet The Source Line Or No Thanx Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 26, 2010 Share Posted May 26, 2010 (defun c:dOff ( / *error* of undo doc ss flg ) (vl-load-com) (defun *error* ( msg ) (and undo (vla-EndUndomark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))) (setq of (getdist "\nSpecify Offset Distance: "))) (progn (initget "Yes No") (setq flg (eq "Yes" (getkword "\nDelete Original? [Yes/No] <No> : "))) (setq undo (not (vla-StartUndomark (setq doc (vla-get-ActiveDocument (vlax-get-acad-object) ) ) ) ) ) (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc)) (mapcar (function (lambda ( o ) (vl-catch-all-apply (function vla-offset) (list obj o) ) ) ) (list of (- of)) ) (and flg (vla-delete obj)) ) (vla-delete ss) (setq undo (vla-EndUndoMark doc)) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
wrha Posted May 26, 2010 Author Share Posted May 26, 2010 Mr Lee Thank You Very Much Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 26, 2010 Share Posted May 26, 2010 You're welcome Quote Link to comment Share on other sites More sharing options...
wrha Posted May 26, 2010 Author Share Posted May 26, 2010 Mr Lee I Have Last Thing I Need It I N That Lisp In Option Delet Source Line I Need Cut Line Betwen New Offset Line . Most Thanx Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 26, 2010 Share Posted May 26, 2010 I don't understand what you mean. Why did you not ask that when you asked me to modify it previously? Quote Link to comment Share on other sites More sharing options...
wrha Posted May 26, 2010 Author Share Posted May 26, 2010 Oh Sory Mr Lee Realy I Try To Improve That Lisp To Be Better . What I Need Trim Space Between New Offset Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 26, 2010 Share Posted May 26, 2010 Sir Lee, i need i similar routine. i made a msg in another thread and here is the link http://www.cadtutor.net/forum/showthread.php?t=47492&page=2 if you have spare time, can you (or anybody) modify it for me. it is like this. offset both side delete the original pline connect & join them to become one and finally instead of specifying the offset distance, distance between 2 parallel line will be specified. tnx. Quote Link to comment Share on other sites More sharing options...
bijoymano Posted September 12, 2010 Share Posted September 12, 2010 hi... this lisp lisp is realy great... can you please do me a favor? now layer option for object is "source" can you please make it to "Current" thanks bijoy.vm Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted September 13, 2010 Share Posted September 13, 2010 nice, as always awesome why this doesn't work with RAY object? i never used them but i'm just curious. i modify this: (ssget "_:L" '((0 . "ARC,CIRCLE,ELLIPSE,*LINE,RAY"))) but nothing thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 13, 2010 Share Posted September 13, 2010 (edited) Thanks Kruuger, >> why this doesn't work with RAY object? Because the Ray object doesn't have an Offset method Here is another version of the above, more akin to the normal offset command: DoubleOffset V1-1.lsp Edited September 13, 2010 by Lee Mac Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 13, 2010 Share Posted September 13, 2010 FYI Lee, you cannot offset a 3DPolyline. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 13, 2010 Share Posted September 13, 2010 FYI Lee, you cannot offset a 3DPolyline. Thanks Alan, I'll see to the code Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 13, 2010 Share Posted September 13, 2010 Thanks Alan, I'll see to the code No problem. I just thought I'd give it a look. I was actually curious what was so different that you aren't just suggesting your Dynamic Offset routine. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 13, 2010 Share Posted September 13, 2010 No problem. I just thought I'd give it a look. I was actually curious what was so different that you aren't just suggesting your Dynamic Offset routine. I've averted from 'dynamic' programs - too much hassle for minimal practicality... (I've finally seen the light) - I suppose that's what you get from actually working in a DO for a period... 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.