protected AdnButtonCommandBase(Inventor.Application Application) :
            base(Application)
        {
            _bIsRunning = false;

            _bNotifyExecWhenRunning = false;

            CommandForm = null;

            InteractionManager = new AdnInteractionManager(Application);

            InteractionManager.OnTerminateEvent +=
                new AdnInteractionManager.OnTerminateHandler(Handle_OnTerminateEvent);
        }
示例#2
0
        /////////////////////////////////////////////////////////////
        // Use: OnPreSelect Handler.
        //
        /////////////////////////////////////////////////////////////
        private void SelectEvents_OnPreSelect(
            ref object PreSelectEntity,
            out bool DoHighlight,
            ref ObjectCollection MorePreSelectEntities,
            SelectionDeviceEnum SelectionDevice,
            Point ModelPosition,
            Point2d ViewPosition,
            View View)
        {
            if (_PreSelectFilters.Count != 0 &&
                !_PreSelectFilters.Contains(
                    AdnInteractionManager.GetInventorType(PreSelectEntity)))
            {
                DoHighlight = false;
                return;
            }

            DoHighlight = true;
        }