Hallo Zusammmen
In naher Zukunft werde ich über 300 ähnliche einfache FTA-"Zeichnungen" erstellen müssen
Die Zeichnung müsste eine isometrische Ansicht mit Länge, Höhe und Dicke enthalten. Kann man das überhaupt automatisieren?
1. ISO-Kamera
2. ISO Capture auf dieser Kamera
3. Abmessungen
4. Fügen Sie 2 oder 3 zusätzliche Notizen in einer vorhandenen Aufnahme hinzu
Gruß
Lucas
Edit:
also schritt per Schritt dann
zuerst ich will neues Camera machen, mit neues Anschit, genau wie die CATIA typidche Isometric View ist. Ich habe versucht:
Code:
Dim objWindow As SpecsAndGeomWindow
Dim objViewer As Variant ' Viewer3D
Dim objCamera As Camera3D
Dim objViewpoint As Variant ' Viewpoint3D Set objWindow = CATIA.ActiveWindow
Set objCamera = CATIA.ActiveDocument.Cameras.Item(1)
Set objViewer = objWindow.ActiveViewer
Set objViewpoint = objViewer.Viewpoint3D
A = -0.577350258827209 ' <-Werte vom getSightdirection vom ISO Ansicht frueher gekriegt
b = -0.577350258827209
C = -0.577350258827209
objViewpoint.PutSightDirection Array(A, b, C) ' Isometric
objViewer.Reframe
und auch
Code:
Set objViewpoint = objCamera
Erstes quasi-funct, aber gibts mir andere Ergibnis jedes Mahl is Makro starte . Zweitest macht nix
Kann mir jemand mit ISO Ansicht Erstellung helfen?
Gruß
Lukas
OK, I'll use English from now on to better understand and describe the progress ;)
I've manged to center the view amd make it isometric with:
Code:
Sub Zoom_and_ISO()
Set ActDoc = CATIA.ActiveDocument
Dim camIsoView As Camera3D
Set camIsoView = ActDoc.Cameras.Item("* iso")
Dim objIsoViewPoint As Viewpoint3D
Set objIsoViewPoint = camIsoView.Viewpoint3D
Dim ActWin As Window
Set ActWin = CATIA.ActiveWindow
Dim ActViewer As Viewer3D
Set ActViewer = ActWin.ActiveViewer
ActViewer.Viewpoint3D = objIsoViewPoint
CATIA.StartCommand "Fit All In"
End Sub
Now - I'm trying to create a Capture (easy) and bind it to predefined NamedView (not easy / impossible)
It seems that this:
Code:
Dim oDWG As Part
Dim oDSel As Selection
Set oDSel = CATIA.ActiveDocument.Selection
Dim oSel
Set oSel = oDSel
Dim InputObjectType(0) As Variant
InputObjectType(0) = "Part"
Result = oSel.SelectElement2(InputObjectType(), "Select Drawing-Part", True)
Set oDWG = oSel.Item(1).Value
Dim ActDoc As Document
Set ActDoc = oDWG.Parent
ActDoc.Activate
Dim oCam As Camera
Set oCam = CATIA.ActiveWindow.ActiveViewer.NewCamera
oCam.Name = "General_Dimensions"
Dim oAS As AnnotationSet
Set oAS = oDWG.AnnotationSets.Item(1)
Dim oCap As Capture
Dim oCapFct As CaptureFactory
Dim oCaps As Captures
Set oCapFct = oAS.CaptureFactory
Set oCap = oCapFct.CreateCapture
oCap.Name = "C.General_Dimensions"
creates Camera under active document (which is a product) instead where I want it to be (which is catpart). I can't open the Drawing-Part in new window to make it ActiveWindow and create the camera, because the geometry to be showed is on another part. Anyone knows how to solve this?
[Diese Nachricht wurde von Sylas am 01. Aug. 2022 editiert.]
[Diese Nachricht wurde von Sylas am 01. Aug. 2022 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP