zhumb 发表于 2005-4-7 21:20:00

求助关于选择集的问题。

以下程序错在哪里?


'选择该层所有对象<BR>Public Sub s()<BR>Dim sset As AcadSelectionSet<BR>On Error Resume Next<BR>Set sset = ThisDrawing.SelectionSets.Item("SS1")<BR>sset.Delete<BR>Set sset = ThisDrawing.SelectionSets.Add("SS1")<BR>FilterType = 8<BR>FilterData = "0"<BR>sset.SelectOnScreen FilterType, FilterData<BR>End Sub

mccad 发表于 2005-4-7 21:34:00

过滤器有误,注意过滤器的两个参数是数组,而不是单纯的数据

alin 发表于 2005-4-7 21:46:00

Dim FilterType(0) As Integer<BR>Dim FilterData(0) As Variant<BR>FilterType(0) = 8<BR>FilterData(0) = "0"<BR>sset.SelectOnScreen FilterType, FilterData
页: [1]
查看完整版本: 求助关于选择集的问题。