; 输出等高线多段线坐标 mini_sczb
(defun c:mini_sczb ( / old_cmd ss typ ffn entdada)
	(mini_start nil)
	(mai_last_com "mini_sczb")
	(setq
		ss (mai_select_first '((0 . "lwpolyline")) "选取需要输出点坐标的lwpolyline多义线:<退出>" "没有找到实体.")
		ss
			(mapcar
				'(lambda ( ssn / elev entdata i )
					(setq
						entdata (entget ssn)
						elev (rtos (mai_dxf 38 entdata) 2 3)
						entdata (mapcar 'cdr (vl-remove-if-not '(lambda(x)(= (car x) 10)) entdata))
						entdada (mai_remove_same entdata)
						i 0
						entdata (mapcar '(lambda(x)(list (itoa (setq i (1+ i))) "" (rtos (car x) 2 3) (rtos (cadr x) 2 3) elev)) entdata)
						entdata (cons (list "") entdata)
					)
				)
				(mai_ssget_2_list ss)
			)
		ss (cdr (apply 'append ss))
	)
	(mai_make_panel_up 
		(list
			"输出坐标文件类型"
			(list "选项"
				(list "输出为文本文件【dat】==>>" "(setq typ 0)")
				nil
				(list "输出为表格文件【xls】==>>" "(setq typ 1)")
			)
		)
	)
	(cond
		(	(= typ 0)
			(setq ffn (mai_dos_tempfile "dat"))
			(mai_write_file ffn (mapcar '(lambda(x)(mai_lst2str x "  ,  ")) ss))
			(mai_shell_ascii_edit ffn nil)
		)

		(	(= typ 1)
			(mai_smart_2_excel ss)
		)
	)
	(mai_end)
)
