Dim oDocs As Documents
Set oDocs = CATIA.Documents
Dim oDOc As DrawingDocument
Set oDOc = CATIA.ActiveDocument
Dim oDoc1 As Document
Set oDoc1 = oDocs.Item("1.CATPart")
Dim oDRoot As DrawingRoot
Set oDRoot = oDOc.DrawingRoot
Dim oSheet As DrawingSheet
Set oSheet = oRoot.Item("Sheet.1")
Dim oViews As DrawingViews
Set oViews = oSheet.Views
Dim oView As DrawingView
Set oView = oViews.Add("Front View")
Dim oGb As DrawingViewGenerativeBehavior
Set oGb = oView.GenerativeBehavior
oGb.Document = oDoc1
oGb.DefineFrontView 0#, 1#, 0#, 0#, 0#, 1#
oSheet.Update
Dim rightview1 As DrawingView
Set rightview1 = oViews.Add("Right view")
Dim orightviewGb As DrawingViewGenerativeBehavior
Set orightviewGb = rightview1.GenerativeBehavior