Hi Forum
Mit oFrontViewGB.DefineFrontView 1, 0, 0, 0, 1, 0 wird eine Front View erstellt. View from 3D habe ich in der Doku R16 nicht gefunden.
Wir möchten mit einem Script 3D Views automatisch ins 2D ableiten. Hat jemeand einen Tipp.
Gruss
brhi
==== Aus der Doku ====== Front View erstellen
Private Sub Viewfrom3D_Click()
' -----------------------------------------------------------
' Optional: allows to find the sample wherever it's installed
Dim sDocPath As String
' -----------------------------------------------------------
' Open the Part document
Dim oPartToDraw As PartDocument
'Set oPartToDraw = CATIA.Documents.Open("c:\2DTest.CATPart")
Set documents1 = CATIA.Documents
Set oPartToDraw = documents1.Open("C:\2DTest.CATPart")
' Create a drawing document: it becomes the active document.
Dim oDrawing As DrawingDocument
Set oDrawing = CATIA.Documents.Add("Drawing")
' Retrieve the active sheet
Dim oSheet As DrawingSheet
Set oSheet = oDrawing.Sheets.ActiveSheet
' Create a view called "Front View" in this sheet
Dim oFrontView As DrawingView
Set oFrontView = oSheet.Views.Add("Front View")
' Retrieve it generative behavior
Dim oFrontViewGB As DrawingViewGenerativeBehavior
Set oFrontViewGB = oFrontView.GenerativeBehavior
' Declare the part to draw in this front view
oFrontViewGB.Document = oPartToDraw
' Define this view as a front view, with the XY plane (in oPartToDraw) as projection plane
oFrontViewGB.DefineFrontView 1, 0, 0, 0, 1, 0
'oFrontViewGB.DefineUnfoldedView 1, 0, 0, 0, 1, 0
'Position the View in the Sheet
oFrontView.x = 300
oFrontView.y = 150
' Update the view
oFrontViewGB.Update
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP