JohnK 发表于 2022-7-27 14:39:48

DXF码层描述

**** Hidden Message *****

帮助 发表于 2022-7-27 14:58:14

这在我的笔记中。对不起,我对图层主题的注释非常短(就是这样),并且没有任何进一步阅读的链接。
;; LAYER group codes
;;
;; Group codes -   Description
;;
;; 100 - Subclass marker (AcDbLayerTableRecord)
;;
;; 2-   Layer name
;;
;; 70 - Standard flags (bit-coded values):
;; 1= Layer is frozen; otherwise layer is thawed
;; 2= Layer is frozen by default in new viewports
;; 4= Layer is locked
;; 16 = If set, table entry is externally dependent on an xref
;; 32 = If both this bit and bit 16 are set, the externally
;;      dependent xref has been successfully resolved
;; 64 = If set, the table entry was referenced by at least
;;      one entity in the drawing the last time the drawing
;;      was edited. (This flag is for the benefit of AutoCAD
;;      commands. It can be ignored by most programs that
;;      read DXF files and need not be set by programs that
;;      write DXF files)
;;
;; 62 - Color number (if negative, layer is off)
;;
;; 6 - Linetype name
;;
;; 290 - Plotting flag. If set to 0, do not plot this layer
;;
;; 370 - Lineweight enum value
;;
;; 380 - Ploy Style Name
;;
;; 390 - Hard-pointer ID/handle of PlotStyleName object

(entmake (list
         '(0 . "LAYER")
         '(100 . "AcDbSymbolTableRecord")
         '(100 . "AcDbLayerTableRecord")
         (cons 2 "G-Anno-Note") ; layername
         (cons 70 0) ; stuff
         (cons 62 141); color number
         ;; (cons 290 ; plot
         (cons 6 "Continuous") ;; linetype
         (cons 370 050)
         ;;LAYER LINEWEIGHT
         ;;this should be an integer representing one of the standard lineweight
         ;;values multiplied by 100 (i.e. 2.11mm becomes 211). Use -3 to specify the
         ;;'Default' lineweight.

         ;; (cons 390 "Normal")

         (list -3 (list "AcAecLayerStandard" '(1000 . "") (cons 1000 "This is a description")))
         )
)

牛东文-艾 发表于 2022-7-27 15:10:40

John,
感谢您发布您的笔记。
我可以使用
(entget(tblobjname "LAYER" "LAYERNAME")'("AcAecLayerStandard"))
它将以下内容添加到entgent中。
(-3 ("AcAecLayerStandard" (1000 . "") (1000 . "Sample Description Info"))
我的沼泽搜索技能需要提高。
我发现这是一个参考。
https://www . the swamp . org/index . PHP?谢谢你,马修·h。

大学女生 发表于 2022-7-27 18:17:57

一般来说,每当试图确定某个实体的特定数据存储在DXF数据中的什么位置时,我总是建议创建一个具有目标属性的实体(无论是图形的还是非图形的,如图层),然后使用诸如我的实体列表函数(或相同性质的类似函数)之类的实用程序检查DXF数据。
对于您的情况,您可能会观察到如下数据:
_$ (elist (tblobjname "layer" "0"))

(
    (-1 . )
    (0 . "LAYER")
    (5 . "10")
    (102 . "{ACAD_XDICTIONARY")
    (360 . )
    (102 . "}")
    (330 . )
    (100 . "AcDbSymbolTableRecord")
    (100 . "AcDbLayerTableRecord")
    (2 . "0")
    (70 . 0)
    (62 . 7)
    (6 . "Continuous")
    (290 . 1)
    (370 . -3)
    (390 . )
    (347 . )
    (348 . )
    (-3
      (
            "AcAecLayerStandard"
            (1000 . "")
            (1000 . "Layer 0 Description")
      )
    )
)
另请注意,如果图形中尚未注册扩展数据应用程序ID,您可能需要使用
regapp
来注册该ID。
页: [1]
查看完整版本: DXF码层描述