Message 1 of 5
Determine if an object's layer is frozen or thawed

Not applicable
02-16-2006
12:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to calculate the total area of all polygons in the drawing whose layers include the prefix "AREA-" AND whose layer is not currently frozen. I don't want to include layers that are frozen.
I have gotten the calculation part down, as well as the layer prefix. How do I determine if the object's layer is frozen or thawed?
Here's what I've got so far...
Public Sub getareathawed()
Dim obj As AcadObject
totalArea = 0
For Each obj In ThisDrawing.ModelSpace
If obj.ObjectName = "AcDbPolyline" And InStr(1, obj.Layer, "AREA-", vbTextCompare) <> 0 Then
totalArea = totalArea + Format((obj.Area / 144), 0)
End If
Next
MsgBox totalArea & " Sq. Ft. on AREA layers"
End Sub
I have gotten the calculation part down, as well as the layer prefix. How do I determine if the object's layer is frozen or thawed?
Here's what I've got so far...
Public Sub getareathawed()
Dim obj As AcadObject
totalArea = 0
For Each obj In ThisDrawing.ModelSpace
If obj.ObjectName = "AcDbPolyline" And InStr(1, obj.Layer, "AREA-", vbTextCompare) <> 0 Then
totalArea = totalArea + Format((obj.Area / 144), 0)
End If
Next
MsgBox totalArea & " Sq. Ft. on AREA layers"
End Sub