Drawing Dimension Line in Autocad
AutoCAD Dimension Lines
Cleaning up extension lines. December 26, 2004
Question
I am trying to get used to lining up all of my text and dimensions using the "to the Y of" and "to the x of" buttons (AutoCAD 2000i). If I want to dimension up some drawers inside a cabinet and want the dimensions drawn outside of the carcass lines for clarity, I use these buttons. However, when there are a lot of these dimensions in a row, I get fed up having to click the x or y for every single end of every dimension.
The "continue" function in dimensioning is great for speeding up dimensioning. Can this be used somehow for running dimensions offset from the source to a set point?
To clarify, it is the extension lines from the dimensions that I am trying to line up. I don't want loads of extension lines entering the drawing, making it hard to read.
Forum Responses
(CAD Forum)
From contributor A:
I think I understand what you're asking. I do the same thing, but I use qdim, and then pull my grips back to a line, keeping my extension lines short and sweet. Others may have a better way, but this method isn't too time consuming, in my opinion.
From contributor J:
One thing you might try is to qdim or continuous dim the objects. Then isolate your dim layer and use the stretch command to pull all of the lines back where you want.
From contributor D:
I�m practicing lisp. Try this out and see if it helps.
; dimadj.lsp type dimadj to run
; modify your dimension lines (dimlinear only)
; Select your dimension then a point where you want your
; extension lines to end
(defun c:dimadj ( / a b c d e)(setq a (entget (car (entsel "\nSelect a dimension line")))b (cdr (assoc 13 a))c (cdr (assoc 14 a)))(if (= (nth 1 b)(nth 1 c))(progn(setq e (getpoint"\nPick Point: ")d (cadr e) a (subst(cons 13 (list (nth 0 b) d (nth 2 b)))(assoc 13 a)a)a (subst(cons 14 (list (nth 0 c) d (nth 2 c)))(assoc 14 a)a)))(progn(setq e (getpoint "\nPick Point: ")d (car e)a (subst(cons 13 (list d (nth 1 b) (nth 2 b)))(assoc 13 a)a)a(subst(cons 14 (list d (nth 1 c) (nth 2 c)))(assoc 14 a)a))))(entmod a)(princ))
From the original questioner:
Thanks - I shall work on this a bit more. I hear a lot on this site about Lisp routines, but haven't got a clue what they are or how to use them. Is there a book or site about these or can I read about them on CAD help? I'm an ex-furniture maker who graduated into CAD off the shop floor, so please bear with me.
This image shows what I wish to achieve in the right hand image. All of the extension lines line up for a more attractive presentation. I think so, anyway.
Click here for full size image
From contributor D:
Copy and paste the code into a file named dimadj.lsp. Load it in Acad by selecting tools -> load application, then browse for the new file, select it and click the load button. You should be able to type dimadj at the command line to run. Select your dimension, then the point where you want your extension lines to end. The program will adjust the dimension extension lines for you.
From contributor A:
Pretty nice work. One cool modification you might add would be to allow multiple selections for a whole string of dimensions, and then one point to line up the string. I like what you did, though.
From contributor D:
Oops. Seems it doesn't work all the time. I'll fix it tonight.
From contributor T:
I do see how you want to dim and clean up your drawing, but I'm not sure of the extent of the Acad commands. First you could run your dimensions through the object directly on it, then drag the entire dimension line above to the desired location. Second, Acad should have a command like I do, that allows you to dimension from a base line. You set the offset dim from the object in the pop-up menu and click on the object line and it prints the fixed distance away from the object.
From contributor S:
We do the same thing. Not for all dims, but for some where clarity is an issue and extension lines seem to overrun the object too much. You realize that when you do this edit, you are moving the defpoint of the dimension off of the object being dimensioned. Be careful if you edit the drawing later.
Here's what we do (no LISP needed):
All dims are on a "***DIM***" named layer. Just dims, not text, etc. We have a custom button that locks all layers not named "***DIM***". Click, and everything but dim layers are locked. Then do a stretch window around the dims (defpoints) of the dims to be moved. De-select any extra that you grabbed, say on the adjacent run of dims, by holding down the shift key as you select those dim objects. Then, do your stretch. Then, click the unlock all layers button (custom button again) and resume working.
This will give you the result you want. It's quick, but not perfect, because the locations of all of your defpoints are likely not in the same relative position to each other. But often that doesn't matter, since the longest extension lines are the ones that show. Also, best to save editing of dimensions in this way until last, just in case you do more editing to the drawing objects.
From contributor D:
I got the dimadj lisp working. Cool. You can select multiple selections, as suggested above. Anyway, the code got a little too large to post.
From contributor V:
Your lisp is great. It will certainly save me some time. That is some good tight coding.
From contributor D:
Thanks, I hope to be a good programmer some day. The lisp can still use a little work. Hey, maybe one of these days with your help, we can add the ability to work in the Z axis :)
Source: https://www.woodweb.com/knowledge_base/AutoCAD_Dimension_Lines.html
0 Response to "Drawing Dimension Line in Autocad"
Postar um comentário