|
|
Legend
Collection
Click arrow to expand chart |
|
The Layout2DRoot object is the root object for 2D Layout applications. It is retrieved from the Part root object thanks to the GetItem method, as follows. If no Layout2DRoot object exists, you can create it thanks to the Layout2DFactory object.
Dim LayRoot As Layout2DRoot Set LayRoot = CATIA.ActiveDocument.Part.GetItem("CATLayoutRoot") If LayRoot Is Nothing then Dim LayRoot Fact As Layout2DFactory Set LayRoot Fact = CATIA.ActiveDocument.Part.GetItem("CATLayoutRootFactory") Set LayRoot = LayRootFact.Create2DLayout("ISO_3D") End If
The Layout2DRoot object aggregates a Layout2DSheets collection of sheets, that contains Layout2DSheet objects, one of them being the active sheet. Each Layout2DSheet object contains a Layout2DViews collection of views. This collection contains Layout2DView objects, one of them being the active view.
Dim LaySheets As Layout2DSheets Set LaySheets = LayRoot.Sheets Dim LaySheet1, LaySheet2, LaySheet3 As Layout2DSheet Set LaySheet1 = LayRoot.ActiveSheet 'Retrieve the active sheet from the 2D layout root object Set LaySheet2 = LaySheets.ActiveSheet 'Retrieve the active sheet from the sheet collection Set LaySheet3 = LaySheets("MySheet") 'Retrieve a sheet using its name Dim LayViews As Layout2DViews Set LayViews = LaySheet2.Views Dim LayView1, LayView2 As LayoutView LayView1 = LayViews.ActiveView 'Retrieve the active view LayView1 = LayViews("MyView") 'Retrieve a view using its name
The Layout2DView object aggregates the same objets than the DrawingView object, except the generative objects: DrawingViewGenerativeBehavior and DrawingViewGenerativeLinks.
[Top]
Copyright © 1994-2005, Dassault Systèmes. All rights reserved.