Cad O Cad Posted October 6, 2009 Share Posted October 6, 2009 In my selection Set..I keep recieveng the error "....Invalid Argument Filter in Select". Maybe im Overlookin something and jus need another set of eyes to look at my code..can someone please help me out. Heres my code. This selction set looks at enitities on a drawing and select's them and then changes the color. The Line it Debugs to is underlined: Function ChangeColorOfLayouteight(strErrors) Dim S99 As AcadSelectionSet Dim Ftyp(19) As Integer Dim errCount As Long 'Dim strErrors As String Dim Fval(19) As Variant Dim dEnd As Variant '************************************************************** '* '* Program Begins '* Looks for outer contour of LO1 Doc. to Red '************************************************************** Ftyp(0) = -4: Fval(0) = "Ftyp(1) = 0: Fval(1) = "LINE" Ftyp(2) = 67: Fval(2) = 0 Ftyp(3) = 5: Fval(3) = BDA Ftyp(4) = 5: Fval(4) = BD8 Ftyp(5) = 5: Fval(5) = C37 Ftyp(6) = 5: Fval(6) = C36 Ftyp(7) = 5: Fval(7) = C1F Ftyp( 8 ) = 5: Fval( 8 ) = C35 Ftyp(9) = 5: Fval(9) = C34 Ftyp(10) = 5: Fval(10) = C33 Ftyp(11) = 5: Fval(11) = C32 Ftyp(12) = 5: Fval(12) = C31 Ftyp(13) = 5: Fval(13) = C30 Ftyp(14) = 5: Fval(14) = C2F Ftyp(15) = 5: Fval(15) = C2E Ftyp(16) = 5: Fval(16) = C2D Ftyp(17) = 5: Fval(17) = C2C Ftyp(18 ) = 5: Fval(18 ) = C2B 'Ftyp(3) = 41: Fval(3) = 0.03 'Ftyp(1) = 0: Fval(1) = "SOLID" 'Ftyp(5) = -4: Fval(5) = "OR>" 'Ftyp(3) = 62: Fval(3) = 1 'Ftyp(7) = : Fval(7) = 'Ftyp( 8 ) = : Fval( 8 ) = 'Ftyp(19) = -4: Fval(19) = "OR>" Ftyp(19) = -4: Fval(19) = "AND>" 'ThisDrawing.SelectionSets("S99").Delete Set S99 = ThisDrawing.SelectionSets.Add("S99") S99.Select acSelectionSetAll, , , Ftyp, Fval If S99.Count > 0 Then For errCount = 0 To S99.Count - 1 S99(errCount).color = acWhite 'S99(errCount) = "0.03" Next errCount End If ThisDrawing.SelectionSets("S99").Delete End Function Quote Link to comment Share on other sites More sharing options...
SEANT Posted October 6, 2009 Share Posted October 6, 2009 Handles (Code 5) are strings, so they might require quotes. One other thing: Your filter setup appears to be looking for lines in modelspace that would have to have multiple handles to pass. Should all the Ftyp = 5s be wrapped in Ftyp = -4: Fval = “ Quote Link to comment Share on other sites More sharing options...
Cad O Cad Posted October 6, 2009 Author Share Posted October 6, 2009 Well i had quotes before and that didnt seem to do it, so i dunno. I will try again along with ORs. I didnt think of that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.