PolyLine LineWeight

PolyLine LineWeight

Anonymous
Not applicable
414 Views
1 Reply
Message 1 of 2

PolyLine LineWeight

Anonymous
Not applicable
Hello,

I am trying to change the thickness of a lightweighPolyLine programmatically with VBA. I am using the following code:

oPline.Lineweight = acLnWt005

Where "oPline" is the polyline object. When I run this, the lineweight doesn't change at all. Is there some other factor involved here that I'm not aware of? Any help would be greatly appreciated.

Thanks
0 Likes
415 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I guess you need to set LWDISPLAY
system variable to 1:

Option Explicit

Sub test()

Dim oent As AcadEntity
Dim varPt
Dim oPline As AcadLWPolyline
ThisDrawing.SetVariable "LWDISPLAY", 1
ThisDrawing.Utility.GetEntity oent, varPt, "Select pline"
Set oPline = oent
oPline.Lineweight = acLnWt120
oPline.Update

End Sub

And another one:

acLnWt005 value is to small, maybe
you need to play with bigger values
say use acLnWt050

Hth

~'J'~
0 Likes