; 广东中山梁伯全-文字样式管理器[lbq_cstyles].lsp
; 版权所有：  梁伯全
; 联系方式：  QQ:32774362   Email:guangdonglbq@qq.com
; 2008年4月18日  于  广东中山
; 1.如果要使用本程序源码，请保留个人信息及声明,并公开修改后的源码；
; 2.本源码不允许进行商业上的使用，如果确实需要，请先与我联系。
;;;------------------------------------------------------------------------------------------------
(defun c:lbq_cstyles ( /
					dcl_id
					FontStyleDXF              FontStyleName
					FontFile              BigFontFile
					diandao              fanxiang
					ChuiZhi              Height
					Width                      ObliqueAngle
					kw                            ;记录控制关闭对话框的组件号
					ExistFontStylesNameList       ;已存在的文字样式名列表
					ToBeChangedFontStylesNameList ;需修改的文字样式名列表
					StylesExistIndex              ;记录已存在文字样式列表中被选择的行号
					StylesToBeChangedIndex        ;记录需修改文字样式列表中被选择的行号
					InputBox  GetExistFontStyleNames  GetFontStyleData
					setDCLTileFontStyleSet  getDCLTileFontStyleSet  setDefaultFontStyleData  setSongTiFontStyleData
					ChangeFontStyleSet  StylesToBeChangedChangeAll  NewFontStyle  RenameFontStyle
					StylesToBeChangedAddSelected  StylesToBeChangedAddAll  NameListToListBox  StylesToBeChangedRemoveOne
					StylesToBeChangedClear  StylesExistOnClick  StylesToBeChangedOnClick  create_dcl_file file_dcl
				)

(defun create_dcl_file ( / fileStream i fileN dclfile) 
	(setq
		fileStream
			(list
				"cstyles:dialog { label = \"批量文字样式管理\" ;"
				"    spacer;"
				"    :row { label = \"文字样式\" ;"
				"        :column {"
				"            spacer;"
				"            :row {"
				"                spacer;"
				"                :column { label = \"已存在的文字样式\" ;"
				"                    :list_box { allow_accept = true ; height = 16 ; key = \"StylesExist\" ; multiple_select = true ; width = 30 ; }"
				"                    :row { :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btStyleNew\" ; label = \"新建样式\" ; width = 8 ;}"
				"                           :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btStyleRename\" ; label = \"重命名\" ; width = 8 ;}"
				"                    }"
				"                    spacer;"
				"                }"
				"                :column { children_alignment = centered ; children_fixed_width = true ;"
				"                    spacer;"
				"                    :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btAddSelected\" ; label = \"-->\" ; width = 8 ;}"
				"                    :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btAddAll\" ; label = \"-->>\" ; width = 8 ;}"
				"                    spacer;"
				"                }"
				"                :column { label = \"需要修改的文字样式\" ;"
				"                    :list_box { allow_accept = true ; height = 16 ; key = \"StylesToBeChanged\" ; multiple_select = true ; width = 30 ; }"
				"                    :row { spacer;"
				"                           :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btRemoveOne\" ; label = \"删除\" ; width = 8 ; }"
				"                           :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btRemoveAll\" ; label = \"清空\" ; width = 8 ; }"
				"                           spacer;"
				"                    }"
				"                }"
				"            }"
				"            spacer;"
				"        }"
				"        :spacer { }"
				"    }"
				"    spacer;"
				"    :column { label = \"选定样式的设置或修改后样式的设置\" ;"
				"        :row {"
				"            spacer;"
				"            :column {"
				"                spacer;"
				"                :column {"
				"                    :row { label = \"字体\" ;"
				"                        :column { children_fixed_width = true ;"
				"                            :row { children_fixed_width = true ;"
				(strcat "                        :edit_box { allow_accept = true ; edit_width = 17 ; fixed_width = true ; key = \"DCLFontFile\" ; label = \"SHX字体名称:\" ; value = \"" (cond((car maiDefaultfonts))(txt.shx)) "\" ; }")
				(strcat "                        spacer;"
				"                                :edit_box { allow_accept = true ; edit_width = 17 ; fixed_width = true ; key = \"DCLBigFontFile\" ; label = \"大字体名称:\" ; value = \"" (cond((caddr maiDefaultfonts))(hztxt.shx)) "\" ; }")
				"                            }"
				"                            spacer;"
				"                        }"
				"                        spacer;"
				"                    }"
				"                    spacer;"
				"                    :row {"
				"                        :row { children_fixed_width = true ; label = \"效果\" ;"
				"                            :column { children_fixed_width = true ;"
				"                                :row { children_fixed_width = true ;"
				"                                    :column { children_fixed_width = true ;"
				"                                        :toggle { key = \"DCLdiandao\" ; label = \"颠倒\" ; value = \"0\" ; }"
				"                                        :toggle { key = \"DCLfanxiang\" ; label = \"反向\" ; value = \"0\" ; }"
				"                                        :toggle { key = \"DCLChuiZhi\" ; label = \"垂直\" ; value = \"0\" ; }"
				"                                    }"
				"                                    spacer;"
				"                                    :column { children_fixed_width = true ;"
				"                                        :edit_box { key = \"DCLHeight\" ; label = \"文字高度:\" ; value = \"3\" ; }"
				"                                        :edit_box { key = \"DCLWidth\" ; label = \"宽度比例:\" ; value = \"0.8\" ; }"
				"                                        :edit_box { key = \"DCLObliqueAngle\" ; label = \"倾斜角度:\" ; value = \"0\" ;}"
				"                                    }"
				"                                }"
				"                                spacer;"
				"                            }"
				"                            spacer;"
				"                        }"
				"                        :spacer { }"
				"                        :column { children_alignment = centered ; children_fixed_width = true ;"
				"                            spacer;"
				"                            :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btSetDefault\" ; label = \"使用仿宋单笔字体\" ; width = 8 ;}"
				"                            :button { alignment = top ; fixed_width = true ; height = 2.2 ; key = \"btSetSongTi\" ; label = \"使用宋体字体\" ; width = 8 ; }"
				"                            spacer;"
				"                        }"
				"                    }"
				"                }"
				"                spacer;"
				"            }"
				"            spacer;"
				"        }"
				"    }"
				"    spacer;"
				"    :text { label = \"版权所有：  梁伯全\" ; }"
				"    :text { label = \"联系方式：  QQ:32774362   Email:guangdonglbq@qq.com\" ; }"
				"    :text { label = \"2008年4月18日  于  广东中山\" ; }"
				"    ok_cancel;"
				"}"
			)
		dclfile (vl-filename-mktemp "cstyles.dcl")
		fileN (open dclfile "w")
	)
	(foreach i fileStream (princ i fileN))
	(close fileN)
	dclfile
)



;;;标准输入对话框
;;;调用形式 ( InputBox  显示的对话框名称   表( ( "editbox显示的说明" "editbox显示值"  "editbox显示宽度")  ...)   )
;;;注意，调用参数均为字符串形式
;;;返回值为与输入表长度相等的字符串列表
(defun InputBox ( strDialogName EditBoxDefList / GetInput
					ResultList dclfile fileN fileStream i dclid
				)

;;;-------------------------------------------------
(defun GetInput ( len / i )
	(setq
		i 0
		ResultList nil
	)
	(repeat len
		(setq
			i (1+ i)
			ResultList (cons (get_tile (itoa i)) ResultList)
		)
	)
	(setq ResultList (reverse ResultList))
)

;;;-------------------------------------------------
	(setq
		dclfile (vl-filename-mktemp "dcltmp.dcl")
		fileN (open dclfile "w")
		i -1
		fileStream
			(append
				(list (strcat "InputBox:dialog{label=\"" strDialogName "\";\n"))
				(mapcar
					'(lambda(x)
						(setq i (1+ i))
						(strcat ":edit_box{allow_accept=true;edit_width=" (caddr x) ";fixed_width=true;key =\"" (itoa i) "\";label=\"" (car x) "\";value=\"" (cadr x) "\";}\n")
					)
					EditBoxDefList
				)
				(list "ok_cancel;}\n")
			)
	)
	(foreach i fileStream (princ i fileN))
	(close fileN)
	(setq dclid (load_dialog dclfile))
	(or (new_dialog "InputBox" dclid "")
		(progn (alert "对话框加载失败!") (exit))
	)
	(action_tile "accept" "(GetInput (length EditBoxDefList)) (done_dialog 1)")
	(start_dialog)
	(unload_dialog dclid)
	(vl-file-delete dclfile)
	ResultList
)
;;;-------------------------------------------------


;;;------------------------------------------------------------------------------------------------
;;;搜索已有文字样式并加入到DCL中相应的List
(defun GetExistFontStyleNames ( / )
	(setq
		FontStyleDXF (tblnext "STYLE" T)
		ExistFontStylesNameList nil
	)
	(while FontStyleDXF
		(setq FontStyleName (cdr (assoc 2 FontStyleDXF)))
		;;往表中加入已有文字样式名列表
		(or (= FontStyleName "")
			(setq ExistFontStylesNameList (append ExistFontStylesNameList (list FontStyleName)))
		)
		(setq FontStyleDXF (tblnext "STYLE"))
	)
	(NameListToListBox ExistFontStylesNameList "StylesExist")
	(setq FontStyleName nil)
)

;;;------------------------------------------------------------------------------------------------
;;;查询当前文字样式的资料，并反应到与DCL相关联的变量中
(defun GetFontStyleData ( / tmp)
	(if FontStyleName
		(progn
			(setq
				FontStyleDXF (tblsearch "STYLE" FontStyleName)
				FontFile (cdr (assoc 3 FontStyleDXF))             ;主要字体文件名
				BigFontFile (cdr (assoc 4 FontStyleDXF))          ;大字体文件名
				Height (cdr (assoc 40 FontStyleDXF))              ;固定的文字高度
				Width (cdr (assoc 41 FontStyleDXF))               ;宽度因子
				ObliqueAngle (cdr (assoc 50 FontStyleDXF))        ;文字倾斜角度
				tmp (cdr (assoc 70 FontStyleDXF))
				ChuiZhi (if (= tmp 4) "Y" "N")                    ;垂直文字
				tmp (cdr (assoc 71 FontStyleDXF))
			)
			(cond
				((= tmp 2) (setq fanxiang "Y" diandao "N"))
				((= tmp 4) (setq fanxiang "N" diandao "Y"))
				((= tmp 6) (setq fanxiang "Y" diandao "Y"))
				(T (setq fanxiang "N" diandao "N"))
			)
		)                                        ;2 = 反向文字( 镜像 X)      4 = 倒置文字( 镜像 Y)

		(setq
			FontFile ""                ;主要字体文件名
			BigFontFile ""                ;大字体文件名
			Height 0                        ;固定的文字高度
			Width 0.8                ;宽度因子
			ObliqueAngle 0                ;文字倾斜角度
			ChuiZhi "N"                ;4 = 垂直文字
			fanxiang "N"                ;2 = 反向文字( 镜像 X)
			diandao "N"                ; 4 = 倒置文字( 镜像 Y)
		)
	)
	(setDCLTileFontStyleSet)
)
;;;------------------------------------------------------------------------------------------------
;;;根据指定文字样式的信息设置DCL上相关组件值
(defun setDCLTileFontStyleSet        ()
	(set_tile "DCLFontFile" (if FontFile FontFile ""))
	(set_tile "DCLBigFontFile" (if BigFontFile BigFontFile ""))
	(set_tile "DCLHeight" (if Height (rtos Height 2 3) "0"))
	(set_tile "DCLWidth" (if Width (rtos Width 2 3) "1"))
	(set_tile "DCLObliqueAngle" (if ObliqueAngle (rtos ObliqueAngle 2 3) "0"))
	(set_tile "DCLChuiZhi" (if (= ChuiZhi "N") "0" "1"))
	(set_tile "DCLfanxiang" (if (= fanxiang "N") "0" "1"))
	(set_tile "DCLdiandao" (if (= diandao "N") "0" "1"))
)
;;;------------------------------------------------------------------------------------------------
;;;获取DCL上文字样式相关组件的值
(defun getDCLTileFontStyleSet ( / tmp )
	(setq
		FontFile (get_tile "DCLFontFile")
		BigFontFile (get_tile "DCLBigFontFile")
		Height (atof (get_tile "DCLHeight"))
		Width (atof (get_tile "DCLWidth"))
		ObliqueAngle (atof (get_tile "DCLObliqueAngle"))
		tmp (atoi (get_tile "DCLChuiZhi"))
		ChuiZhi (if (= tmp 0) "N" "Y")
		tmp (atoi (get_tile "DCLfanxiang"))
		fanxiang (if (= tmp 0) "N" "Y")
		tmp (atoi (get_tile "DCLdiandao"))
		diandao (if (= tmp 0) "N" "Y")
	)
)
;;;------------------------------------------------------------------------------------------------
;;;设置默认的文字样式值
(defun setDefaultFontStyleData ()
	(setq
		FontFile "hztxt_e.shx"       ;主要字体文件名
		BigFontFile "hztxt.shx"      ;大字体文件名
		Height 0                     ;固定的文字高度
		Width 0.8                    ;宽度因子
		ObliqueAngle 0               ;文字倾斜角度
		ChuiZhi "N"                  ;4 = 垂直文字
		fanxiang "N"                 ;2 = 反向文字( 镜像 X)
		diandao "N"                  ; 4 = 倒置文字( 镜像 Y)
	)
	(setDCLTileFontStyleSet)
)
;;;------------------------------------------------------------------------------------------------
;;;设置默认的文字样式值
(defun setSongTiFontStyleData ( )
	(setq
		FontFile "SimSun.ttf"        ;主要字体文件名
		BigFontFile ""                ;大字体文件名
		Height 0                        ;固定的文字高度
		Width 0.75                        ;宽度因子
		ObliqueAngle 0                ;文字倾斜角度
		ChuiZhi "N"                        ;4 = 垂直文字
		fanxiang "N"                        ;2 = 反向文字( 镜像 X)
		diandao "N"                        ; 4 = 倒置文字( 镜像 Y)
	)
	(setDCLTileFontStyleSet)
)
;;;------------------------------------------------------------------------------------------------
;;;根据设置，修改当前文字样式的设置
(defun ChangeFontStyleSet ( fsName / tmp fstName strFontfiles)
	(if fsName
		(if (or (= (strcase (substr FontFile (- (strlen FontFile) 3) 4))
					".TTF"
				)
				(= BigFontFile "")
			)
			(progn ;对于标准字体，因未找到修改dxf组码的有效方式，暂采用command的方式修改，速度比较慢
				(setq
					strFontfiles
						(cond
							((= (strcase FontFile) "SIMSUN.TTF") "宋体")
							((= (strcase FontFile) "NSIMSUN.TTF") "新宋体")
							(FontFile)
						)
				)
				(command "_.style" fsName strFontfiles Height Width ObliqueAngle fanxiang diandao)
			)
			(progn
				(setq strFontfiles (strcat FontFile "," BigFontFile))
				(command "_.style" fsName strFontfiles Height Width ObliqueAngle fanxiang diandao "")
			)
		)

;;;     (progn  ;对于非标准字体，采用修改dxf组码的方式修改，速度要快一些
;;;        (setq fstName (tblobjname "STYLE" fsName) )
;;;    (setq FontStyleDXF (entget fstName ))
;;;
;;;    (entmod (setq FontStyleDXF (subst (cons 3 FontFile) (assoc 3 FontStyleDXF) FontStyleDXF) ))     ;主要字体文件名
;;;    (entmod (setq FontStyleDXF (subst (cons 4 BigFontFile) (assoc 4 FontStyleDXF) FontStyleDXF ) ) )    ;大字体文件名
;;;    (entmod (setq FontStyleDXF (subst (cons 40 Height) (assoc 40 FontStyleDXF) FontStyleDXF ) ) )    ;固定的文字高度
;;;    (entmod (setq FontStyleDXF (subst (cons 41 Width) (assoc 41 FontStyleDXF) FontStyleDXF) ))     ;宽度因子
;;;    (entmod (setq FontStyleDXF (subst (cons 50 ObliqueAngle) (assoc 50 FontStyleDXF) FontStyleDXF ) ))     ;文字倾斜角度
;;;
;;;    (if (= ChuiZhi "Y")
;;;     (entmod (setq FontStyleDXF (subst (cons 70 4) (assoc 70 FontStyleDXF) FontStyleDXF) ))
;;;     (entmod (setq FontStyleDXF (subst (cons 70 0) (assoc 70 FontStyleDXF) FontStyleDXF) ))
;;;    )     ;垂直文字
;;;
;;;    (if (= fanxiang "Y")
;;;     (setq tmp 2)
;;;     (setq tmp 0)
;;;    )     ;2 = 反向文字( 镜像 X)
;;;
;;;    (if (= diandao "Y") (setq tmp (+ tmp 4)) )     ;4 = 倒置文字( 镜像 Y)
;;;    (entmod (setq FontStyleDXF (subst (cons 71 tmp) (assoc 71 FontStyleDXF) FontStyleDXF)))
;;;    (entupd fstName )
;;;      )
;;;   )
	)
)
;;;------------------------------------------------------------------------------------------------
;;;根据设置，修改所有指定的文字样式
(defun StylesToBeChangedChangeAll (  / x )
	;(mapcar 'ChangeFontStyleSet ToBeChangedFontStylesNameList) ;2014以上版本不能用,mapcar下不能嵌套command
	(foreach x ToBeChangedFontStylesNameList (ChangeFontStyleSet x))
)
;;;------------------------------------------------------------------------------------------------
;;;新建文字样式
(defun NewFontStyle (/ fsName fsDXF tmp)
	(setq fsName (car (InputBox "新建文字样式" (list (list "文字样式的名称:" "新样式" "12")))))
	(if fsName
		(if (setq fsDXF (tblsearch "STYLE" fsName))
			(alert "已经存在同名的文字样式!")

			(progn
				(getDCLTileFontStyleSet)
				(setq
					fsDXF
						(list
							'(0 . "STYLE")
							'(100 . "AcDbSymbolTableRecord")
							'(100 . "AcDbTextStyleTableRecord")
							(cons 2 fsName)
							(cons 3 FontFile)
							(cons 4 BigFontFile)
							(cons 40 Height)
							(cons 41 Width)
							(cons 50 ObliqueAngle)
						)
					fsDXF (append fsDXF (list (cons 70 (if (= ChuiZhi "Y") 4 0))))  ;垂直文字
					tmp (if (= fanxiang "Y") 2 0)                                   ;2 = 反向文字( 镜像 X)
					tmp (+ tmp (if (= diandao "Y") 4 0))                            ;4 = 倒置文字( 镜像 Y)
					fsDXF (append fsDXF (list (cons 71 tmp)))
				)
				(entmake fsDXF)
				(setq ExistFontStylesNameList (append ExistFontStylesNameList (list fsName)))
				(NameListToListBox ExistFontStylesNameList "StylesExist")
				(setq
					FontStyleName    nil
					StylesExistIndex -1
					StylesToBeChangedIndex -1
				)
			)
		)
	)
)
;;;------------------------------------------------------------------------------------------------
;;;重命名文字样式 NewFontStyle RenameFontStyle StylesToBeChangedAddSelected StylesToBeChangedAddAll NameListToListBox StylesToBeChangedRemoveOne
(defun RenameFontStyle ( / fsOldName fsNewName fsDXF fstName)
	(if (>= StylesExistIndex 0)
		(setq fsOldName (nth StylesExistIndex ExistFontStylesNameList))
	)
	(setq
		fsNewName (car (InputBox "重命名文字样式" (list (list "文字样式的新名称:" fsOldName "12"))))
		fstName (tblobjname "STYLE" fsOldName)
		fsDXF (entget fstName)
	)
	(entmod (setq fsDXF (subst (cons 2 fsNewName) (assoc 2 fsDXF) fsDXF)))
	(entupd fstName)
	(setq ExistFontStylesNameList (subst fsNewName fsOldName ExistFontStylesNameList))
	(NameListToListBox ExistFontStylesNameList "StylesExist")
	(setq FontStyleName fsNewName)
	(if (member fsOldName ToBeChangedFontStylesNameList)
		(progn
			(setq ToBeChangedFontStylesNameList (subst fsNewName fsOldName ToBeChangedFontStylesNameList))
			(NameListToListBox ToBeChangedFontStylesNameList "StylesToBeChanged" )
			(setq StylesToBeChangedIndex -1)
		)
	)                                        ;如果重命名的文字样式存在于需要修改的样式列表中，则更新修改列表
)
;;;------------------------------------------------------------------------------------------------
;;;把已有样式中选定的样式名添加到修改样式列表
(defun StylesToBeChangedAddSelected (/ fsNameK)
	(if (>= StylesExistIndex 0)
		(progn
			(setq fsNameK (nth StylesExistIndex ExistFontStylesNameList))
			(if (member fsNameK ToBeChangedFontStylesNameList)
				(alert "所选择样式已在修改列表中!")

				(progn
					(setq ToBeChangedFontStylesNameList (append ToBeChangedFontStylesNameList (list fsNameK)))
					(NameListToListBox ToBeChangedFontStylesNameList "StylesToBeChanged" )
					(setq StylesToBeChangedIndex -1)
				)
			)
		)
	)
)
;;;------------------------------------------------------------------------------------------------
;;;把已有样式中所有的样式名添加到修改样式列表
(defun StylesToBeChangedAddAll ()
	(setq ToBeChangedFontStylesNameList ExistFontStylesNameList)
	(NameListToListBox ToBeChangedFontStylesNameList "StylesToBeChanged")
	(setq StylesToBeChangedIndex -1)
)
;;;------------------------------------------------------------------------------------------------
;;;根据相应列表值，重新设置对话框中listbox显示值
;;;调用形式 (  listbox名称  对应列表 )
(defun NameListToListBox (listName strListBoxName)
	(start_list strListBoxName 3 0)
	(mapcar 'add_list listName)
	(end_list)
)
;;;------------------------------------------------------------------------------------------------
;;;从修改样式列表中删除选定顶
(defun StylesToBeChangedRemoveOne (/ tempList i)
	(setq
		i -1
		tempList nil
	)
	(repeat (length ToBeChangedFontStylesNameList)
		(setq i (1+ i))
		(or (= i StylesToBeChangedIndex)
			(setq tempList (append tempList (list (nth i ToBeChangedFontStylesNameList))))
		)
	)
	(setq ToBeChangedFontStylesNameList tempList)
	(NameListToListBox ToBeChangedFontStylesNameList "StylesToBeChanged")
	(setq
		FontStyleName nil
		StylesToBeChangedIndex -1
	)
)
;;;------------------------------------------------------------------------------------------------
;;;清空修改样式列表
(defun StylesToBeChangedClear ()
	(setq ToBeChangedFontStylesNameList nil)
	(NameListToListBox ToBeChangedFontStylesNameList "StylesToBeChanged")
	(setq
		FontStyleName nil
		StylesToBeChangedIndex -1
	)
)
;;;------------------------------------------------------------------------------------------------
;;;点选已存在样式列表时
(defun StylesExistOnClick (keyValue)
	(setq
		StylesExistIndex (atoi keyValue)
		FontStyleName (nth StylesExistIndex ExistFontStylesNameList)
	)
	(GetFontStyleData)
)
;;;------------------------------------------------------------------------------------------------
;;;点选需修改样式列表时
(defun StylesToBeChangedOnClick (keyValue)
	(setq
		StylesToBeChangedIndex (atoi keyValue)
		FontStyleName (nth StylesToBeChangedIndex ToBeChangedFontStylesNameList)
	)
	(GetFontStyleData)
)
;;;------------------------------------------------------------------------------------------------
;;;主函数内容，设置、调用DCL
	(setq file_dcl (create_dcl_file))
	(and
		(setq dcl_id (load_dialog file_dcl))
		(new_dialog "cstyles" dcl_id)
		(progn
			(GetExistFontStyleNames)
			(setq
				FontStyleName nil
				StylesExistIndex -1
				StylesToBeChangedIndex -1
			)
			(action_tile "StylesExist" "(StylesExistOnClick $value)")
			(action_tile "StylesToBeChanged" "(StylesToBeChangedOnClick $value)")
			(action_tile "btAddSelected" "(StylesToBeChangedAddSelected)")
			(action_tile "btAddAll" "(StylesToBeChangedAddAll)")
			(action_tile "btStyleNew" "(NewFontStyle)")
			(action_tile "btStyleRename" "(RenameFontStyle)")
			(action_tile "btRemoveOne" "(StylesToBeChangedRemoveOne)")
			(action_tile "btRemoveAll" "(StylesToBeChangedClear)")
			(action_tile "btSetDefault" "(setDefaultFontStyleData)")
			(action_tile "btSetSongTi" "(setSongTiFontStyleData)")
			(action_tile "accept" "(getDCLTileFontStyleSet)(done_dialog 1)")
			(setq kw (start_dialog))
			(unload_dialog dcl_id)
			(if (= kw 1) (StylesToBeChangedChangeAll))
		)
	)
	(princ)
)
;;;------------------------------------------------------------------------------------------------
; (defun c:cs()
	; (c:cstyles)
; )
; (princ "文字样式管理器,启动命令\"cs\"")
