Hello everyone!

I am normally an NX API developer, and now I have a question regarding the SolidWorks API. The question is as follows: what are the geneal principles of laucnhing API applications for SolidWorks?

I explain: in NX, you have the following options of launching API applications:

  • Launching it as a 'journal', that means executing uncompiled source code in .NET.
  • Launching a compiled DLL, that in turn involves the following options depending on availability of a API author license:
    • User has access to the API author licence and application executes after finding it
    • User has no access to the API author licence but DLL has been 'signed' by the valid license and application executes after finding the signature
    • User has no access to the API author license and DLL has not bees 'signed' and therfore it fails to be executed.

I need to know what are the options for SolidWorks? Does developing or launching require some kind of API author/cosumer license or not? Is it possible to launch an uncompiled .NET source code?

Could anyone please provide an overview for me? Thanks in advance!


Categories: API∕Macros

Comments
Last comment By: David Stockdale   Fri, 08 Dec 2017 15:18:19 GMT
Re: Launching API applications for SolidWorks

Having developed against the NX API, I can tell you that is very different.  There's no sign/author/consumer license that's required from SolidWorks' perspective.  It's a lot like programming against Excel.  It's a COM API thru and thru. 

 

Unless I'm mistaken, there's no option to run uncompiled .net code inside SolidWorks like you could with journal files in NX.  This isn't a big deal however because you can install VSTA (depending on the options you select) when SolidWorks is installed.  This gives you the ability to create .dlls written in C# or VB.net that run against SolidWorks - albeit as compiled code.

 

If for whatever reason compiled code isn't an option for you, you can always leverage the SolidWorks API thru VBA.  A lot of people go this route because it's so easy to get started and be productive quickly.  There's no compilation step, but the end result of saving a VBA project is still a binary file (.swp extension) which must be edited from SolidWorks.

By: David Stockdale  Thu, 07 Dec 2017 15:31:33 GMT
Re: Launching API applications for SolidWorks

Thanks for the response!

So basically I install VSTA (what does it stand for? I'm an SW lamer) and gain the ability to run compiled .NET .dlls?

By: Maxim Semenenko  Fri, 08 Dec 2017 08:02:12 GMT
Re: Launching API applications for SolidWorks

No need to install VSTA. VSTA can be used to develop macros, but to be honest, you're better off with Visual Studio.

You can create executables, or dll files which can be added into SolidWorks.

If you install the SolidWorks API SDK (a free product), it gives you templates in Visual Studio for addins.

SolidWorks also has a VBA macro facility which is good for getting started. It can record macros, just like in Excel.

By: Simon Turner  Fri, 08 Dec 2017 10:29:49 GMT
Re: Launching API applications for SolidWorks

Thank you!

By: Maxim Semenenko  Fri, 08 Dec 2017 11:24:29 GMT
Re: Launching API applications for SolidWorks

Just to clarify - VSTA is "Visual Studio Tools for Applications" - it's like a very light weight trimmed down version of Visual Studio.  If you can record a macro in VB.Net or C#, you have it.  It comes installed with SolidWorks by default, IIRC.

By: David Stockdale  Fri, 08 Dec 2017 15:18:19 GMT
You are not authorized to view this page No results found! Suggestions: Check spelling, try a different search, or browse topics below.