分享个找颜色代码
采用VB编程如果不引用CAD的库,那acred\cagreen等颜色符号就没法用,只能输入编号,以下简单的代码就能查看全部颜色。Sub 找颜色()
Dim i&, x As Object
Dim p1(0 To 2) As Double, p2(0 To 2) As Double
For i = 0 To 256
If i / 16 = i \ 16 Then
p1(0) = p1(0) + 100: p1(1) = 0
Else
p1(1) = p1(1) + 70
End If
Set x = ThisDrawing.ModelSpace.AddText(i, p1, 30)
x.Color = i
Next i
End Sub
有意思! 下载试试,谢谢源码!
页:
[1]