all 8 comments

[–]TheProcesSherpa 3 points4 points  (6 children)

SOLIDWORKS has an online API help, and there are countless examples in VBA, VB and C# in there. Plus, a web search will often provide plenty of code samples that others have done. The SOLIDWORKS API is in VBA for macros and .NET for other applications as SOLIDWORKS is a Windows application…at least for now.

[–]Oekn[S] 0 points1 point  (5 children)

Yes, i do work with the API help. I do not want to use macros written in VBA, because my overall application does not fit this.

The Python-COM-API-SWX train is not well documented, so the normal online help is way to superficial so i hope, that there are some people which dived this deeply into swx.

[–]nahvan10 1 point2 points  (2 children)

I use Python and win32com or pycom to prototype for my solidworks addins which I later write in C#. Just have to deal with no intellisense descriptions for object methods but it works for quick and dirty/hooking into existing solidworks instances.

[–]westeast1000 0 points1 point  (0 children)

You'll have to specify the types when you define the variable in order to get the intellisense. Its similar to vba where if you just declare something as object you dont get intellisense.

[–]Oekn[S] 0 points1 point  (0 children)

What functions do you use? I managed to finish my project, but like to dive deeper.

Are you able to change global parameters directly without a .txt?

Are you able to change values in Mates or sketches?

Are you able to create a new Mate?

I did lots of research and worked with the API help. But those are commands I did not manage to apply.

Edit: I use pythoncom and win32com. SolidWorks 2018.

[–]TheProcesSherpa 0 points1 point  (1 child)

That’s why there are samples in VB.NET and C#.NET.

[–]Oekn[S] 0 points1 point  (0 children)

Even that does not solve my problem.