3 Replies Latest reply on May 8, 2016 11:21 AM by Nhan Vu

    swCommands_e not found

    Nhan Vu

      Hi all,

      I'm a C++ programmer, and I'm using Solidworks 2014 APIs.

      I got error when I used swCommands_e:

       

      CComPtr<ISldWorks> swApp;
      VARIANT_BOOL var = VARIANT_FALSE;

      //Initialize swApp
      ...
      swApp->RunCommand(swCommands_e.swCommands_Hideshow_Brwser_Tree, L"", &var)

      and I got following error when I tried to compile my program
      'swCommands_e' : is not a class or namespace name

      If I replace swCommands_e.swCommands_Hideshow_Brwser_Tree by 2556, I can compile correctly.

      Of course I don't want hardcoded value in my application.

      How to fix it?

       

      Thanks