Exchange Forum > Beta Testing Forum
Dimension Polylines
Dimension Polylines

#1

Terry Cadd
Join Date:
09-10-2007
Dimensioning Polylines is an idea that I had a while back, but I never got around to writing it until recently. It's similar to the Quick Dimension command but only requires one pick. This is the first Beta version and I've only considered endpoints and haven't included handling arc segments. The toughest part of the code was trying to figure out the best order of endpoints for dimensioning. It can be further customized per your requirements in the DimPL function.
Here it is! Test it out, and let me know what you think.
Terry
 


 
Here is the main DPL function for Dimension Polyline. I've attached the full version as an attachment. I've also included GetDimLayer which returns the layer name that's on and has the most dimensions, or the current layer name if there's no dimensions.
 

Code:
(defun c:DPL (/ EntName^ EntPick@)
  (setvar "CMDECHO" 0)
  (if (setq EntPick@ (entsel "\nSelect Polyline to dimension: "))
    (if (= (cdr (assoc 0 (entget (car EntPick@)))) "LWPOLYLINE")
      (progn
        (setq EntName^ (cdr (assoc -1 (entget (car EntPick@)))))
        (DimPL EntName^)
      );progn
    );if
  );if
  (if (not EntName^)
    (princ "\nNo Polyline selected.")
  );if
  (princ)
);defun c:DPL

Attachments  DPL.lsp  
Dimension Polylines

#2

Chandler
Join Date:
09-04-2007
Terry I like it, but are you trying to put me out of business?
Cool Stuff!
Dimension Polylines

#3

Adesu
Join Date:
10-03-2007
It's cool, I like it and I give you 2 thumbs up.
Dimension Polylines

#4

Justin
Join Date:
09-24-2007
I like it a lot better than Quick Dimensions. I've been using it here at work, and sometimes I'll draw a temporary polyline outline of the points I need to dimension over the objects I need to dimension. Then I'll use your DPL routine and edit or erase the dimensions that are not required. However, it does save a lot of time dimensioning small parts and objects.
Justin