GetWidth method example
Sub GetSetWidth_Example()
Dim myLWP As AcadLWPolyline
Dim myPoints(0 To 5) As Double
myPoints(0) = 0: myPoints(1) = 0
myPoints(2) = 3: myPoints(3) = 0
myPoints(4) = 3: myPoints(5) = 4
Set myLWP = ThisDrawing.ModelSpace.AddLightWeightPolyline(myPoints)
myLWP.Closed = True
myLWP.Update
ThisDrawing.Application.ZoomExtents
Dim sw As Double
Dim ew As Double
myLWP.GetWidth 2, sw, ew
MsgBox "The starting width for the second segment is " & sw, , "Get/SetWidth Example"
myLWP.SetWidth 2, 1.2, ew
myLWP.GetWidth 2, sw, ew
myLWP.Update
MsgBox "The starting width for the second segment is now " & sw, , "Get/SetWidth Example "
End Sub
© Bricsys NV. All rights reserved. |