I need a method to align extension line?

I need a method to align extension line?

raymondcheng0922
Enthusiast Enthusiast
325 Views
4 Replies
Message 1 of 5

I need a method to align extension line?

raymondcheng0922
Enthusiast
Enthusiast

I need a method to align extension line?

0 Likes
Accepted solutions (3)
326 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant
Accepted solution

More information, please, about the end result you want.  The drawing has only four objects that are not Dimensions, but it has 219 Dimensions, most of which therefore do not measure to anything.  In what way would you like which extension lines to be aligned?  If I'm correct in assuming the drawing is "before," what should "after" look like?  Etc.

Kent Cooper, AIA
0 Likes
Message 3 of 5

raymondcheng0922
Enthusiast
Enthusiast

keep all dimensions extension line 100mm. thanks

0 Likes
Message 4 of 5

komondormrex
Mentor
Mentor
Accepted solution

check the following

(defun c:ext_100 (/ dim_dxf ext_line_angle ext_line_1_end ext_line_2_end dim_dxf)
	(foreach dim (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget '((0 . "dimension")))))) 
		(setq dim_dxf (entget dim))
		(setq ext_line_angle (angle (cdr (assoc 10 dim_dxf)) (cdr (assoc 14 dim_dxf))))
		(setq ext_line_1_end (polar (inters (cdr (assoc 10 dim_dxf)) (cdr (assoc 11 dim_dxf)) (cdr (assoc 13 dim_dxf)) (polar (cdr (assoc 13 dim_dxf)) ext_line_angle 1) nil) ext_line_angle 100))
		(setq ext_line_2_end (polar (inters (cdr (assoc 10 dim_dxf)) (cdr (assoc 11 dim_dxf)) (cdr (assoc 14 dim_dxf)) (polar (cdr (assoc 14 dim_dxf)) ext_line_angle 1) nil) ext_line_angle 100))
		(setq dim_dxf (subst (cons 13 ext_line_1_end) (assoc 13 dim_dxf) dim_dxf))
		(setq dim_dxf (subst (cons 14 ext_line_2_end) (assoc 14 dim_dxf) dim_dxf)) 
		(entmod dim_dxf)
	)
	(princ)
)
0 Likes
Message 5 of 5

Kent1Cooper
Consultant
Consultant
Accepted solution

That's what this is for:

Kent1Cooper_0-1769603499361.png

In your drawing with its DIMSCALE System Variable set to 100, the setting in the Dimension Style definition would be 1.  Adjust accordingly for different DIMSCALE settings.

Applied in your drawing, the left group becomes:

Kent1Cooper_1-1769603649670.png

 

Kent Cooper, AIA