I'm trying to build a selection set of text and mtext objects in c#
This works in vb:
Dim sstext As AcadSelectionSet
Dim FilterType(3) As Integer
Dim FilterData(3) As Variant
Set sstext = ThisDrawing.SelectionSets.Add("MySS")
FilterType(0) = -4
FilterData(0) = "<or"
FilterType(1) = 0
FilterData(1) = "TEXT"
FilterType(2) = 0
FilterData(2) = "MTEXT"
FilterType(3) = -4
FilterData(3) = "or>"
Call sstext.Select(acSelectionSetAll, FilterType, FilterData)
I get an exception - "Input String was not in a correct format" when I try to apply the filter on the last line here:
filterlist = new TypedValue[4];
filterlist[0] = new TypedValue(-4, "<or");
filterlist[1] = new TypedValue(0, "TEXT");
filterlist[2] = new TypedValue(0, "MTEXT");
filterlist[3] = new TypedValue(-4, "or>");
filter = new SelectionFilter(filterlist);
selRes = ed.SelectAll(filter);
Any clues?