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(global::Inventor.ApplicationAddInSite site, bool firstTime) { log.Info("Attempting to load linkParameters.."); _instance = this; _application = site.Application; Type addinType = this.GetType(); AdnInventorUtilities.Initialize(_application, addinType); AdnCommand.AddCommand(new LinkParametersCommand(_application)); AdnCommand.AddCommand(new AboutCommand(_application)); AdnCommand.AddCommand(new HelpControlCommand(_application)); AdnRibbonBuilder.CreateRibbon(_application, addinType, "LinkParameters.Resources.AddInUI.xml"); //Prevent user from unloading the add-in (except at Inventor shutdown). //This workarounds an issue concerning unloading/reloading an addin that //creates controls in a native Inventor Panel. site.Parent.UserUnloadable = false; AssemblyResolver.Paths.Add(AdnInventorUtilities.iLogicPath); AssemblyResolver.Start(); log.Info("linkParameters loaded successfully."); }
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"); }
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; //Prevent user from unloading the add-in (except at Inventor shutdown). //This workarounds an issue concerning unloading/reloading an addin that //creates controls in a native Inventor Panel. //addInSiteObject.Parent.UserUnloadable = false; Type addinType = this.GetType(); AdnInventorUtilities.Initialize(m_inventorApplication, addinType); //Initialize the FeatureUtilities library FeatureUtilities.Initialize(m_inventorApplication); //Initialize FeatureMigratorss for each type of feature we support FeatureUtilities.SetFeatureMigrator(ObjectTypeEnum.kExtrudeFeatureObject, new FeatureMigratorLib.ExtrudeFeatureMigrator()); FeatureUtilities.SetFeatureMigrator(ObjectTypeEnum.kHoleFeatureObject, new FeatureMigratorLib.HoleFeatureMigrator()); FeatureUtilities.SetFeatureMigrator(ObjectTypeEnum.kCircularPatternFeatureObject, new FeatureMigratorLib.CircularPatternFeatureMigrator()); FeatureUtilities.SetFeatureMigrator(ObjectTypeEnum.kRectangularPatternFeatureObject, new FeatureMigratorLib.RectangularPatternFeatureMigrator()); AdnCommand.AddCommand( new FeatureMigratorAsmCtrlCmd( m_inventorApplication, addInSiteObject, _dockableWindow)); AdnCommand.AddCommand( new FeatureMigratorPartCtrlCmd( m_inventorApplication, addInSiteObject, _dockableWindow)); AdnCommand.AddCommand( new FeatureMigratorSettingsCtrlCmd( m_inventorApplication)); AdnCommand.AddCommand( new FeatureMigratorHelpCtrlCmd( m_inventorApplication)); AdnCommand.AddCommand( new FeatureMigratorAboutCtrlCmd( 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, "FeatureMigratorAddin.resources.ribbons.xml"); }