小毛草 发表于 2022-7-26 17:38:53

;;;自动创建常用图层
(defun c:FFF ()
(setvar "cmdecho" 0)
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "A-ELEV-LIN1-立面外轮廓线" "c" "42" "" "")
(command "layer" "m" "A-ELEV-LIN2-立面中轮廓线" "c" "2" "" "")
(command "layer" "m" "A-ELEV-LIN3-立面细轮廓线" "c" "153" "" "")
(command "layer" "m" "A-ELEV_OTHER-立面配景" "c" "153" "" "")
(command "layer" "m" "0-PM-固定家具" "c" "251" "" "")
(command "layer" "m" "0-PM-建筑面积计算" "c" "6" "" "")
(command "layer" "m" "DOOR" "c" "4" "" "")
(command "layer" "m" "DOOR-NAME" "c" "5" "" "")
(command "layer" "m" "大样剖切线" "c" "4" "" "")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" "" "N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;;自动创建常用总图图层
(defun c:FFA ()
(setvar "cmdecho" 0)
(command "layer" "m" "0-总图-建筑红线" "c" "1" "" "l" "PHANTOM" """")
(command "layer" "m" "0-总图-用地红线""c" "6" "" "l" "DOTE" """")
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "0-总图-道路红线" "c" "2" "" "")
(command "layer" "m" "0-总图-道路边线" "c" "3" "" "")
(command "layer" "m" "0-总图-道路中心线" "c" "1" "" "l" "CENTER" """")
(command "layer" "m" "0-总图-建筑外边线" "c" "42" "" "")
(command "layer" "m" "0-总图-建筑可视线" "c" "2" "" "")
(command "layer" "m" "0-总图-已建建筑外边线" "c" "190" "" "")
(command "layer" "m" "0-总图-围墙线" "c" "221" "" "")
(command "layer" "m" "0-总图-构筑物" "c" "6" "" "")
(command "layer" "m" "0-总图-园林植物" "c" "251" "" "")
(command "layer" "m" "0-总图-表格线" "c" "3" "" "")
(command "layer" "m" "0-总图-园林布置" "c" "2" "" "")
(command "layer" "m" "0-总图-摩托车位" "c" "6" "" "")
(command "layer" "m" "0-总图-非机车位" "c" "6" "" "")
(command "layer" "m" "0-总图-绿地面积" "c" "6" "" "")
(command "layer" "m" "0-总图-绿化树" "c" "251" "" "")   
(command "layer" "m" "0-总图-小汽车停车位" "c" "6" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" """N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;;自动创建装修常用图层
(defun c:FFG ()
(setvar "cmdecho" 0)
(command "layer" "m" "0-TF-天花布置" "c" "2" "" "")
(command "layer" "m" "0-FURN-平面图" "c" "2" "" "")
(command "layer" "m" "0-TF-天花灯具布置" "c" "6" "" "")
(command "layer" "m" "0-TF-天花尺寸标注" "c" "3" "" "")
(command "layer" "m" "0-DM-地面填充" "c" "251" "" "")
(command "layer" "m" "0-DM-地坪分割线" "c" "251" "" "")
(command "layer" "m" "0-DM-门槛线" "c" "251" "" "")
(command "layer" "m" "0-DM-地面尺寸标注" "c" "3" "" "")
(command "layer" "m" "0-FURN-平面布置图" "c" "2" "" "")
(command "layer" "m" "0-FURN-平面尺寸" "c" "2" "" "")
(command "layer" "m" "0-PM-固定家具" "c" "251" "" "")
(command "layer" "m" "DOOR" "c" "4" "" "")
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "DOOR-NAME" "c" "4" "" "")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "大样剖切线" "c" "4" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" """N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;通过命令设换到相应天花图层
(defun c:T1() (setvar "clayer" "0-TF-天花布置") (princ))
(defun c:T2() (setvar "clayer" "0-TF-天花尺寸标注") (princ))
(defun c:T3() (setvar "clayer" "0-TF-天花灯具布置") (princ))


;;通过命令设换到相应地面图层
(defun c:D1() (setvar "clayer" "0-DM-地面填充") (princ))
(defun c:D2() (setvar "clayer" "0-DM-地面尺寸标注") (princ))
(defun c:D3() (setvar "clayer" "0-DM-地坪分割线") (princ))

;;通过命令设换到相应图层
(defun c:F1() (setvar "clayer" "A-ELEV-LIN1-立面外轮廓线") (princ))
(defun c:F2() (setvar "clayer" "A-ELEV-LIN2-立面中轮廓线") (princ))
(defun c:F3() (setvar "clayer" "A-ELEV-LIN3-立面细轮廓线") (princ))
(defun c:F4() (setvar "clayer" "A-FURN-绘图层") (princ))
(defun c:F5() (setvar "clayer" "0-PM-固定家具") (princ))
(defun c:FFC() (setvar "clayer" "DOTE") (princ))
(defun c:FFD() (setvar "clayer" "DOOR") (princ))
(defun c:FFW() (setvar "clayer" "WINDOW") (princ))
(defun c:FFJ() (setvar "clayer" "0-总图-建筑红线") (princ))
(defun c:FFX() (setvar "clayer" "0-总图-用地红线") (princ))
(defun c:FW() (setvar "clayer" "WALL") (princ))
(defun c:F0() (setvar "clayer" "0") (princ))
;;;自动创建常用图层
(defun c:FFF ()
(setvar "cmdecho" 0)
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "A-ELEV-LIN1-立面外轮廓线" "c" "42" "" "")
(command "layer" "m" "A-ELEV-LIN2-立面中轮廓线" "c" "2" "" "")
(command "layer" "m" "A-ELEV-LIN3-立面细轮廓线" "c" "153" "" "")
(command "layer" "m" "A-ELEV_OTHER-立面配景" "c" "153" "" "")
(command "layer" "m" "0-PM-固定家具" "c" "251" "" "")
(command "layer" "m" "0-PM-建筑面积计算" "c" "6" "" "")
(command "layer" "m" "DOOR" "c" "4" "" "")
(command "layer" "m" "DOOR-NAME" "c" "5" "" "")
(command "layer" "m" "大样剖切线" "c" "4" "" "")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" "" "N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;;自动创建常用总图图层
(defun c:FFA ()
(setvar "cmdecho" 0)
(command "layer" "m" "0-总图-建筑红线" "c" "1" "" "l" "PHANTOM" """")
(command "layer" "m" "0-总图-用地红线""c" "6" "" "l" "DOTE" """")
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "0-总图-道路红线" "c" "2" "" "")
(command "layer" "m" "0-总图-道路边线" "c" "3" "" "")
(command "layer" "m" "0-总图-道路中心线" "c" "1" "" "l" "CENTER" """")
(command "layer" "m" "0-总图-建筑外边线" "c" "42" "" "")
(command "layer" "m" "0-总图-建筑可视线" "c" "2" "" "")
(command "layer" "m" "0-总图-已建建筑外边线" "c" "190" "" "")
(command "layer" "m" "0-总图-围墙线" "c" "221" "" "")
(command "layer" "m" "0-总图-构筑物" "c" "6" "" "")
(command "layer" "m" "0-总图-园林植物" "c" "251" "" "")
(command "layer" "m" "0-总图-表格线" "c" "3" "" "")
(command "layer" "m" "0-总图-园林布置" "c" "2" "" "")
(command "layer" "m" "0-总图-摩托车位" "c" "6" "" "")
(command "layer" "m" "0-总图-非机车位" "c" "6" "" "")
(command "layer" "m" "0-总图-绿地面积" "c" "6" "" "")
(command "layer" "m" "0-总图-绿化树" "c" "251" "" "")   
(command "layer" "m" "0-总图-小汽车停车位" "c" "6" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" """N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;;自动创建装修常用图层
(defun c:FFG ()
(setvar "cmdecho" 0)
(command "layer" "m" "0-TF-天花布置" "c" "2" "" "")
(command "layer" "m" "0-FURN-平面图" "c" "2" "" "")
(command "layer" "m" "0-TF-天花灯具布置" "c" "6" "" "")
(command "layer" "m" "0-TF-天花尺寸标注" "c" "3" "" "")
(command "layer" "m" "0-DM-地面填充" "c" "251" "" "")
(command "layer" "m" "0-DM-地坪分割线" "c" "251" "" "")
(command "layer" "m" "0-DM-门槛线" "c" "251" "" "")
(command "layer" "m" "0-DM-地面尺寸标注" "c" "3" "" "")
(command "layer" "m" "0-FURN-平面布置图" "c" "2" "" "")
(command "layer" "m" "0-FURN-平面尺寸" "c" "2" "" "")
(command "layer" "m" "0-PM-固定家具" "c" "251" "" "")
(command "layer" "m" "DOOR" "c" "4" "" "")
(command "layer" "m" "DOTE""c" "1" "" "l" "DOTE" """")
(command "layer" "m" "DOOR-NAME" "c" "4" "" "")
(command "layer" "m" "WALL" "c" "42" "" "")
(command "layer" "m" "大样剖切线" "c" "4" "" "")
(command "layer" "m" "PUB_WINDW" "c" "7" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
(command "-style" "ZG" "TXT1.shx,HZTXT1.shx" "" "0.7" "" "" """N")
(command "-style" "黑体" "黑体" "" "0.7" "" "" "")
(command ".layer" "p" "p" "PUB_WINDW" "")
(setvar "cmdecho" 1)
(princ)
)

;;通过命令设换到相应天花图层
(defun c:T1() (setvar "clayer" "0-TF-天花布置") (princ))
(defun c:T2() (setvar "clayer" "0-TF-天花尺寸标注") (princ))
(defun c:T3() (setvar "clayer" "0-TF-天花灯具布置") (princ))


;;通过命令设换到相应地面图层
(defun c:D1() (setvar "clayer" "0-DM-地面填充") (princ))
(defun c:D2() (setvar "clayer" "0-DM-地面尺寸标注") (princ))
(defun c:D3() (setvar "clayer" "0-DM-地坪分割线") (princ))

;;通过命令设换到相应图层
(defun c:F1() (setvar "clayer" "A-ELEV-LIN1-立面外轮廓线") (princ))
(defun c:F2() (setvar "clayer" "A-ELEV-LIN2-立面中轮廓线") (princ))
(defun c:F3() (setvar "clayer" "A-ELEV-LIN3-立面细轮廓线") (princ))
(defun c:F4() (setvar "clayer" "A-FURN-绘图层") (princ))
(defun c:F5() (setvar "clayer" "0-PM-固定家具") (princ))
(defun c:FFC() (setvar "clayer" "DOTE") (princ))
(defun c:FFD() (setvar "clayer" "DOOR") (princ))
(defun c:FFW() (setvar "clayer" "WINDOW") (princ))
(defun c:FFJ() (setvar "clayer" "0-总图-建筑红线") (princ))
(defun c:FFX() (setvar "clayer" "0-总图-用地红线") (princ))
(defun c:FW() (setvar "clayer" "WALL") (princ))
(defun c:F0() (setvar "clayer" "0") (princ))

没有昵称呀 发表于 2022-10-3 15:22:12


谢谢分享,支持楼主一下。

没有昵称呀 发表于 2022-10-3 15:24:06

还有个建议,如果能加上控制图层是否打印就更好了,明经上有这样的函数

sachindkini 发表于 2022-10-3 23:08:17

本帖最后由 sachindkini 于 2022-10-3 23:09 编辑


(defun c:MakeLayers nil (vl-load-com)
;; © Lee Mac 2010

;;----------------------------------------------------------------------------------------------;;
;; Specifications:                                                                              ;;
;;----------------------------------------------------------------------------------------------;;
;; Description         Data Type       Remarks                                                ;;
;;----------------------------------------------------------------------------------------------;;
;; Layer Name          STRING          Only standard chars allowed.                           ;;
;; Layer Colour      INTEGER         may be nil, -ve for Layer Off, Colour < 256            ;;
;; Layer Linetype      STRING          may be nil, If not loaded, CONTINUOUS.                   ;;
;; Layer Lineweight    REAL            may be nil, negative=Default, otherwise 0 <= x <= 2.11   ;;
;; Plot?               BOOLEAN         T = Plot Layer, nil otherwise                            ;;
;; Bit Flag            INTEGER         0=None, 1=Frozen, 2=Frozen in VP, 4=Locked               ;;
;; Description         STRING          may be nil for no description                            ;;
;;----------------------------------------------------------------------------------------------;;
;; Function will print list detailing any unsuccesful layers                                    ;;
;;----------------------------------------------------------------------------------------------;;

(
    (lambda ( lst )
      (mapcar 'print
      (vl-remove-if 'cdr
          (mapcar
            (function
            (lambda ( x )
                (and (caddr x) (LM:LoadLinetype (caddr x))) (cons (car x) (apply 'MakeLayer x))
            )
            )
            lst
          )
      )
      )
    )
   '(
    ;Name               Colour   Linetype    Lineweight Plot? BitflagDescription
    ( "EL_COMPONENTS"            7"CONTINUOUS"   -3       T      0      nil)
    ( "EL_CONSTR_COMP"         1"CONTINUOUS"   -3       T      0      nil)
    ( "EL_FITTINGS"            4"CONTINUOUS"   -3       T      0      nil)
    ( "EL_LABEL"               1"CONTINUOUS"   -3       T      0      nil)
    ( "EL_LABEL_TXT"         252"CONTINUOUS"   -3       T      0      nil)
    ( "EL_TERMINALS"             1"CONTINUOUS"   -3       T      0      nil)
    ( "EL_TERMINALS_PE"         24"CONTINUOUS"   -3       T      0      nil)
    ( "EL_TERMINALS_TXT"       252"CONTINUOUS"   -3       T      0      nil)
    ( "EL_TXT"               252"CONTINUOUS"   -3       T      0      nil)
    ( "EL_WIRES"               252"CONTINUOUS"   -3       T      0      nil)
    ( "GE_ANNOTATION"            7"CONTINUOUS"   -3       T      0      nil)
    ( "GE_LABEL"                10"CONTINUOUS"   -3       T      0      nil)
    ( "GE_LABEL_TEXT"          253"CONTINUOUS"   -3       T      0      nil)
    ( "GE_TXT_LANGUAGE_DU"   252"CONTINUOUS"   -3       T      0      nil)
    ( "GE_TXT_LANGUAGE_EN"   252"CONTINUOUS"   -3       T      0      nil)
    ( "GE_TXT_LANGUAGE_FR"   252"CONTINUOUS"   -3       T      0      nil)
    ( "GE_TXT_LANGUAGE_GE"   252"CONTINUOUS"   -3       T      0      nil)
    ( "LA_HEADER_FRAME"          7"CONTINUOUS"   -3       T      0      nil)
    ( "LA_HEADER_TXT"            7"CONTINUOUS"   -3       T      0      nil)
    ( "LA_MATLIST"             254"CONTINUOUS"   -3       T      0      nil)
    ( "LA_MATLIST_FRAME"       254"CONTINUOUS"   -3       T      0      nil)
    ( "LA_MATLIST_POS"         254"CONTINUOUS"   -3       T      0      nil)
    ( "LA_MATLIST_TXT"         252"CONTINUOUS"   -3       T      0      nil)
    ( "LA_TITLE_FRAME"         7"CONTINUOUS"   -3       T      0      nil)
    ( "LA_TITLE_LOGO"         10"CONTINUOUS"   -3       T      0      nil)
    ( "LA_TITLE_LOGO_TXT"      7"CONTINUOUS"   -3       T      0      nil)
    ( "LA_TITLE_TXT"             7"CONTINUOUS"   -3       T      0      nil)
    ( "LA_VIEWPORTS"         230"CONTINUOUS"   -3      nil   0      nil)
    ( "PN_ACCESSORIES"          30"CONTINUOUS"   -3       T      0      nil)
    ( "PN_ACTUATORS"         160"CONTINUOUS"   -3       T      0      nil)
    ( "PN_AIR_LINE_EQUIPMENT"   40"CONTINUOUS"   -3       T      0      nil)
    ( "PN_BRACKET_MOUNTING"      1"ACAD_ISO12W100" -3       T      0      nil)
    ( "PN_CABINET"               8"CONTINUOUS"   -3       T      0      nil)
    ( "PN_CABINET_DIM"         8"CONTINUOUS"   -3       T      0      nil)
    ( "PN_COMPONENTS"            7"CONTINUOUS"   -3       T      0      nil)
    ( "PN_CONDUCTS"            3"CONTINUOUS"   -3       T      0      nil)
    ( "PN_CONSTR_COMP"         2"CONTINUOUS"   -3       T      0      nil)
    ( "PN_DRAIN"               3"HIDDEN"         -3       T      0      nil)
    ( "PN_EXHAUST"             104"CONTINUOUS"   -3       T      0      nil)
    ( "PN_FITTINGS"             30"CONTINUOUS"   -3       T      0      nil)
    ( "PN_IDENTIFICATION"      4"CONTINUOUS"   -3       T      0      nil)
    ( "PN_PILOT_SUPPLY"          3"HIDDEN"         -3       T      0      nil)
    ( "PN_PORT_NUMBERS"          8"CONTINUOUS"   -3       T      0      nil)
    ( "PN_PRESSURE_SWITCHES"   200"CONTINUOUS"   -3       T      0      nil)
    ( "PN_PROPORTIONAL_VALVES" 226"CONTINUOUS"   -3       T      0      nil)
    ( "PN_SECTIONS"            3"CONTINUOUS"   -3       T      0      nil)
    ( "PN_SUB-BASES"             8"ACAD_ISO12W100" -3       T      0      nil)
    ( "PN_SUB-BASE_CONDUCTS"   2"CONTINUOUS"   -3       T      0      nil)
    ( "PN_SUPPLY"                3"CONTINUOUS"   -3       T      0      nil)
    ( "PN_TXT"                   3"CONTINUOUS"   -3       T      0      nil)
    ( "PN_VACUUM"               60"CONTINUOUS"   -3       T      0      nil)
    ( "PN_VALVES"            240"CONTINUOUS"   -3       T      0      nil)
    ( "PN_VALVES_OVERRIDE"       1"CONTINUOUS"   -3       T      0      nil)
    )
)
(princ)
)

(defun MakeLayer ( name colour linetype lineweight willplot bitflag description )
;; © Lee Mac 2010
(or (tblsearch "LAYER" name)
    (entmake
      (append
      (list
          (cons 0 "LAYER")
          (cons 100 "AcDbSymbolTableRecord")
          (cons 100 "AcDbLayerTableRecord")
          (cons 2name)
          (cons 70 bitflag)
          (cons 290 (if willplot 1 0))
          (cons 6
            (if (and linetype (tblsearch "LTYPE" linetype))
            linetype "CONTINUOUS"
            )
          )
          (cons 62 (if (and colour (< 0 (abs colour) 256)) colour 7))
          (cons 370
            (if (minusp lineweight) -3
            (fix
                (* 100
                  (if (and lineweight (<= 0.0 lineweight 2.11)) lineweight 0.0)
                )
            )
            )
          )
      )
      (if description
          (list
            (list -3
            (list "AcAecLayerStandard" (cons 1000 "") (cons 1000 description))
            )
          )
      )
      )
    )
)
)

;;--------------------=={ Load Linetype }==-------------------;;
;;                                                            ;;
;;Attempts to load a specified linetype from any linetype   ;;
;;definition files (.lin) found in the ACAD Support Path    ;;
;;------------------------------------------------------------;;
;;Author: Lee Mac, Copyright © 2011 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;Arguments:                                                ;;
;;lt - name of linetype to load                           ;;
;;------------------------------------------------------------;;
;;Returns:T if linetype loaded successfully, else nil   ;;
;;------------------------------------------------------------;;

(defun LM:LoadLinetype ( lt ) (vl-load-com)
;; © Lee Mac 2010

(cond
    ( (tblsearch "LTYPE" lt) )
    ( (progn
      (or acdoc (setq acdoc (vla-get-ActiveDocument (setq acapp (vlax-get-acad-object)))))
      (or aclts (setq aclts (vla-get-Linetypes acdoc)))

      (vl-some
          (function
            (lambda ( file )
            (vl-catch-all-apply 'vla-load (list aclts lt file))
            (and (tblsearch "LTYPE" lt))
            )
          )
          (setq *LineTypeDefs*
            (cond
            ( *LineTypeDefs* )
            (
                (apply 'append
                  (mapcar '(lambda ( directory ) (vl-directory-files directory "*.lin" 1))
                  (LM:str->lst
                      (vla-get-SupportPath (vla-get-Files (vla-get-Preferences acapp))) ";"
                  )
                  )
                )
            )
            )
          )
      )
      )
    )
)
)

;;-------------------=={ String to List }==-------------------;;
;;                                                            ;;
;;Separates a string into a list of strings using a         ;;
;;specified delimiter string                              ;;
;;------------------------------------------------------------;;
;;Author: Lee Mac, Copyright © 2011 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;Arguments:                                                ;;
;;str - string to process                                 ;;
;;del - delimiter by which to separate the string         ;;
;;------------------------------------------------------------;;
;;Returns:A list of strings                               ;;
;;------------------------------------------------------------;;

(defun LM:str->lst ( str del / pos )
;; © Lee Mac 2010
(if (setq pos (vl-string-search del str))
    (vl-remove "" (cons (substr str 1 pos) (LM:str->lst (substr str (+ pos 1 (strlen del))) del)))
    (list str)
)
)

sunny_8848 发表于 2022-11-1 15:23:53

谢谢分享,正好需要这个

37902505 发表于 2023-4-24 21:57:09

为什么导进去的图层文字是乱码的?:(

37902505 发表于 2023-4-24 22:11:52

导进去的图层:中文图层名字是乱码,求助要怎么解决?

chen780404 发表于 2023-5-2 21:18:54

高手,来看看吧。感谢了。

tfanghui 发表于 2023-5-2 22:01:14

本帖最后由 tfanghui 于 2023-5-8 17:17 编辑

chen780404 发表于 2023-5-2 21:18
高手,来看看吧。感谢了。
看什么,华佗看病还有个望闻问切,这是让看空气啊。

37902505 发表于 2023-5-5 10:00:56

37902505 发表于 2023-4-24 22:11
导进去的图层:中文图层名字是乱码,求助要怎么解决?

:handshake好,谢谢
页: 1 [2] 3
查看完整版本: 自动建立图层并指定图层名称、颜色、线型 、线宽