polyline Lineweight not working in Viewport

polyline Lineweight not working in Viewport

Anonymous
Not applicable
2,201 Views
5 Replies
Message 1 of 6

polyline Lineweight not working in Viewport

Anonymous
Not applicable
Hi, I have a layout that has a viewport, I want to increase the lineweight of some polylines in the viewport, I use these lines:

poly1.Lineweight = ACAD_LWEIGHT.acLnWt050;
poly.Update();

It is updated in ModelSpace only when I click "LWT" button in AutoCAD, but in layout's viewport it has the value but lineweight doesn't show!
besides, will it not show exactly when printing; as it is shown in drawing?

Thank You
0 Likes
2,202 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
hi

you may need to check your LTSCALE, PSLTSCALE, LWDISPLAY etc as applicable also might want to try regenerating the viewport. The below is something i thought would be useful, but wasn't, but maybe can be instructional...




Sub Paper()
Dim Layouts As AcadLayouts, Layout As acadLayout
Dim X As Integer
Dim y As Integer
Dim layername As String
If Application.Preferences.Display.GraphicsWinLayoutBackgrndColor = vbBlack Then
    y = ThisDrawing.LAYERS.count
    For X = 0 To y - 1
    If ThisDrawing.LAYERS.Item(X).Plottable = False Then ThisDrawing.LAYERS.Item(X).LayerOn = False
    Next X
    'ThisDrawing.ActiveLayout.ShowPlotStyles = True
    Application.Preferences.Display.GraphicsWinLayoutBackgrndColor = vbWhite
    Application.Preferences.Display.LayoutCrosshairColor = vbBlack
    ThisDrawing.SetVariable "LWDISPLAY", 1
    Set Layouts = ThisDrawing.Layouts
    For Each Layout In Layouts
    Layout.ShowPlotStyles = True
    Next Layout
    ThisDrawing.Regen acAllViewports
Else
    y = ThisDrawing.LAYERS.count
    For X = 0 To y - 1
    If ThisDrawing.LAYERS.Item(X).Plottable = False Then ThisDrawing.LAYERS.Item(X).LayerOn = True
    Next X
    ThisDrawing.ActiveLayout.ShowPlotStyles = False
    Application.Preferences.Display.GraphicsWinLayoutBackgrndColor = vbBlack
    Application.Preferences.Display.LayoutCrosshairColor = vbWhite
    ThisDrawing.SetVariable "LWDISPLAY", 0
        ThisDrawing.Regen acActiveViewport
         Set Layouts = ThisDrawing.Layouts
        For Each Layout In Layouts
    Layout.ShowPlotStyles = False
    ThisDrawing.Regen acAllViewports
    Next Layout
End If
End Sub
0 Likes
Message 3 of 6

Anonymous
Not applicable

Read about lineweights in the help
files.

IIRC they are only a display property, and yes,
only with lwt on

They do not affect the actual size of the line and
do not affect printing

If you want to print lineweights you have to use
ctb or stb and set thickness there

If you want to see lines that are different weights
in your dwg(beyond what lwt gives), whether in ms or ps you have to use plines
and give them a .Width>0

hth

mark


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
I have a layout that has a viewport, I want to increase the lineweight of some
polylines in the viewport, I use these lines: poly1.Lineweight =
ACAD_LWEIGHT.acLnWt050; poly.Update(); It is updated in ModelSpace only when I
click "LWT" button in AutoCAD, but in layout's viewport it has the value but
lineweight doesn't show! besides, will it not show exactly when printing; as
it is shown in drawing? Thank You
0 Likes
Message 4 of 6

Anonymous
Not applicable

That's just not right. The lineweight settings
indeed can control plotted lineweights.

 

Many people do set
plotting lineweights via the ctb or stb pen tables, but you can set
the lineweight in the table to "use object lineweight" and the lineweight will
be controlled by the lineweight assigned to the layer or to individual
objects. I've been doing it this way for 10 years because it's way more flexible
in terms of adjusting lineweights to suit the drawing scale.

 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


Read about lineweights in the help
files.

IIRC they are only a display property, and yes,
only with lwt on

They do not affect the actual size of the line
and do not affect printing

If you want to print lineweights you have to use
ctb or stb and set thickness there

If you want to see lines that are different
weights in your dwg(beyond what lwt gives), whether in ms or ps you have to
use plines and give them a .Width>0

hth

mark


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
I have a layout that has a viewport, I want to increase the lineweight of
some polylines in the viewport, I use these lines: poly1.Lineweight =
ACAD_LWEIGHT.acLnWt050; poly.Update(); It is updated in ModelSpace only when
I click "LWT" button in AutoCAD, but in layout's viewport it has the value
but lineweight doesn't show! besides, will it not show exactly when
printing; as it is shown in drawing? Thank
You
0 Likes
Message 5 of 6

Anonymous
Not applicable

That's just flat-out wrong.

 

Object lineweight most certainly can control
plotted lineweights. I've been doing it that way for more than ten
years.

 

If your ctb or stb pen tables specify a lineweight
for a plotstyle, the object lineweight indeed will be ignored. But if you set
the pen table lineweight setting to "Use object lineweight," then the lineweight
will be the one assigned to the layer or object.

 

We use stb pen tables with the plotstyle
controlling only whether the object plots in black or in color, and whether it's
solid or halftone. The lineweight is controlled by the object layer. Gives us
tremendous flexibility in color plotting and in adjusting lineweights to suit
the drawing scale.

 

What in heaven's name is "IIRC"?


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


Read about lineweights in the help
files.

IIRC they are only a display property, and yes,
only with lwt on

They do not affect the actual size of the line
and do not affect printing

If you want to print lineweights you have to use
ctb or stb and set thickness there

If you want to see lines that are different
weights in your dwg(beyond what lwt gives), whether in ms or ps you have to
use plines and give them a .Width>0

hth

mark


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
I have a layout that has a viewport, I want to increase the lineweight of
some polylines in the viewport, I use these lines: poly1.Lineweight =
ACAD_LWEIGHT.acLnWt050; poly.Update(); It is updated in ModelSpace only when
I click "LWT" button in AutoCAD, but in layout's viewport it has the value
but lineweight doesn't show! besides, will it not show exactly when
printing; as it is shown in drawing? Thank
You
0 Likes
Message 6 of 6

Anonymous
Not applicable

Sorry for the double posting. I wasn't trying to
pile on; first time I tried, I got a message saying the reply couldn't be
posted, so I sent it again. But both showed up.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


Read about lineweights in the help
files.

IIRC they are only a display property, and yes,
only with lwt on

They do not affect the actual size of the line
and do not affect printing

If you want to print lineweights you have to use
ctb or stb and set thickness there

If you want to see lines that are different
weights in your dwg(beyond what lwt gives), whether in ms or ps you have to
use plines and give them a .Width>0

hth

mark


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
I have a layout that has a viewport, I want to increase the lineweight of
some polylines in the viewport, I use these lines: poly1.Lineweight =
ACAD_LWEIGHT.acLnWt050; poly.Update(); It is updated in ModelSpace only when
I click "LWT" button in AutoCAD, but in layout's viewport it has the value
but lineweight doesn't show! besides, will it not show exactly when
printing; as it is shown in drawing? Thank
You
0 Likes