因为很明显你很着急,我会再添加一些。只需在这个窗口中键入它,因此可能需要一些调整。
- Sub ChXrefColor()
- Dim oEnt As AcadEntity
- Dim oXRef As AcadExternalReference
- Dim i As Integer
- Dim col As Integer
- Dim oLays as acadlayers
- dim oLay as acadlayer
- dim sLay as string
- set olays as thisdrawing.layers
- col = CInt(InputBox(vbCrLf & "Enter color number : ", "XRef Color", 121))
- For Each oEnt In ThisDrawing.ModelSpace
- If TypeOf oEnt Is AcadExternalReference Then
- Set oXRef = oEnt
- for each olay in olays
- if left(olay.name, len(oxref.name)) = oxref.name then
- olay.color = col
- end if
- next olay
- End If
- Next oent
- End Sub
|