Exemple #1
0
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
        {
            m_inventorApplication = addInSiteObject.Application;

            m_buttonDefinition = m_inventorApplication.CommandManager.ControlDefinitions.AddButtonDefinition(
                "Reference Key Manager", "Adam.ReferenceKeyManager", CommandTypesEnum.kNonShapeEditCmdType);
            m_buttonDefinition.AutoAddToGUI();
            m_buttonDefinition.OnExecute += M_buttonDefinition_OnExecute;
        }
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
        {
            // This method is called by Inventor when it loads the addin.
              // The AddInSiteObject provides access to the Inventor Application object.
              // The FirstTime flag indicates if the addin is loaded for the first time.

              // Initialize AddIn members.
              m_inventorApplication = addInSiteObject.Application;

              // TODO: Add ApplicationAddInServer.Activate implementation.
              // e.g. event initialization, command creation etc.
              var cmdMgr = m_inventorApplication.CommandManager;
              m_btnDef = cmdMgr.ControlDefinitions.AddButtonDefinition(
            "ShowWpfDialog", "ShowWpfDialog", CommandTypesEnum.kQueryOnlyCmdType);
              m_btnDef.OnExecute += ctrlDef_OnExecute;
              m_btnDef.AutoAddToGUI();
        }
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
        {
            // This method is called by Inventor when it loads the addin.
            // The AddInSiteObject provides access to the Inventor Application object.
            // The FirstTime flag indicates if the addin is loaded for the first time.

            // Initialize AddIn members.
            m_inventorApplication = addInSiteObject.Application;

            // TODO: Add ApplicationAddInServer.Activate implementation.
            // e.g. event initialization, command creation etc.
            var cmdMgr = m_inventorApplication.CommandManager;

            m_btnDef = cmdMgr.ControlDefinitions.AddButtonDefinition(
                "ShowWpfDialog", "ShowWpfDialog", CommandTypesEnum.kQueryOnlyCmdType);
            m_btnDef.OnExecute += ctrlDef_OnExecute;
            m_btnDef.AutoAddToGUI();
        }