VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use OR filter in selectionset

4 REPLIES 4
Reply
Message 1 of 5
clear_zero
256 Views, 4 Replies

How to use OR filter in selectionset

Hi Guys,

I want to select the object which has XData "A" or XData "B"

My code is

'Selectiong Set
Dim varXType(3) As Integer
Dim varXData As Variant

Set objSSet = CADdoc.SelectionSets.Add(sSetName)
'XData
ReDim varXData(3)
varXType(0) = -4: varXData(0) = " varXType(1) = 1001: varXData(1) = "A"
varXType(2) = 1001: varXData(2) = "B"
varXType(3) = -4: varXData(3) = "Or >"

objSSet.Select acSelectionSetAll, , , varXType, varXData

the Error is
Invalid argument filter list in Select
How can I change it

Thanks
4 REPLIES 4
Message 2 of 5
clear_zero
in reply to: clear_zero

why I can't post the full code?
Message 3 of 5
clear_zero
in reply to: clear_zero

My full code is in the attachment

Error message is
Invalid argument filter list in select

How can solve it
Message 4 of 5
Anonymous
in reply to: clear_zero

I don't think you can use the operators on xdata application names.

You can use "A,B" for the value of a single 1001 group to get the same

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5865334@discussion.autodesk.com...
My full code is in the attachment

Error message is
Invalid argument filter list in select

How can solve it
Message 5 of 5
Anonymous
in reply to: clear_zero

try this ...

Dim varXType(3) As Integer
Dim varXData As Variant
Dim sSetName As String
Dim objSSet As AcadSelectionSet

sSetName = "Test"

Set objSSet = ThisDrawing.SelectionSets.Add(sSetName)

'XData
ReDim varXData(3)

varXType(0) = -4: varXData(0) = " varXType(1) = 1001: varXData(1) = "A"
varXType(2) = 1001: varXData(2) = "B"
varXType(3) = -4: varXData(3) = "or>"

objSSet.Select acSelectionSetAll, , , varXType, varXData


wrote in message news:5865334@discussion.autodesk.com...
My full code is in the attachment

Error message is
Invalid argument filter list in select

How can solve it

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost