.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it a bug?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
265 Views, 3 Replies

Is it a bug?

Hi,all.

Dim lay As Layout= ......
If lay.LayoutName (not equal sign) "Model" Then
Dim Vpt as ViewPort= ........
MsgBox (Vpt.objectId.Tostring)
End If

The above code occurs error.
If I explore Layout1 and Layout2 and excute my code then
the result is correct objectid.

We should explore? No another method?
Thanks in advance.

Edited by: gilseorin on Feb 2, 2010 6:02 PM
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Layouts are completely empty until they are initialized. When you "explore"
each layout, that causes them to be populated with the Paperspace viewport
and usually one other viewport through which Model Space can be viewed.

wrote in message news:6328484@discussion.autodesk.com...
Hi,all.

Dim lay As Layout= ......
If lay.LayoutName (not equal sign) "Model" Then
Dim Vpt as ViewPort= ........
MsgBox (Vpt.objectId.Tostring)
End If

The above code occurs error.
If I explore Layout1 and Layout2 and excute my code then
the result is correct objectid.

We should explore? No another method?
Thanks in advance.

Edited by: gilseorin on Feb 2, 2010 6:02 PM
Message 3 of 4
Anonymous
in reply to: Anonymous

Thank you very much.
Is it no way to initialize layout not manually but programmatically?
Message 4 of 4
Anonymous
in reply to: Anonymous

There's an Initialize() method on the Layout class that will create the
paper space viewport and set it up. It will not create any viewports to
view model space with - you can add those yourself after the Initialize()
method has returned.

wrote in message news:6329221@discussion.autodesk.com...
Thank you very much.
Is it no way to initialize layout not manually but programmatically?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost