Esempio n. 1
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();
     }
 }
Esempio n. 2
0
 private void ConnectMouse()
 {
     _cmd   = (SolidEdgeFramework.Command)_application.CreateCommand((int)SolidEdgeConstants.seCmdFlag.seNoDeactivate);
     _mouse = (SolidEdgeFramework.Mouse)_cmd.Mouse;
     _cmd.Start();
     _mouse.EnabledMove = true;
     _mouse.LocateMode  = (int)SolidEdgeConstants.seLocateModes.seLocateSimple;
     _mouse.ScaleMode   = 1; // Design model coordinates.
     _mouse.WindowTypes = 1; // Graphic window's only.
     _mouse.AddToLocateFilter(32);
     _connectionPointController.AdviseSink <SolidEdgeFramework.ISEMouseEvents>(_mouse);
 }