Exemplo n.º 1
0
        /// <summary>
        /// Create a button from inventor using Image file as icon
        /// </summary>
        /// <param name="app"></param>
        /// <param name="displayName"></param>
        /// <param name="internalName"></param>
        /// <param name="commandType"></param>
        /// <param name="clientId"></param>
        /// <param name="description"></param>
        /// <param name="tooltip"></param>
        /// <param name="standardIcon"></param>
        /// <param name="largeIcon"></param>
        /// <param name="buttonDisplayType"></param>
        public Button(Inventor.Application app,
                      string displayName,
                      string internalName,
                      CommandTypesEnum commandType,
                      string clientId,
                      string description,
                      string tooltip,
                      object standardIcon,
                      object largeIcon,
                      ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                _buttonDefinition = app.CommandManager
                                    .ControlDefinitions
                                    .AddButtonDefinition(displayName,
                                                         internalName,
                                                         commandType,
                                                         clientId,
                                                         description,
                                                         tooltip,
                                                         standardIcon,
                                                         largeIcon,
                                                         buttonDisplayType);

                _buttonDefinition.Enabled         = true;
                _buttonDef_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(Button_OnExecute);
                _buttonDefinition.OnExecute      += _buttonDef_OnExecuteEventDelegate;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                throw new ApplicationException(ex.Message);
            }
        }
 /// <summary>
 /// The most comprehensive signature.
 /// </summary>
 public InventorButton(string displayName, string internalName, string description, string tooltip,
                       Icon standardIcon, Icon largeIcon,
                       CommandTypesEnum commandType, ButtonDisplayEnum buttonDisplayType)
 {
     Create(displayName, internalName, description, tooltip, AddinGlobal.ClassId,
            standardIcon, largeIcon, commandType, buttonDisplayType);
 }
Exemplo n.º 3
0
        public Button(string displayName,
                      string internalName,
                      CommandTypesEnum commandType,
                      string clientId,
                      string description,
                      string tooltip,
                      ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                buttonDefinition = PersistenceManager.InventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName,
                                                                                                                                internalName,
                                                                                                                                commandType,
                                                                                                                                clientId,
                                                                                                                                description,
                                                                                                                                tooltip,
                                                                                                                                Type.Missing,
                                                                                                                                Type.Missing,
                                                                                                                                buttonDisplayType);

                buttonDefinition.Enabled = true;
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
            }

            catch (Exception e)
            {
                throw new ApplicationException(e.ToString());
            }
        }
Exemplo n.º 4
0
        public Button(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, Icon standardIcon, Icon largeIcon, ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                //get IPictureDisp for icons
                stdole.IPictureDisp standardIconIPictureDisp;
                standardIconIPictureDisp = (stdole.IPictureDisp)Support.IconToIPicture(standardIcon);

                stdole.IPictureDisp largeIconIPictureDisp;
                largeIconIPictureDisp = (stdole.IPictureDisp)Support.IconToIPicture(largeIcon);

                //create button definition
                m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, internalName, commandType, clientId, description, tooltip, standardIconIPictureDisp , largeIconIPictureDisp, buttonDisplayType);

                //enable the button
                m_buttonDefinition.Enabled = true;

                //connect the button event sink
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                m_buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
            }
            catch(Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Exemplo n.º 5
0
 public ChainToOrdButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId,
                         string description, string tooltip, Icon standardIcon, Icon largeIcon, ButtonDisplayEnum buttonDisplayType)
     : base(
         displayName, internalName, commandType, clientId, description, tooltip, standardIcon, largeIcon,
         buttonDisplayType)
 {
 }
        /// <summary>
        /// The helper method for constructors to call to avoid duplicate code.
        /// </summary>
        public void Create(
            string displayName, string internalName, string description, string tooltip,
            string clientId,
            Icon standardIcon, Icon largeIcon,
            CommandTypesEnum commandType, ButtonDisplayEnum buttonDisplayType)
        {
            if (string.IsNullOrEmpty(clientId))
            {
                clientId = AddinGlobal.ClassId;
            }

            stdole.IPictureDisp standardIconIPictureDisp = null;
            stdole.IPictureDisp largeIconIPictureDisp    = null;
            if (standardIcon != null)
            {
                standardIconIPictureDisp = Support.IconToIPicture(standardIcon) as stdole.IPictureDisp;
                largeIconIPictureDisp    = (stdole.IPictureDisp)Support.IconToIPicture(largeIcon);
            }

            mButtonDef = AddinGlobal.InventorApp.CommandManager.ControlDefinitions.AddButtonDefinition(
                displayName, internalName, commandType,
                clientId, description, tooltip,
                standardIconIPictureDisp, largeIconIPictureDisp, buttonDisplayType);

            mButtonDef.Enabled    = true;
            mButtonDef.OnExecute += ButtonDefinition_OnExecute;

            DisplayText = true;

            AddinGlobal.ButtonList.Add(this);
        }
Exemplo n.º 7
0
        public Button(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, Icon standardIcon, Icon largeIcon, ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                //get IPictureDisp for icons
                stdole.IPictureDisp standardIconIPictureDisp;
                standardIconIPictureDisp = (stdole.IPictureDisp)Support.IconToIPicture(standardIcon);

                stdole.IPictureDisp largeIconIPictureDisp;
                largeIconIPictureDisp = (stdole.IPictureDisp)Support.IconToIPicture(largeIcon);

                //create button definition
                m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, internalName, commandType, clientId, description, tooltip, standardIconIPictureDisp, largeIconIPictureDisp, buttonDisplayType);

                //enable the button
                m_buttonDefinition.Enabled = true;

                //connect the button event sink
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                m_buttonDefinition.OnExecute           += ButtonDefinition_OnExecuteEventDelegate;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Exemplo n.º 8
0
		public Button(string displayName, 
                      string internalName, 
                      CommandTypesEnum commandType, 
                      string clientId, 
                      string description, 
                      string tooltip, 
                      ButtonDisplayEnum buttonDisplayType)
		{
			try
			{			
                buttonDefinition = PersistenceManager.InventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, 
                                                                                                                             internalName, 
                                                                                                                             commandType, 
                                                                                                                             clientId, 
                                                                                                                             description, 
                                                                                                                             tooltip, 
                                                                                                                             Type.Missing, 
                                                                                                                             Type.Missing, 
                                                                                                                             buttonDisplayType);
								
                buttonDefinition.Enabled = true;
				ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
			}

			catch(Exception e)
			{
                throw new ApplicationException(e.ToString());
			}
		}
Exemplo n.º 9
0
 private void DocumentEvents_OnChange(CommandTypesEnum ReasonsForChange,
                                      EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
 {
     if (ReasonsForChange == CommandTypesEnum.kFilePropertyEditCmdType)
     {
         InitializeMembers();
     }
     HandlingCode = HandlingCodeEnum.kEventHandled;
 }
		public DynamoInventorAddinButton(string displayName, 
                                         string internalName, 
                                         CommandTypesEnum commandType, 
                                         string clientId, 
                                         string description, 
                                         string tooltip, 
                                         ButtonDisplayEnum buttonDisplayType)
			: base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
		{		
		}
Exemplo n.º 11
0
 public InvComboBox(string DisplayName, string InternalName, CommandTypesEnum Classification, int DropDownWidth,
                    object ClientId, object StandardIcon, object LargeIcon, string DescriptionText = "", string ToolTipText = "",
                    ButtonDisplayEnum ButtonDisplay = ButtonDisplayEnum.kDisplayTextInLearningMode)
 {
     m_ComboBoxDef = m_inventorApplication.CommandManager.ControlDefinitions.AddComboBoxDefinition(DisplayName, InternalName, Classification, DropDownWidth, ClientId,
                                                                                                   DescriptionText, ToolTipText, StandardIcon, LargeIcon);
     m_ComboBoxDef.Enabled   = true;
     m_cbEhDelegate          = new ComboBoxDefinitionSink_OnSelectEventHandler(ComboBoxDefinition_OnSelect);
     m_ComboBoxDef.OnSelect += m_cbEhDelegate;
 }
Exemplo n.º 12
0
 public DynamoInventorAddinButton(string displayName,
                                  string internalName,
                                  CommandTypesEnum commandType,
                                  string clientId,
                                  string description,
                                  string tooltip,
                                  ButtonDisplayEnum buttonDisplayType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
 }
Exemplo n.º 13
0
 public ButtonParametersAttribute(
     string displayName, string internalName,
     CommandTypesEnum classification = CommandTypesEnum.kQueryOnlyCmdType,
     string descriptionText          = "", string toolTipText = "",
     string clientId = "")
 {
     DisplayName     = displayName;
     InternalName    = internalName;
     Classification  = classification;
     ClientId        = clientId;
     DescriptionText = descriptionText;
     ToolTipText     = toolTipText;
 }
 public ExportButton(Inventor.Application app,
                     string displayName,
                     string internalName,
                     CommandTypesEnum commandType,
                     string clientId,
                     string description,
                     string tooltip,
                     object standardIcon,
                     object largeIcon,
                     ButtonDisplayEnum buttonDisplayType) :
     base(app, displayName, internalName, commandType, clientId, description, tooltip, standardIcon, largeIcon, buttonDisplayType)
 {
 }
Exemplo n.º 15
0
 public Button(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
 {
     try
     {
         m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, "Autodesk:Macros:" + internalName,
                                                                                                          commandType, clientId, description, tooltip,
                                                                                                          Type.Missing, Type.Missing, buttonDisplayType);
         m_buttonDefinition.Enabled = true;
         ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
         m_buttonDefinition.OnExecute           += ButtonDefinition_OnExecuteEventDelegate;
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Exemplo n.º 16
0
        public Button(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                //create button definition
                m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, internalName, commandType, clientId, description, tooltip, Type.Missing, Type.Missing, buttonDisplayType);

                //enable the button
                m_buttonDefinition.Enabled = true;

                //connect the button event sink
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                m_buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
            }
            catch(Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Exemplo n.º 17
0
        public Button(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                //create button definition
                m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, internalName, commandType, clientId, description, tooltip, Type.Missing, Type.Missing, buttonDisplayType);

                //enable the button
                m_buttonDefinition.Enabled = true;

                //connect the button event sink
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                m_buttonDefinition.OnExecute           += ButtonDefinition_OnExecuteEventDelegate;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Exemplo n.º 18
0
		public Button(string displayName, 
                      string internalName, 
                      CommandTypesEnum commandType, 
                      string clientId, 
                      string description, 
                      string tooltip, 
                      Icon standardIcon, 
                      Icon largeIcon, 
                      ButtonDisplayEnum buttonDisplayType)
		{
			try
			{
				stdole.IPictureDisp standardIconIPictureDisp;				
				standardIconIPictureDisp = PictureDispConverter.ToIPictureDisp(standardIcon);			
				stdole.IPictureDisp largeIconIPictureDisp;
		        largeIconIPictureDisp = PictureDispConverter.ToIPictureDisp(largeIcon);   
				buttonDefinition = PersistenceManager.InventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName, 
                                                                                                                             internalName, 
                                                                                                                             commandType, 
                                                                                                                             clientId, 
                                                                                                                             description, 
                                                                                                                             tooltip, 
                                                                                                                             standardIconIPictureDisp , 
                                                                                                                             largeIconIPictureDisp, 
                                                                                                                             buttonDisplayType);
												
                buttonDefinition.Enabled = true;			
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
			}

			catch(Exception e)
			{
                throw new ApplicationException(e.ToString());
			}
		}
Exemplo n.º 19
0
        public Button(string displayName,
                      string internalName,
                      CommandTypesEnum commandType,
                      string clientId,
                      string description,
                      string tooltip,
                      Icon standardIcon,
                      Icon largeIcon,
                      ButtonDisplayEnum buttonDisplayType)
        {
            try
            {
                stdole.IPictureDisp standardIconIPictureDisp;
                standardIconIPictureDisp = PictureDispConverter.ToIPictureDisp(standardIcon);
                stdole.IPictureDisp largeIconIPictureDisp;
                largeIconIPictureDisp = PictureDispConverter.ToIPictureDisp(largeIcon);
                buttonDefinition      = PersistenceManager.InventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(displayName,
                                                                                                                                     internalName,
                                                                                                                                     commandType,
                                                                                                                                     clientId,
                                                                                                                                     description,
                                                                                                                                     tooltip,
                                                                                                                                     standardIconIPictureDisp,
                                                                                                                                     largeIconIPictureDisp,
                                                                                                                                     buttonDisplayType);

                buttonDefinition.Enabled = true;
                ButtonDefinition_OnExecuteEventDelegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
                buttonDefinition.OnExecute += ButtonDefinition_OnExecuteEventDelegate;
            }

            catch (Exception e)
            {
                throw new ApplicationException(e.ToString());
            }
        }
Exemplo n.º 20
0
 public addInButtonDefinition(string Name, string ToolTip, Icon small_Ico, CommandTypesEnum cmd_Type)
 {
     assemble(var_es._ClientId, Name, "id_" + Name, ToolTip, "", small_Ico, null, cmd_Type, ButtonDisplayEnum.kDisplayTextInLearningMode);
 }
Exemplo n.º 21
0
        /*
         * public addInButtonDefinition(string Name, string ToolTip, Icon large_Ico, CommandTypesEnum cmd_Type)
         * {
         *
         *  assemble(var_es._ClientId, Name, "id_" + Name, ToolTip, "", null, large_Ico, cmd_Type, ButtonDisplayEnum.kDisplayTextInLearningMode);
         *
         * }
         *
         */

        #endregion

        private void assemble(string ClientId, string Name, string internalName, string Tooltip, string Description, Icon small_Ico, Icon large_Ico, CommandTypesEnum cmd_type, ButtonDisplayEnum btn_type)
        {
            if (String.IsNullOrEmpty(ClientId))
            {
                ClientId = var_es._ClientId;
            }

            stdole.IPictureDisp common = null;

            if (small_Ico != null)
            {
                common = ImgTypeConv.Ico_to_Picture(small_Ico);
            }

            stdole.IPictureDisp large = null;

            if (large_Ico != null)
            {
                large = ImgTypeConv.Ico_to_Picture(large_Ico);
            }

            Button = var_es.InventorApp.CommandManager.ControlDefinitions.AddButtonDefinition(Name, internalName, cmd_type, ClientId, Description, Tooltip, common, large, btn_type);

            Button.Enabled = true;

            Button.OnExecute += BTN_OnExecute;
        }
Exemplo n.º 22
0
 public void SetMissingAddInBehavior(string clientId, CommandTypesEnum disabledCommandTypesEnum, Object disabledCommands)
 {
     InternalSetMissingAddInBehavior(clientId, disabledCommandTypesEnum, disabledCommands);
 }
Exemplo n.º 23
0
 public addInButtonDefinition(string Name, string ToolTip, string internal_Name, string Description, Icon small_Ico, Icon large_Ico, CommandTypesEnum cmd_Type, ButtonDisplayEnum btn_Type)
 {
     assemble(var_es._ClientId, Name, internal_Name, ToolTip, Description, small_Ico, large_Ico, cmd_Type, btn_Type);
 }
Exemplo n.º 24
0
 private void InternalGetMissingAddInBehavior(out string clientId, out CommandTypesEnum disabledCommandTypesEnum, out ObjectCollection disabledCommands)
 {
     DocumentInstance.GetMissingAddInBehavior(out  clientId, out  disabledCommandTypesEnum, out  disabledCommands);
 }
Exemplo n.º 25
0
 public void GetMissingAddInBehavior(out string clientId, out CommandTypesEnum disabledCommandTypesEnum, out ObjectCollection disabledCommands)
 {
     InternalGetMissingAddInBehavior(out  clientId, out  disabledCommandTypesEnum, out  disabledCommands);
 }
Exemplo n.º 26
0
 public MaterialInfoButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
 }
Exemplo n.º 27
0
 public DrawSlotButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, Icon standardIcon, Icon largeIcon, ButtonDisplayEnum buttonDisplayType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, standardIcon, largeIcon, buttonDisplayType)
 {
 }
Exemplo n.º 28
0
 private void InternalGetMissingAddInBehavior(out string clientId, out CommandTypesEnum disabledCommandTypesEnum, out ObjectCollection disabledCommands)
 {
     DocumentInstance.GetMissingAddInBehavior(out clientId, out disabledCommandTypesEnum, out disabledCommands);
 }
Exemplo n.º 29
0
 public BenjaminBUTTON(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
 }
Exemplo n.º 30
0
 private void InternalSetMissingAddInBehavior(string clientId, CommandTypesEnum disabledCommandTypesEnum, Object disabledCommands)
 {
     DocumentInstance.SetMissingAddInBehavior(clientId, disabledCommandTypesEnum, disabledCommands);
 }
 public ToggleSlotStateButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
 }
Exemplo n.º 32
0
 public void GetMissingAddInBehavior(out string clientId, out CommandTypesEnum disabledCommandTypesEnum, out ObjectCollection disabledCommands)
 {
     InternalGetMissingAddInBehavior(out clientId, out disabledCommandTypesEnum, out disabledCommands);
 }
Exemplo n.º 33
0
 private void CreateButton(string standardPictureName, string largePictureName, ValveBlockDesign.Command parentCmd, string displayName, string internalName, CommandTypesEnum commandType, object clientId, string description, string toolTip, ButtonDisplayEnum buttonType, bool autoAddToGUI)
 {
     GetIconPicture(standardPictureName, largePictureName);
     parentCmd.CreateButton(
         m_inventorApplication,
         displayName,
         internalName,
         commandType,
         clientId,
         description,
         toolTip,
         oIPictureDispStandard,
         oIPictureDispLarge,
         buttonType,
         autoAddToGUI);
 }
 private void onChange(_Document DocumentObject, EventTimingEnum BeforeOrAfter, CommandTypesEnum ReasonsForChange, NameValueMap Context, out HandlingCodeEnum HandlingCode)
 {
     if (BeforeOrAfter == EventTimingEnum.kAfter)
     {
         startMarking(DocumentObject);
     }
     HandlingCode = HandlingCodeEnum.kEventNotHandled;
 }
 private void DocumentEvents_OnChange(CommandTypesEnum ReasonsForChange, 
     EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
 {
     if(ReasonsForChange == CommandTypesEnum.kFilePropertyEditCmdType)
     {
         InitializeMembers();
     }
     HandlingCode = HandlingCodeEnum.kEventHandled;
 }
Exemplo n.º 36
0
 public BenjaminButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, stdole.IPictureDisp standardIcon, stdole.IPictureDisp largeIcon, ButtonDisplayEnum buttonDisplayType, bool Ishelp)
     : base(displayName, internalName, commandType, clientId, description, tooltip, standardIcon, largeIcon, buttonDisplayType)
 {
     IsHelp = Ishelp;
 }
Exemplo n.º 37
0
 public Sketches(string displayName, string internalName, string clientId, string description, string tooltip,
                 ButtonDisplayEnum buttonDisplayType = ButtonDisplayEnum.kDisplayTextInLearningMode, CommandTypesEnum commandType = CommandTypesEnum.kNonShapeEditCmdType)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
 }
Exemplo n.º 38
0
 public BenjaminButton(string displayName, string internalName, CommandTypesEnum commandType, string clientId, string description, string tooltip, ButtonDisplayEnum buttonDisplayType, bool Ishelp)
     : base(displayName, internalName, commandType, clientId, description, tooltip, buttonDisplayType)
 {
     IsHelp = Ishelp;
 }
Exemplo n.º 39
0
 private void InternalSetMissingAddInBehavior(string clientId, CommandTypesEnum disabledCommandTypesEnum, Object disabledCommands)
 {
     DocumentInstance.SetMissingAddInBehavior( clientId,  disabledCommandTypesEnum,  disabledCommands);
 }
Exemplo n.º 40
0
 public addInButtonDefinition(string Name, string ToolTip, string internal_Name, string Description, Icon small_Ico, CommandTypesEnum cmd_Type)
 {
     assemble(var_es._ClientId, Name, internal_Name, ToolTip, Description, small_Ico, null, cmd_Type, ButtonDisplayEnum.kDisplayTextInLearningMode);
 }
Exemplo n.º 41
0
 public void SetMissingAddInBehavior(string clientId, CommandTypesEnum disabledCommandTypesEnum, Object disabledCommands)
 {
     InternalSetMissingAddInBehavior( clientId,  disabledCommandTypesEnum,  disabledCommands);
 }
Exemplo n.º 42
0
        public void CreateButtonNoIcon(Application application, string displayName, string internalName, CommandTypesEnum commandType, object clientId, string description, string toolTip, object standardIcon, object largeIcon, ButtonDisplayEnum buttonType, bool autoAddToGUI)
        {
            //store the Inventor application object
            m_inventorApplication = application;

            //create the button definition
            m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(
                displayName,
                internalName,
                commandType,
                clientId,
                description,
                toolTip,
                standardIcon,
                largeIcon,
                buttonType);

            //connect the button events sink
            m_buttonDefinition_OnExecute_Delegate = new ButtonDefinitionSink_OnExecuteEventHandler(ButtonDefinition_OnExecute);
            m_buttonDefinition.OnExecute         += m_buttonDefinition_OnExecute_Delegate;

            //display button by default if specified
            if (autoAddToGUI)
            {
                m_buttonDefinition.AutoAddToGUI();
            }
        }