Ejemplo n.º 1
0
        public override void OnConnectToEnvironment(Guid EnvCatID, SolidEdgeFramework.Environment environment, bool firstTime)
        {
            // If you are not seeing events for a certain environment, check your AddInEnvironmentCategory attribute(s).

            var ribbon3dEnvironments = new Guid[]
            {
                new Guid(CATID.SEAssembly),
                new Guid(CATID.SEPart),
                new Guid(CATID.SEDMPart),
                new Guid(CATID.SESheetMetal),
                new Guid(CATID.SEDMSheetMetal)
            };

            var ribbon2dEnvironments = new Guid[]
            {
                new Guid(CATID.SEDraft)
            };

            if (ribbon3dEnvironments.Contains(EnvCatID))
            {
                AddRibbon <My3dRibbon>(EnvCatID, firstTime);
            }

            if (ribbon2dEnvironments.Contains(EnvCatID))
            {
                AddRibbon <My2dRibbon>(EnvCatID, firstTime);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Called when the addin first connects to a new Solid Edge environment.
 /// </summary>
 public override void OnConnectToEnvironment(SolidEdgeFramework.Environment environment, bool firstTime)
 {
     if (environment.GetCategoryId().Equals(SolidEdgeSDK.EnvironmentCategories.Part))
     {   // Uncomment the following line to attach to the Solid Edge Mouse Events.
         _cmd = (SolidEdgeFramework.Command)_application.CreateCommand((int)SolidEdgeConstants.seCmdFlag.seNoDeactivate);
         _cmd.Start();
         ConnectMouse();
     }
 }
 /// <inheritdoc />
 /// <summary>
 /// Called when the addin first connects to a new Solid Edge environment.
 /// </summary>
 public override void OnConnectToEnvironment(SolidEdgeFramework.Environment environment, bool firstTime)
 {
     Log.Info("Item Catalog Connected");
 }