jake77777 Posted September 25, 2010 Share Posted September 25, 2010 I was hoping someone out there knows how to use a lisp in one command that can allow our firm to draw a single solid line that automatically offsets a 2" centerline followed by another 2" offset solid line...If it's easier something like drawing a centerline using midpoint offset by two solid lines would absolutely work. The closest I found was the following code that allows you to offset a specified distance and only after you've drawn the line..and there all the same linetype. Our engineering firms uses this command SO much and it's just a bit more tedious bring in a block then stretching/extending/trimming it. Your help is GREATLY appreciated. (defun c:dOff1 ( / *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)) ) Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 25, 2010 Share Posted September 25, 2010 I don't quite understand what the final outcome looks like. Can you post an image? -David Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 25, 2010 Author Share Posted September 25, 2010 absolutely. Here's hopefully what the final outcome will look like Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 25, 2010 Share Posted September 25, 2010 Here's a Double Offset program I wrote a little while ago, might help your cause: http://www.cadtutor.net/forum/showthread.php?48365-i-search-for-offset-with-same-value-and-opposite-direction&p=354750&viewfull=1#post354750 Quote Link to comment Share on other sites More sharing options...
eldon Posted September 25, 2010 Share Posted September 25, 2010 If you were just drawing straight lines, then have you tried the Multi Line command? Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 25, 2010 Author Share Posted September 25, 2010 Thanks Lee, It's helpful but similar issues to the code I previously posted..I never heard of multi lines! All the lines will be straight..I'm off to discover the simplicity of creating them! Thanks Eldon Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 25, 2010 Share Posted September 25, 2010 Do you want to draw the center line and then offset others, or are you say you want to draw the ( wall ), then the center then the opposite wall line? -David Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 25, 2010 Author Share Posted September 25, 2010 I have to say thanks again eldon! Really appreciate it! Everything worked perfect. Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 25, 2010 Author Share Posted September 25, 2010 It would have been the first one david..though the multi line command works perfect..Would prefer to have an icon in the toolbar seeing that we use it so often. Thanks! Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 25, 2010 Share Posted September 25, 2010 Depending on your setup, I doubt that you will be happy with MLINEs. Do you fillet / trim / extend corners etc? Does MLINE support multiple linetypes / layers / thicknesses I don't remember seeing anyone make a mline with ( entmake ) -David Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 26, 2010 Share Posted September 26, 2010 I don't remember seeing anyone make a mline with ( entmake ) Very true, I believe one has to go the VL route: http://www.cadtutor.net/forum/showthread.php?50211-Mline-in-entmake-Lisp&p=341158&viewfull=1#post341158 Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 26, 2010 Author Share Posted September 26, 2010 Thanks David. It should be perfect for our use..their just used for beams, headers, etc..all straight all on the str-txt layer..Sometimes we have to draw the foundations..this way is so much quicker! Basically I saved the different linetypes I needed as a separate mnl file. Put them into a block. Used a filtering lisp to insert and delete the block into every drawing opened. In customization in the toolbars I created a new tool going something like ^C^C_mline;STYLE;SR specifying the mline or ^C^C_mline;STYLE;sr;J;TOP specifying the mline and justification for each mline we'll need..lastly i moved them into the tool pallets with an example image and text description next to it..Hope this helps someone out. Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 26, 2010 Author Share Posted September 26, 2010 Lee/david take a look at how I came about doing this..I've looked at that post and about 20 others dealing with mlines..could the above method pose any problems? 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.