- Sub ChgColor()
- Dim pnt, ent As AcadEntity
- ThisDrawing.Utility.GetEntity ent, pnt
- ChangColor ent.Name
- Regen acActiveViewport
- End Sub
- Sub ChangeColor(BlockName As String)
- Dim ent As AcadEntity
- For Each ent In ThisDrawing.Blocks(BlockName)
- Debug.Print ent.ObjectName
- If ent.ObjectName = "AcDbHatch" Then ent.color = acRed
- If ent.ObjectName = "AcDbBlockReference" Then ChangColor ent.Name
- Next
- End Sub
|