Author Topic: Dashed & centerline scale in paperspace: huge!  (Read 2745 times)

0 Members and 1 Guest are viewing this topic.

havano

  • Guest
Dashed & centerline scale in paperspace: huge!
« on: December 06, 2006, 03:04:00 AM »
In my macro the sysvar LTSCALE is set to a value that makes dashed lines and centerlines look OK in modelspace. But in my paperspace layouts they show up like the draughtsman was in a big hurry. No matter whether sysvar PSLTSCALE is set to 0 or 1... they are huge!

How can I make the paperspace linetypes look the same as in modelspace?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8702
  • AKA Daniel
Re: Dashed & centerline scale in paperspace: huge!
« Reply #1 on: December 06, 2006, 03:10:01 AM »
after changing your PSLTSCALE you have to do a regenall for the change to show.

Dan

havano

  • Guest
Re: Dashed & centerline scale in paperspace: huge!
« Reply #2 on: December 06, 2006, 03:23:12 AM »
AHA! So I have to set PSLTSCALE to 0 (and do a REGENALL) for every layout. Very useful, your hint. Thanks Dan

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Dashed & centerline scale in paperspace: huge!
« Reply #3 on: December 06, 2006, 09:38:27 AM »
Another way is to leave the  PSLTSCALE set to 1 (Always) and use AcadDocument_LayoutSwitched to set the Lts to 1 or 0.5 whenever you go to paperspace then to what you want for modelspace. The other way works fine as long as you don't have different viewport scales

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Dashed & centerline scale in paperspace: huge!
« Reply #4 on: December 06, 2006, 10:17:05 AM »
Code: [Select]
Private Sub AcadDocument_LayoutSwitched(ByVal LayoutName As String)
    Dim dblLTScale As Double
    Dim dblDimScale As Double
    dblLTScale = 0.6 * (Val(ThisDrawing.GetVariable("DIMSCALE")))
    If dblLTScale = 0 Then
        dblLTScale = 0.6
    End If
    With ThisDrawing
        If .ActiveSpace = acModelSpace Then
            .SetVariable "LTSCALE", dblLTScale
            ThisDrawing.Regen acAllViewports
            Exit Sub
        Else
            .SetVariable "LTSCALE", 0.6
            .SetVariable "PSLTSCALE", 1
            ThisDrawing.Regen acAllViewports
            Exit Sub
        End If
    End With
    Exit Sub
End Sub
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Glenn R

  • Guest
Re: Dashed & centerline scale in paperspace: huge!
« Reply #5 on: December 06, 2006, 07:11:19 PM »
I initially used LayoutSwaitched when I wrote something like this a few years ago, especially for going to modelspace.
Nothing is more annoying than waiting for regens because the LTSCALE is set to 1 when it should be 500 for example.

I abandoned LayoutSwitched as it was too late in the chain of events ie you couldn't change the LTSCALE before AutoCAD regened the layout you were switching to, to make any difference. Acad would regen, then either your ltscale would regen or you would have to do it manually.

havano

  • Guest
Re: Dashed & centerline scale in paperspace: huge!
« Reply #6 on: December 07, 2006, 05:49:22 PM »
Thanks again all. I used a mix of your suggestions to make the paperspace ltscales look like the modelspace ones. By trial and error, not very elegant, better safe than sorry etc. Which makes my Autocad window flash like a policecar while adapting all the layouts. My customer will be very impressed!