Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub CATMain ()
' New CATPart creationn
Dim CATPart As Part
Dim Doc As Document
Set Doc = CATIA.Documents.Add ("Part")
Set CATPart = Doc.Part
' Get Sketches
Dim Sketch As Sketches
Set Sketch = CATPart.MainBody.Sketches
' Reference Plane creation
Dim ReferenceElement, Plane
Set ReferenceElement = CATPart.OriginElements
Set Plane = ReferenceElement.PlaneYZ
' Sketch creation
Dim Sk As Sketch
Set Sk = Sketch.Add (Plane)
' Sketch edition open
Dim Wzk As Factory2D
Set Wzk = Sk.OpenEdition
' Geometry creation
Dim Line As Line2D
Set Line = Wzk.CreateLine (-30, 0, -10, 50)
Line.Construction = False
Set Line = Wzk.CreateLine (-10, 50, 10, 50)
Line.Construction = False
Set Line = Wzk.CreateLine (10, 50, 30, 0)
Line.Construction = False
' Sketch close edition and CATpart update
Sk.CloseEdition
CATPart.Update
End Sub