Beispiel #1
0
        protected AdnButtonCommandBase(Inventor.Application application) :
            base(application)
        {
            _bIsRunning = false;

            _bNotifyExecWhenRunning = false;

            CommandForm = null;

            InteractionManager = new AdnInteractionManager(application);

            InteractionManager.OnTerminateEvent +=
                new AdnInteractionManager.OnTerminateHandler(Handle_OnTerminateEvent);
        }
        /////////////////////////////////////////////////////////////
        // 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;
        }