;++++++++++++++++++++++++++
;+  标注板厚[mini_bhbz]   +
;++++++++++++++++++++++++++

(apply
	'(lambda( / x )
		(or mai_pile_text
			(not (setq x (mai_panel_search "谜你结构专业设置文件[mini_jiegou_config].lsp")))
			(load x)
		)
	)
	nil
)

(defun c:mini_bhbz (/ old_cmd pt1 a old_ortho ps )
	(mini_start nil)
	(mai_last_com "mini_bmj")
	(mai_get_scale)
	(or mai_bh_text (setq mai_bh_text "120"))
	(setq
		a (getstring (strcat "\n板厚:<" mai_bh_text ">"))
		mai_bh_text (if (= a "") mai_bh_text a)
		old_ortho (getvar "orthomode")
		pt1 (mai_3p_2p (cadr (grread T)))
		a (entlast)
	)
	(apply 'mai_create_layer mai_ban_layer)
	(mai_draw_text "mc" pt1 (* mai_scale2 3) 0 (strcat "h=" mai_bh_text) (caddr maitextname) nil 0.8)
	(setq
		ps (mai_text_box (entlast))
		ps (mai_fence_Offset (cons (last ps) ps) (* mai_scale2 0.5) nil)
	)
	(mai_entmake "lwpolyline" ps)
	(mai_grread (mai_newset a) pt1 "板厚标注" nil)
	(mai_end)
)
