嘿Serge,
试试看。
这将把当前图形中的所有尺寸、图元的颜色放入“Bylayer”。这就是你需要的吗?
毫升
- Sub DimEntsToByLayer()
- Dim Ent As AcadEntity
- Dim Sset As AcadSelectionSet
- On Error Resume Next
- ThisDrawing.SelectionSets.Item("dims").Delete
- Set Sset = ThisDrawing.SelectionSets.Add("dims")
- Sset.Select acSelectionSetAll
- For Each Ent In Sset
- If TypeOf Ent Is AcadDimension Then
- Ent.color = acByLayer
- End If
- Next Ent
- Sset.Delete
- End Sub
|