;++++++++++++++++++++++++++;
;   批量标记封闭多段线的形心[mini_xx1] ;
;++++++++++++++++++++++++++;

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

(defun c:mini_xx1 ( / old_cmd ss )
	(mini_start nil)
	(mai_last_com "mini_xx1")
	; (mai_get_scale)
	; (apply 'mai_create_layer mai_Centroid_layer)
	(setq ss (mai_select_first
				'((0 . "*POLYLINE,Circle,spline,ELLIPSE,"))
				"请选择闭合无自交的多段线:<退出>"
				"没有找到多段线."
			)
	)
	(foreach ss (mai_ssget_2_list ss)
		(setvar "clayer" (mai_dxf 8 ss))
		(and
			(mai_curve_isclosed ss)
			(setq ss (mai_Centroid ss))
			(mai_entmake "point" ss)
		)
	)
	(mai_end)
)
