AnsweredAssumed Answered

swCommands_e not found

Question asked by Nhan Vu on May 5, 2016
Latest reply on May 6, 2016 by 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

 

 

Outcomes