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.
Dim InputObject(0)
InputObject(0) = "Edge"
Dim coord(2) As Variant
Set ocentre = CATIA.ActiveDocument.Selection
Status = ocentre.SelectElement2(InputObject, "Select Circle", False)
Set otemp = ocentre.Item(1)
Set oprod = ocentre.FindObject("CATIAPart")
Set partDocument1 = documents1.Item(oprod.Parent.Name)
Set oPart = partDocument1.Part
Set ohsf = oPart.HybridShapeFactory
Set oRef = otemp.Reference
Set opoint = ohsf.AddNewPointCenter(oRef)
opoint.Compute
opoint.GetCoordinates coord
MsgBox ocentre.Item(1).Value.Parent.Parent.Parent.Parent.Name 'This is the line I need to get the instance name of the part the selected edge is on!
End