Is there a way to get a list of all layers that are used in ModelSpace??? If so, how?!? Thanks in advance! -- Matt W There are 3 kinds of people: Those who can count, and those who can't.
Something like this.... For Each obj in Modelspace strLay = obj.Layer 'place the strLay in a container (array, collection, dictionary...your choice) If typeof obj is blockreference then 'get the block definition 'step through the block def and get those layers End if Next Note this isn't real code, just a start of an idea for you..... HTH, Jeff
You should use "select" methode with filter on layer. set first Modelspace as activespace and create a selectionset dxf code for layer is 8 You can code like this Dim gpCode(0) As Integer Dim dataValue(0) As Variant gpCode(0) = 8 dataValue(0) = "LAYER_NAME" Dim groupCode As Variant, dataCode As Variant groupCode = gpCode dataCode = dataValue ssetObj.Select mode, corner1, corner2, groupCode, dataCode Use Autocad help for more details