如何给一个实体赋任意颜色
Dim pLine as AcadLine<BR> pLine.color=0~256(颜色值)<BR> 如果我要赋色如RGB(135,25,46),怎么实现reply
<P>使用TrueColor属性:</P><P>Sub TrueColor_Test()<BR> ' This example draws a line and returns the RGB values<BR> Dim color As AcadAcCmColor<BR> Set color = AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")<BR> Call color.SetRGB(80, 100, 244)<BR> <BR> Dim line As AcadLine<BR> Dim startPoint(0 To 2) As Double<BR> Dim endPoint(0 To 2) As Double<BR> <BR> startPoint(0) = 1#: startPoint(1) = 1#: startPoint(2) = 0#<BR> endPoint(0) = 5#: endPoint(1) = 5#: endPoint(2) = 0#<BR> <BR> Set line = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)<BR> ZoomAll<BR> <BR> line.TrueColor = color</P>
<P>End Sub</P> 3ku
页:
[1]