void DoDemo() { Inventor.Application InvApp = AdnInventorUtilities.InvApplication; _compDef = AdnInventorUtilities.GetCompDefinition(InvApp.ActiveDocument); _surfaceBodies = AdnInventorUtilities.GetTransientBodies(_compDef); _interactionManager = new AdnInteractionManager(InvApp); _interactionManager.Initialize(); _interactionManager.OnTerminateEvent += new AdnInteractionManager.OnTerminateHandler(OnTerminateEvent); _clientGraphicsMng = new AdnClientGraphicsManager( InvApp, AdnInventorUtilities.AddInGuid); _clientGraphicsMng.SetGraphicsSource(_interactionManager.InteractionEvents); _interactionManager.SelectEvents.SingleSelectEnabled = true; _interactionManager.AddSelectionFilter(SelectionFilterEnum.kPartFacePlanarFilter); _interactionManager.AddSelectionFilter(SelectionFilterEnum.kWorkPlaneFilter); _interactionManager.SelectEvents.OnSelect += new SelectEventsSink_OnSelectEventHandler(SelectEvents_OnSelect); _interactionManager.Start("Select planar face or workplane: "); }
void DoDemo() { Inventor.Application InvApp = AdnInventorUtilities.InvApplication; _interactionManager = new AdnInteractionManager(InvApp); _interactionManager.Initialize(); _interactionManager.SelectEvents.SingleSelectEnabled = true; _interactionManager.OnTerminateEvent += new AdnInteractionManager.OnTerminateHandler(OnTerminateEvent); _interactionManager.SelectEvents.OnSelect += new SelectEventsSink_OnSelectEventHandler(SelectEvents_OnSelect); _interactionManager.AddSelectionFilter(SelectionFilterEnum.kPartFacePlanarFilter); _interactionManager.AddSelectionFilter(SelectionFilterEnum.kWorkPlaneFilter); _interactionManager.Start("Select workplane/planar face: "); _clientGraphicsMng = new AdnClientGraphicsManager( AdnInventorUtilities.InvApplication, AdnInventorUtilities.AddInGuid); _clientGraphicsMng.SetGraphicsSource( _interactionManager.InteractionEvents); _curveGraph = null; _mode = SelectModeEnum.kPlaneSelect; }