What I'm looking to do is to change the color of all hidden lines in my drawing. I just don't know how to select the lines with a type of hidden. On Error Resume Next Set ss = ThisDrawing.SelectionSets("temp") If Err Then Set ss = ThisDrawing.SelectionSets.Add("temp") ss.Clear On Error GoTo 0 fType(0) = 0: fData(0) = "INSERT" fType(1) = 2: fData(1) = BlkName ss.Select acSelectionSetAll, , , fType, fData I use the above code to select a block by a name. Can this be modified to select all lines with a linetype of "Hidden"? Someone gave me this code and I don't understand how it works. -- Thanks, David M. Gardner Change the DOT to reply.
David, You should be able to get all hidden linetypes with the following. Sub SelHiddenLType() Dim SS As AcadSelectionSet Dim fType(1) As Integer Dim fData(1) As Variant Set SS = SSDel("temp") fType(0) = 0: fData(0) = "line" fType(1) = 6: fData(1) = "HIDDEN" SS.Select acSelectionSetAll, , , fType, fData MsgBox SS.Count & " hidden line(s) found" End Sub Private Function SSDel(strName As String) As AcadSelectionSet ' Check Selection Set Name Dim ObjSS As AcadSelectionSet Dim objSSets As AcadSelectionSets Set objSSets = ThisDrawing.SelectionSets For Each ObjSS In objSSets If ObjSS.Name = strName Then objSSets.Item(strName).Delete Exit For End If Next Set ObjSS = objSSets.Add(strName) Set SSDel = ObjSS End Function Good luck, Bob Coward CADS, Inc 800-366-0946
From AutoCAD developer's help: ftype = FilterType "Integer; input-only; optional A DXF group code specifying the type of filter to use." fdata = FilterData "Variant; input-only; optional The value to filter on." ~Tim Riley
Hi Bob Coward, Is there a table were we can see all the fType and fData integer correspondense? Thanks
Raul, This isn't a hey Bob question but flattery for the day will get an answer...lol I believe your asking for and explanation that comes from the AutoCAD DXF Reference Help files. These are simply the associated dotted pair equals you might remember from the Lispr dayz. Some are easy to find, such as 0, and 8, while others are deep in the pages. This is where I find the answer to what to use (fType) and what it matches (fData). I hope this helps. Regards, Bob Coward CADS, Inc 800-366-0946
Could this be what you are looking for? I went to the "Developers Help" in AutoCAD and indexed to "DXF" then chose "DXF, conventions, group codes in numerical order" This seems to match. -- Thanks, David M. Gardner Change the DOT to reply.
Or is there a way to select any entity that has a hidden linetype? ie. circles, arcs, etc. -- Thanks, David M. Gardner Change the DOT to reply.
David, To select any common entity with hidden linetypes I took the original posted code and just asked for hidden linetypes. fType(0) = 6: fData(0) = "HIDDEN" SS.Select acSelectionSetAll, , , fType, fData You might want to play around with the posted code a lttle and see what entities you get with each run of the code. If you add : SS.Highlight True You'll be able to see the selection set entities highlighted. Good luck, Bob Coward CADS, Inc 800-366-0946