Dassault Systemes Vba 7.1 May 2026
' Create sketch on XY plane Dim originElements As OriginElements Set originElements = part1.OriginElements Dim xyPlane As Reference Set xyPlane = originElements.PlaneXY
| Element | Syntax Example | |--------|----------------| | Variable | Dim partDoc As Document | | Loop | For i = 1 To 10 ... Next i | | Condition | If Not partDoc Is Nothing Then ... | | Function | Function GetPartName() As String | | Error handling | On Error Resume Next / On Error GoTo ErrHandler | dassault systemes vba 7.1
If Not lengthParam Is Nothing Then lengthParam.Value = 150.0 part.Update End If End Sub Sub SelectFace() Dim sel As Selection Set sel = CATIA.ActiveDocument.Selection sel.Clear ' Status returns "Normal" or "Cancel" Dim status As String status = sel.SelectElement("Face", "Select a face", False) ' Create sketch on XY plane Dim originElements
' Access parameters collection Dim params As Parameters Set params = part.Parameters "Select a face"
' In UserForm1 with TextBox1, CommandButton1 Private Sub CommandButton1_Click() GlobalHeight = CDbl(TextBox1.Text) Unload Me End Sub ' In main module Public GlobalHeight As Double