Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an API command for "Invert Selection" command?

Status
Not open for further replies.

rgrayclamps

Mechanical
Aug 6, 2004
376
Hi,

It seems that "Sendkeys" command is no longer supported with 64 bit Windows system (Vista and Win7). I found many users are having the same issue with "Sendkeys" as I am.

Now back to my question, how do you use "Invert Selection" in macro? Is there an API command in Solidworks for "Invert Selection"? Recording a macro does not reveal "Invert Selection".

Before I upgraded to SW2010, I achieved this by using "Sendkeys" command with "I" (a shortcut for invert selection), which does no long work.

Best regards,

Alex
 
Replies continue below

Recommended for you

Check out RunCommand in the API help. Many of the UI actions can be automated using RunCommand. That's usually one of the first places I look for a one-click type interface command. Invert Selection is in the list (swCommands_InvertSelection)

-handleman, CSWP (The new, easy test)
 
Hi, Handleman:

Thanks for your advice!

To run swCommands_*, I need "SolidWorks 2010 Commands Type Library". But I am unable to find this reference with my SW2010 installed Win7 64.

Do you know if SW2010 has a commands type library?

Best regards,

Alex
 
Hi,

Never mind. I found the reference

"SolidWorks 2010 Commands type library", and it is in "C:\Program Files\SolidWorks 2010\SolidWorks\swcommands.tlb"

Best regards,

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor