sophia506 发表于 2007-1-30 10:48:00

[求助]VBA如何修改线宽?

<p>请问在VBA中如何自定义线条宽度呀?</p><p>请大家多多帮助一下啊!</p>

jkbanana 发表于 2007-1-30 12:34:00

说具体点。

wyj7485 发表于 2007-1-30 15:11:00

object.Lineweight

sophia506 发表于 2007-1-31 17:05:00

总是提示不支持这个属性哦

gzmkshjsh 发表于 2007-2-1 08:27:00

<p>这里有个例子,帮助里面的,</p><pre class="Code">Sub Example_LineWeight()
    ' This example creates a circle in model space and then
    ' finds the current lineweight for the circle. The lineweight
    ' is then changed to a new value.
   
    Dim circleObj As AcadCircle
    Dim centerPoint(0 To 2) As Double
    Dim radius As Double
   
    ' Define the circle
    centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
    radius = 5#
   
    ' Create the Circle object in model space
    Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
    ZoomAll
   
    ' Find the lineweight for the circle
    MsgBox "The current lineweight for the circle is " &amp; circleObj.Lineweight
   
    ' Change the lineweight for the circle
    circleObj.Lineweight = acLnWt211
    circleObj.Update
    MsgBox "The current lineweight for the circle is " &amp; circleObj.Lineweight
End Sub</pre>
页: [1]
查看完整版本: [求助]VBA如何修改线宽?