此示例演示一种用于访问组中包含的实体的方法。 本示例假定当前图形中存在一个名为 G1 的组。 (setq objdict (namedobjdict)) (setq grpdict (dictsearch objdict "ACAD_GROUP")) 这会将变量设置为 ACAD_GROUP 字典的实体定义列表,并返回以下内容:grpdict ((-1 . <Entity name: 8dc10468>) (0 . "DICTIONARY") (5 . "D") (102 . "{ACAD_REACTORS") (330 . <Entity name: 8dc10460>) (102 . "}") (100 . "AcDbDictionary") (3 . "G1") (350 . <Entity name: 8dc41240>)) 下面的代码将变量设置为 G1 组的实体定义列表:group1 (setq group1 (dictsearch (cdar grpdict) "G1")) ((-1 . <Entity name: 8dc10518>) (0 . "GROUP") (5 . "23") (102 . "{ACAD_REACTORS") (330 . <Entity name: 8dc10468>) (102 . "}") (100 . "AcDbGroup") (300 . "line and circle") (70 . 0) (71 . 1) (340 . <Entity name: 8dc10510>)(340 . <Entity name: 8dc10550>)) 340 组代码是属于该组的实体。 父主题: |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 14:47
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.