Select method FilterType and FilterData

I write a VBA routine to create a selectionset that contains all rasterimages contained in my drawing (I use selectionset since an Image Collection Object is not defined in VBA). I use the method Select for all entities with vicSelectionSetAll and have to filter on Type (EntityName) afterwards. I suspect that the optional parameters FilterType and FilterData might be useful to me, but I dont find documentation on these parameters.Does anyone know how these parameters can be used / are to be used?Gerrit

Comments

  • FilterType and FilterDataFiltering is done by specifying 2 arrays. The 2 arrays describe a one-on-one mapping of 'filter-Type' to 'filter-Value'. The first array (FilterType)specifies the type of entity to filter. It stores DXF group codes (which are Integers). The second array (FilterData) specifies the matchingvalue for that type of filter. Because it can be both string or numerical it is declared as variant.1. FilterType:FilterType (Integer) A DXF group code specifying the type of filter to use.see http://www.afralisp.com/lispa/dxf.htm for a full list of DXF group codes.here are 3 commonly used DXF group codes:0 Entity type (fixed)8 Layer name (fixed)62 Color number (fixed)2. FilterData:FilterData (Variant) The value to filter on.code snips:'following function will allow a user to select only'lines ,arcs, circles and LWpolylines which use the color BYLAYER.'----------------------------------------------------------------Function SelectMany(sSetName As String) As IntelliCAD.SelectionSet Dim filterTypes() As Integer Dim filterData() As Variant ReDim filterTypes(1 To 2) ReDim filterData(1 To 2) filterTypes(1) = 0: filterData(1) = "line,arc,circle,LWpolyline" filterTypes(2) = 62: filterData(2) = 256 Set SelectMany = thisdrawing.SelectionSets.Add(sSetName) Call SelectMany.SelectOnScreen(filterTypes, filterData)End Function'following function will allow a user to select only Images.'----------------------------------------------------------------Function SelectImages(sSetName As String) As IntelliCAD.SelectionSet Dim filterTypes() As Integer Dim filterData() As Variant ReDim filterTypes(1 To 1) ReDim filterData(1 To 1) filterTypes(1) = 0 filterData(1) = "image" Set SelectImages = thisdrawing.SelectionSets.Add(sSetName) Call SelectImages.SelectOnScreen(filterTypes, filterData)End Function

This discussion has been closed.