Message 1 of 7
Can you plot different layers in one Layout?

Not applicable
04-02-2007
03:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have 2 paperspace viewports in one layout and I want to make different layers appear in each viewport. My real goal is to plot the result. Is this possible? I've tried many things, below is a sample. To be honest, I'm having trouble plotting from paperspace to begin with (modelsspace has alway worked fine for me though), and the desire to see different layers in different paperspace viewports is compounding the problem.
Thanks for any tips,
Tony
Private Sub plotButton_Click()
Dim PaperSize As String, Orientation As String
Dim viewPort() As AcadPViewport, j As Integer
Dim i As Integer, label As String
If landscapeOption Then Orientation = "landscape" Else Orientation = "portrait"
If letterOption Then PaperSize = "letter" Else If legalOption Then PaperSize = "legal" Else PaperSize = "ledger"
'the following sub successfully creates the needed viewports
CreateLayout viewPort(), PaperSize, Orientation, vPortsPerPage
i = 1
Do
For j = 1 To vPortsPerPage
viewPort(j).Display True
'ThisDwg.MSpace = True
viewPort(j).Layer = LayerNamesArray(i)
i = i + 1
Next j
ThisDwg.Regen True
ThisDwg.ActiveLayout.PlotType = acLayout
ThisDwg.Plot.PlotToDevice
Loop Until i >= UBound(LayerNamesArray)
End Sub
Thanks for any tips,
Tony
Private Sub plotButton_Click()
Dim PaperSize As String, Orientation As String
Dim viewPort() As AcadPViewport, j As Integer
Dim i As Integer, label As String
If landscapeOption Then Orientation = "landscape" Else Orientation = "portrait"
If letterOption Then PaperSize = "letter" Else If legalOption Then PaperSize = "legal" Else PaperSize = "ledger"
'the following sub successfully creates the needed viewports
CreateLayout viewPort(), PaperSize, Orientation, vPortsPerPage
i = 1
Do
For j = 1 To vPortsPerPage
viewPort(j).Display True
'ThisDwg.MSpace = True
viewPort(j).Layer = LayerNamesArray(i)
i = i + 1
Next j
ThisDwg.Regen True
ThisDwg.ActiveLayout.PlotType = acLayout
ThisDwg.Plot.PlotToDevice
Loop Until i >= UBound(LayerNamesArray)
End Sub