乐筑天下

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

[编程交流] How: select all entities of an

[复制链接]

42

主题

173

帖子

132

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-5 16:16:14 | 显示全部楼层 |阅读模式
Greetings every one ...
i have an unnamed Groups through the drawing ... i want to apply some lisp every single group to all of its entities ...
 
i need some way to get a selection set of all the group entities by selecting only part of it BY "fence" method ... knowing that the groups are "unnamed"
 
...
thanks for reading
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 16:54:19 | 显示全部楼层
A start for you
 
  1. (setq mygroups(vla-get-groups (vla-get-activedocument (vlax-get-acad-object) )))(setq grpp (VLA-item mygroups 1)) ; 1 is second item starts at zeroCommand: (vlax-dump-object grpp); IAcadGroup: A named SelectionSet object; Property values:;   Application (RO) = #;   Count (RO) = 4;   Document (RO) = #;   Handle (RO) = "129E4";   HasExtensionDictionary (RO) = 0;   Layer (RO) = ...Indexed contents not shown...;   Linetype (RO) = ...Indexed contents not shown...;   LinetypeScale (RO) = ...Indexed contents not shown...;   Lineweight (RO) = ...Indexed contents not shown...;   Material (RO) = ...Indexed contents not shown...;   Name = "*A2";   ObjectID (RO) = 46;   ObjectName (RO) = "AcDbGroup";   OwnerID (RO) = 44;   PlotStyleName (RO) = ...Indexed contents not shown...;   TrueColor (RO) = ...Indexed contents not shown...;   Visible (RO) = ...Indexed contents not shown...
回复

使用道具 举报

58

主题

3353

帖子

33

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1761
发表于 2022-7-5 17:03:04 | 显示全部楼层
Maybe:
  1. (defun _groupedenames (ename / e) (if (and (= 'ename (type ename))   (setq e (cdr (member '(102 . "{ACAD_REACTORS") (entget ename))))   (setq e (cdr (assoc 330 e)))   (equal (cdr (assoc 0 (entget e))) "GROUP")   (setq e (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= 340 (car x))) (entget e))))     )   e ));; (mapcar '(lambda (x) (redraw x 3) x) (_groupedenames (car (entsel "Pick something"))))
回复

使用道具 举报

42

主题

173

帖子

132

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-5 17:31:08 | 显示全部楼层
thanks all for your help ... i ended with setting var "pickstyle" to 1 while selecting a part of the group to select the whole group then setting the "pickstyle" again to 0 .. and it did the trick ... thanks again and best regards
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 16:37 , Processed in 0.437023 second(s), 60 queries .

© 2020-2025 乐筑天下

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