明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1341|回复: 0

[求助]选择集问题

[复制链接]
发表于 2007-5-17 14:02:00 | 显示全部楼层 |阅读模式

我图形中有的图元包含如下的扩展数据
Dim datatype(0 To 7) As Integer
Dim data(0 To 7) As Variant
datatype(0) = 1001: data(0) = ""
datatype(1) = 1000: data(1) = jfh
datatype(2) = 1003: data(2) = "0"
datatype(3) = 1040: data(3) = 1.232
datatype(4) = 1041: data(4) = 100’此处有时候为100,有时候为0
datatype(5) = 1070: data(5) = jfid
datatype(6) = 1071: data(6) = zdh + 1
datatype(7) = 1042: data(7) = 10
ty.SetXData datatype, data
ThisDrawing.Application.Update

我想构建扩展数据里data(4) = 100的图元的选择集,可怎么总是出错呀?请高手指点
下面是我的代码
Sub pd()
On Error Resume Next
Dim p1(0 To 2) As Double
Dim p2(0 To 2) As Double
Dim fType, fData As Variant
'p1(0) = 100
'p1(1) = 100
'p1(2) = 0
'p2(0) = 500
'p2(1) = 500
'p2(2) = 0
Dim x, y As Double
Dim dh  As Long
fType(0) = 1041: fData(0) = 100
'ftype(1) = 2: fdata(1) = "界址圈"
'Call CreateSSetFilter(fType, fData, 1041, 100)
'tyxzj.Select acSelectionSetAll, , , fType, fData
Dim ggdxzj As AcadSelectionSet
If Not IsNull(ThisDrawing.SelectionSets.Item("jzq")) Then
 Set ggdxzj = ThisDrawing.SelectionSets.Item("jzq")
 ggdxzj.Delete
End If
Set ggdxzj = ThisDrawing.SelectionSets.Add("jzq")
ggdxzj.Select acSelectionSetAll, , , fType, fData
'ggdxzj.Select acSelectionSetWindow, p1, p2
'tyxzj.Select acSelectionSetAll, , , ftype, fdata
End Sub

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

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 14:24 , Processed in 0.178855 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表