; 对齐标注转线形标注[mini_dim_aligned_linear].lsp
(defun C:mini_dim_aligned_linear ( / old_cmd ss ent ang tbl e )
	(mini_start nil)
	(mai_last_com "mini_dim_aligned_linear")
	(setq ss (mai_select_first '((0 . "DIMENSION")) "选择需要转换为对齐标注的标注:<退出>" "没有选择标注."))
	(foreach ent (mai_ssget_2_list ss)
		(setq tbl (entget ent))
		(if (= (rem (mai_dxf 70 tbl) 32) 1)
			;除32余数 0 = 旋转、水平或垂直；1 = 对齐 2 = 角度；3 = 直径；4 = 半径 5 = 三点角度；6 = 坐标    
			(progn
				;(setq e (cdr (assoc 50 tbl))) ;线性标注角度
				(setq
					;起点坐标 13 终点坐标 14 定位坐标 10 文字坐标 11
					e (angle (mai_dxf 13 tbl) (mai_dxf 14 tbl)) ;线性标注角度
					tbl (subst (cons 70 32) (assoc 70 tbl) tbl)
					tbl (subst (cons 50 e) (assoc 50 tbl) tbl)
					tbl (append tbl (list '(100 . "AcDbRotatedDimension")))
				)
				(if (entmake tbl) (entdel ent))
			)
		)
	)
	(mai_end)
)
