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()
Dim oDoc As Document
Set oDoc = CATIA.ActiveDocument
Dim oProd As Product
Set oProd = oDoc.Product
Dim oConstraintsCol As Constraints
Set oConstraintsCol = oProd.Connections("CATIAConstraints")
Dim oCoincid As Constraint
Set oCoincid = oConstraintsCol.Item(2) ' I have a fix as the first constraint
Dim oRef1 As Reference
Set oRef1 = oCoincid.GetConstraintElement(1) ' get first element of the coicidence
oDoc.Selection.Clear
oDoc.Selection.Add oRef1 ' just for fun
Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = oDoc.GetWorkbench("SPAWorkbench")
Set TheMeasurable = TheSPAWorkbench.GetMeasurable(oRef1)
Dim aAxisVector(2)
TheMeasurable.GetDirection aAxisVector
MsgBox (" vector of coincidence = " _
& aAxisVector(0) & "," & aAxisVector(1) & "," & aAxisVector(2))
oDoc.Selection.Clear
End Sub