;++++++++++++++++++++;
;  画标准桩基和承台[mini_ct]  ;
;++++++++++++++++++++;

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

(defun c:mini_ct ( / old_cmd temp piledia pilenum blockname ct_inspt)
	(mini_start nil)
	(mai_last_com "mini_ct")
	(mai_get_scale)
	(setq mai_pile_size (cond (mai_pile_size) ((list 500 4))))
	(mapcar 'set '(piledia pilenum) mai_pile_size)
	(setq
		temp (getint (strcat "\n画标准桩基和承台,请输入桩直径(mm):<" (itoa piledia) ">"))
		piledia (if temp temp piledia)
		temp (getint (strcat "\n请输入桩数:<" (itoa pilenum) ">"))
		pilenum (if temp temp pilenum)
		mai_pile_size (list piledia pilenum)
		blockname (strcat "CT" (itoa pilenum))
	)
	(apply 'mai_create_layer mai_pile_layer)
	(while (setq ct_inspt (getpoint "\n请输入插入点:"))
		(mai_insert_entmake blockname ct_inspt piledia piledia piledia 0)
		(if (= blockname "CT0")
			(progn (command "_.explode" "l") (exit))
		)
	)
	(mai_end)
)
