Beispiel #1
0
        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.
            log.Debug("ScreenShot loaded!");
            m_inventorApplication = addInSiteObject.Application;

            m_ClientId = "{b3aa6727-f2d0-4c6d-8150-16fa9c493dff}";
            Type addinType = this.GetType();

            AdnCommand.AddCommand(
                new ScreenGrabCtrlCmd(
                    m_inventorApplication));

            AdnCommand.AddCommand(
                new ScreengrabAboutCtrlCmd(
                    m_inventorApplication));

            AdnCommand.AddCommand(
                new ScreenGrabHelpCtrlCmd(
                    m_inventorApplication));

            // Only after all commands have been added,
            // load Ribbon UI from customized xml file.
            // Make sure "InternalName" of above commands is matching
            // "internalName" tag described in xml of corresponding command.
            AdnRibbonBuilder.CreateRibbon(
                m_inventorApplication,
                addinType,
                "InventorScreenshot.Resources.ribbons.xml");
        }
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
        {
            log.Debug("Activating ThreadModeler Addin");
            // 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;

            Type addinType = this.GetType();

            AdnInventorUtilities.Initialize(m_inventorApplication, addinType);

            Toolkit.Initialize(m_inventorApplication);
            ThreadWorker.Initialize(m_inventorApplication);

            AdnCommand.AddCommand(new ThreadModelerCmd(m_inventorApplication));

            AdnCommand.AddCommand(new AboutCtrlCmd(m_inventorApplication));

            AdnCommand.AddCommand(new HelpCtrlCmd(m_inventorApplication));

            // Only after all commands have been added,
            // load Ribbon UI from customized xml file.
            // Make sure "InternalName" of above commands is matching
            // "internalName" tag described in xml of corresponding command.
            AdnRibbonBuilder.CreateRibbon(
                m_inventorApplication,
                addinType,
                "ThreadModeler.resources.ribbons.xml");
        }
        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;
            addin = new CAddIn(m_inventorApplication);

            if (firstTime)
            {
                addin.CreateUI();
            }

            // TODO: Add ApplicationAddInServer.Activate implementation.
            // e.g. event initialization, command creation etc.
        }
Beispiel #4
0
            public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
            {
                log.Debug("Attempting to Load pointLinker addin");
                Type addinType = this.GetType();

                AdnInventorUtilities.Initialize(m_inventorApplication, addinType);
                // Initialize AddIn members.
                m_inventorApplication = addInSiteObject.Application;
                AdnCommand.AddCommand(new PointLinkerCtrlCmd(m_inventorApplication));
                AdnCommand.AddCommand(new PointLinkerSketchCtrlCmd(m_inventorApplication));
                AdnCommand.AddCommand(new AboutCtrlCmd(m_inventorApplication));
                AdnCommand.AddCommand(new HelpCtrlCmd(m_inventorApplication));

                // Only after all commands have been added,
                // load Ribbon UI from customized xml file.
                // Make sure "InternalName" of above commands is matching
                // "internalName" tag described in xml of corresponding command.
                AdnRibbonBuilder.CreateRibbon(m_inventorApplication, addinType,
                                              "PointLinker.resources.ribbons.xml");

                log.Debug("pointLinker loaded successfully");
            }