1 Reply Latest reply on Nov 29, 2015 11:01 AM by Karim Said

    Keyboard shortcuts keys

    Hamza Darza

      Hi all,

      How can I get the user default shortcuts keys for front view(SW default Ctrl+1) and others through API ?

        • Re: Keyboard shortcuts keys
          Karim Said

          If you need that, so you can later simulate keyboard shortcut to call the plane, you can easily call it like this:


          ModelDoc2 swDoc = ((ModelDoc2)(swApp.ActiveDoc));

          swDoc.Extension.SelectByID2("Top Plane", "PLANE", 0, 0, 0, false, 0, null, 0);




          swApp.RunCommand(163, "Top");


          where swApp is your current SldWorks.SldWorks instance.


          You can change "Top" in the first way to any Plane you need. In the second you have to find the right ID for your plane, look in your API help in SolidWorks.Interop.swcommands.swCommands_e.


          Sorry if writing in C# isn't good for you, but I hope that helps.