Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to create associative (auto-updating on parent entity changes) WorkPoint(s) at intersection of a given WorkAxis with a given flat/cylindrical Face.
The only workaround* way I've found till now is to prepare SelectSet and than execute UI command "PartCurveSurfaceWorkPointCmd" on it.
My current iLogic-code is:
Sub Main
dim oIPT as PartDocument
if Not ThisApplication.ActiveDocument.DocumentType.ToString().StartsWith("kPart")
logger.debug ("Active doc should be Part")
Exit Sub
else
oIPT = ThisApplication.ActiveDocument' ThisDoc.Document
end if
dim oCmdMgr As CommandManager = ThisApplication.CommandManager
if oIPT.ComponentDefinition.SurfaceBodies.Count = 0
logger.debug ("Cancelled (No bodies/faces)")
Exit Sub
end if
dim oSelSet as SelectSet = oIPT.SelectSet
dim oWA as WorkAxis = oCmdMgr.Pick(kWorkAxisFilter, "Pick the WorkAxis")
oSelSet.Select(oWA)
dim oFace as Face = oCmdMgr.Pick(kPartFaceFilter, "Pick the Face") ' to be somehow limited to oSB.Faces only
oSelSet.Select(oFace)
oCmdMgr.ControlDefinitions("PartCurveSurfaceWorkPointCmd").Execute
End Sub
This works OK for simple cases like planar face, but for cylindric face it creates only one WorkPoint (see the attached Inventor 2022 sample).
I'd like to know how can I create both associative WorkPoints.
* I believe there should be some WorkPoint.Add... method but I can't find it.
Please vote for Inventor-Idea Text Search within Option Names
Solved! Go to Solution.