Page 1 of 1

error passing to PaperSpace

Posted: Mon Apr 06, 2020 10:04 pm
by GUILLERMO_ZELAYA
It doesn't work when I use the following line:

Intellicad.Activedocument.ActiveSpace = vicPaperSpace

I get the message "Method ActiveSpace of object IIcadDocument failed"

What's wrong? , it is supposed to work but it doesn't

Re: error passing to PaperSpace

Posted: Tue Apr 07, 2020 12:52 am
by QuanNguyen
Please use "IntelliCAD.ActiveDocument.ActiveLayout" to switch to the defined layout in paper space.
Refer this:

Code: Select all

Private Sub ChangeLayout()
    ' change to layout name:  layout2 
    For Each Layout In IntelliCAD.ActiveDocument.Layouts
        If UCase(Layout.Name) = "LAYOUT2" Then
            IntelliCAD.ActiveDocument.ActiveLayout = Layout
            Exit For
        End If
    Next
End Sub

Re: error passing to PaperSpace

Posted: Tue Apr 07, 2020 6:36 pm
by GUILLERMO_ZELAYA
thanks