- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using the API, can I create a workpoint in a Part, using the face of that Part selected within its Parent Assembly?
(to reiterate, I want to select the Part in the Assembly, and the workfeature MUST be created in the Part NOT the Assembly)
I can get the Face using
oFace = oApp.CommandManager.Pick(Inventor.SelectionFilterEnum.kPartFaceFilter, "Pick Face")
I can get the Part using
Dim oOcc As Inventor.ComponentOccurrence
oOcc = oFace.ContainingOccurrence
Dim oPartCompDef As Inventor.PartComponentDefinition
oPartCompDef = oOcc.Definition
But I cannot create a workpoint
Dim outerLoop As Inventor.EdgeLoop = Nothing
For Each outerLoop In oFace.EdgeLoops
If outerLoop.IsOuterEdgeLoop Then
Exit For
End If
Next
Dim oWorkPoint As Inventor.WorkPoint
oWorkPoint = oPartCompDef.WorkPoints.AddAtCentroid(outerLoop)
oWorkpoint comes back equalling 'Nothing'
Thanks in advance
MattH
Product Design Collection 2025
Vault Pro 2025
Solved! Go to Solution.