乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 129|回复: 3

[编程交流] DXF码层描述

[复制链接]

61

主题

792

帖子

35

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1015
发表于 2022-7-27 14:39:48 | 显示全部楼层 |阅读模式

本帖以下内容被隐藏保护;需要你回复后,才能看到!

游客,如果您要查看本帖隐藏内容请回复
回复

使用道具 举报

0

主题

13

帖子

5

银币

初来乍到

Rank: 1

铜币
16
发表于 2022-7-27 14:58:14 | 显示全部楼层
这在我的笔记中。对不起,我对图层主题的注释非常短(就是这样),并且没有任何进一步阅读的链接。
  1. ;; LAYER group codes
  2. ;;  
  3. ;; Group codes -   Description
  4. ;;  
  5. ;; 100 - Subclass marker (AcDbLayerTableRecord)
  6. ;;  
  7. ;; 2  -   Layer name
  8. ;;  
  9. ;; 70 - Standard flags (bit-coded values):
  10. ;; 1  = Layer is frozen; otherwise layer is thawed
  11. ;; 2  = Layer is frozen by default in new viewports
  12. ;; 4  = Layer is locked
  13. ;; 16 = If set, table entry is externally dependent on an xref
  14. ;; 32 = If both this bit and bit 16 are set, the externally
  15. ;;      dependent xref has been successfully resolved
  16. ;; 64 = If set, the table entry was referenced by at least
  17. ;;      one entity in the drawing the last time the drawing
  18. ;;      was edited. (This flag is for the benefit of AutoCAD
  19. ;;      commands. It can be ignored by most programs that
  20. ;;      read DXF files and need not be set by programs that
  21. ;;      write DXF files)
  22. ;;  
  23. ;; 62 - Color number (if negative, layer is off)
  24. ;;  
  25. ;; 6 - Linetype name
  26. ;;  
  27. ;; 290 - Plotting flag. If set to 0, do not plot this layer
  28. ;;  
  29. ;; 370 - Lineweight enum value
  30. ;;
  31. ;; 380 - Ploy Style Name
  32. ;;  
  33. ;; 390 - Hard-pointer ID/handle of PlotStyleName object
  34. (entmake (list
  35.            '(0 . "LAYER")
  36.            '(100 . "AcDbSymbolTableRecord")
  37.            '(100 . "AcDbLayerTableRecord")
  38.            (cons 2 "G-Anno-Note") ; layername
  39.            (cons 70 0) ; stuff
  40.            (cons 62 141); color number
  41.            ;; (cons 290 ; plot
  42.            (cons 6 "Continuous") ;; linetype
  43.            (cons 370 050)
  44.            ;;  LAYER LINEWEIGHT
  45.            ;;  this should be an integer representing one of the standard lineweight
  46.            ;;  values multiplied by 100 (i.e. 2.11mm becomes 211). Use -3 to specify the
  47.            ;;  'Default' lineweight.
  48.            ;; (cons 390 "Normal")
  49.            (list -3 (list "AcAecLayerStandard" '(1000 . "") (cons 1000 "This is a description")))
  50.          )
  51. )
回复

使用道具 举报

0

主题

7

帖子

4

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-27 15:10:40 | 显示全部楼层
John,
感谢您发布您的笔记。
我可以使用
  1. (entget(tblobjname "LAYER" "LAYERNAME")'("AcAecLayerStandard"))

它将以下内容添加到entgent中。
  1. (-3 ("AcAecLayerStandard" (1000 . "") (1000 . "Sample Description Info"))

我的沼泽搜索技能需要提高。
我发现这是一个参考。
https://www . the swamp . org/index . PHP?谢谢你,马修·h。
回复

使用道具 举报

0

主题

12

帖子

7

银币

初来乍到

Rank: 1

铜币
13
发表于 2022-7-27 18:17:57 | 显示全部楼层
一般来说,每当试图确定某个实体的特定数据存储在DXF数据中的什么位置时,我总是建议创建一个具有目标属性的实体(无论是图形的还是非图形的,如图层),然后使用诸如我的实体列表函数(或相同性质的类似函数)之类的实用程序检查DXF数据。
对于您的情况,您可能会观察到如下数据:
  1. _$ (elist (tblobjname "layer" "0"))
  2. (
  3.     (-1 . )
  4.     (0 . "LAYER")
  5.     (5 . "10")
  6.     (102 . "{ACAD_XDICTIONARY")
  7.     (360 . )
  8.     (102 . "}")
  9.     (330 . )
  10.     (100 . "AcDbSymbolTableRecord")
  11.     (100 . "AcDbLayerTableRecord")
  12.     (2 . "0")
  13.     (70 . 0)
  14.     (62 . 7)
  15.     (6 . "Continuous")
  16.     (290 . 1)
  17.     (370 . -3)
  18.     (390 . )
  19.     (347 . )
  20.     (348 . )
  21.     (-3
  22.         (
  23.             "AcAecLayerStandard"
  24.             (1000 . "")
  25.             (1000 . "Layer 0 Description")
  26.         )
  27.     )
  28. )

另请注意,如果图形中尚未注册扩展数据应用程序ID,您可能需要使用
regapp
来注册该ID。
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-4 01:21 , Processed in 0.433586 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表