PVport not created

Discussion in 'AutoCAD' started by Marie Desaulniers, Jun 11, 2004.

  1. I'm trying to create a viewport in a specific layout and it doesn't work. I read a lot of post but I can't find what is wrong with my code. Someone can help me ?

    Dim objVp As AcadPViewport
    Dim ptCenter(0 To 2) As Variant
    Dim dblWidth As Double
    Dim dblHeight As Double

    ThisDrawing.ActiveLayout = ThisDrawing.Layouts("General")
    ptCenter(0) = 106.75
    ptCenter(1) = 99.25
    ptCenter(2) = 0#
    dblWidth = 198.85
    dblHeight = 177#
    set objVp = ThisDrawing.PaperSpace.AddPViewport(ptCenter, dblWidth, dblHeight)
    With objVp
    .Display (True)
    .ViewportOn = True
    End With

    ThisDrawing.Regen acAllViewports

    Thanks,

    Marie
     
    Marie Desaulniers, Jun 11, 2004
    #1
  2. Sorry, I'm on the wrong group.
     
    Marie Desaulniers, Jun 11, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.