关于筛选扩展数据 (VBA/ActiveX)
外部应用程序可以将文本字符串、数值、三维点、距离和图层名称等数据附着到 AutoCAD 对象。 此数据称为扩展数据或 xdata。您可以筛选包含指定应用程序的扩展数据的实体。 选择包含 xdata 的圆圈以下示例筛选包含“MY_APP”应用程序添加的 xdata 的圆圈: Sub Ch4_FilterXdata() Dim sstext As AcadSelectionSet Dim mode As Integer Dim pointsArray(0 To 11) As Double mode = acSelectionSetWindowPolygon pointsArray(0) = -12#: pointsArray(1) = -7#: pointsArray(2) = 0 pointsArray(3) = -12#: pointsArray(4) = 10#: pointsArray(5) = 0 pointsArray(6) = 10#: pointsArray(7) = 10#: pointsArray(8) = 0 pointsArray(9) = 10#: pointsArray(10) = -7#: pointsArray(11) = 0 Dim FilterType(1) As Integer Dim FilterData(1) As Variant Set sstext = ThisDrawing.SelectionSets.Add("SS9") FilterType(0) = 0 FilterData(0) = "Circle" FilterType(1) = 1001 FilterData(1) = "MY_APP" sstext.SelectByPolygon mode, pointsArray, FilterType, FilterData End Sub |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 11:34
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.