Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Programming and macros
User avatar
bnemec
Posts: 1944
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2548
x 1400

Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by bnemec »

We are in the process of hiring a Programmer/PDM Admin and as part of his onboarding process we would like to fortify his programming training.

A bit of background: For the PDM side he will be doing the PDM Admin class provided by our VAR. He has a decent understanding of Object Oriented programming concepts but it has all been in C++ and Java. I feel that his level is akin to what I recall being the second 300 level class of OO programming. I have stumbled my way through learning API calls over the years and would much rather he have better training than that. We have several of our own add-ins in place that I may or may not have implemented correctly (yeah they work but...) I would like for him to know better.

We're not looking for a semester type class at this point but more like a week or so class that might cover .NET concepts and be geared towards how APIs tend to work. I'm not looking for it to be specific to Solidworks or PDM API, but more the general concepts of registering dlls, how to avoid "dll hell", when to embed types and why, concepts like that.

For a parallel to what I'm thinking of; as a Design Engineer my employer has sent myself and others to a few continuing education classes through UW Milwaukee; for example "Plastic Part Design for Injection Molding". I'm looking at the offerings at a few places and not seeing anything in the Computer Science/Software Engineering discipline.
Link to UWM Continuing Education, Engineering page for reference:
https://uwm.edu/sce/program_area/engineering/

So we're looking for suggestions if something like this exists. In can be in person, classroom setting or online. I understand that a full dive into .NET programming and all the intricacies of writing software that interacts with others through API calls cannot be done in a few days or even a couple of weeks, this could take several semesters. The same can be said for PDM Administration or designing injection molded parts, so we do the best we can right?

Does anyone have suggestions for this type of thing? Also open to suggestions of other methods to give our new employee a leg up on this stuff.

Thank you.
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by mattpeneguy »

I'm curious too.
Hey @josh and @gupta9665 got any advice?
User avatar
Frederick_Law
Posts: 1948
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1638
x 1471

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by Frederick_Law »

That's the problem with API. Different program do it differently.
API for IV, SW, Excel will be different. Programmer need to learn how they behave and what to use to do what.
So you'll need a course for SW API in C# .NET
User avatar
bnemec
Posts: 1944
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2548
x 1400

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by bnemec »

Frederick_Law wrote: Thu Jul 08, 2021 1:35 pm That's the problem with API. Different program do it differently.
API for IV, SW, Excel will be different. Programmer need to learn how they behave and what to use to do what.
So you'll need a course for SW API in C# .NET
I understand they are different. I've done a little in Solid Edge and a little in Solidworks and everything is different. However there's some basic concepts that apply to all when working in APIs vs stand alone apps that just have a GUI and do some task. To be honest it goes over my head quickly but even concepts of managed and unmanaged code, strongly typed code and why many API calls use Object and must be cast. I have a feeling getting this foundation laid down would fill a week class. If the class were specific into how Solidworks API is intended to function I fear the foundation me be assumed understood or not covered.

All that said we would certainly consider a Solidworks specific class, or even Solid Edge API Specific for that matter. It just doesn't need to be.
User avatar
Frederick_Law
Posts: 1948
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1638
x 1471

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by Frederick_Law »

I believe the problem is, there is little common between the 2.
If one try to learn both at the same time, it'll be confusing.

There are third party "framework" which make it easier:
https://www.codestack.net/
https://xcad.xarial.com/

Problem is, you got another thing to learn which cover up lots of annoying things in the API.
Which put you at the mercy of the third party.

Also when you say API, do you mean macro or Addin, or both?
Macro is a bit easier. API will require more "management" code than "functional" code.

Another thing is IDE. VS Community is free but most API SDK doesn't work with it. So you need to redo everything.
I haven't get the SW template to work yet in VC 2019 Community.
One more thing is GITS, I have no idea how to use it.
User avatar
bnemec
Posts: 1944
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2548
x 1400

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by bnemec »

Frederick_Law wrote: Thu Jul 08, 2021 2:27 pm I believe the problem is, there is little common between the 2.
If one try to learn both at the same time, it'll be confusing.

There are third party "framework" which make it easier:
https://www.codestack.net/
https://xcad.xarial.com/

Problem is, you got another thing to learn which cover up lots of annoying things in the API.
Which put you at the mercy of the third party.

Also when you say API, do you mean macro or Addin, or both?
Macro is a bit easier. API will require more "management" code than "functional" code.

Another thing is IDE. VS Community is free but most API SDK doesn't work with it. So you need to redo everything.
I haven't get the SW template to work yet in VC 2019 Community.
One more thing is GITS, I have no idea how to use it.
That's all good stuff Fred.
I agree trying to learn API to Solidworks and Solid Edge at same time would be confusing and likely overwhelming

I feel the same way with the wrapper frameworks. They can do anything, almost. If you need something else then, well, start over? But, if the task is in their wheelhouse then it makes development much much faster. @jasonnewell developed a lot of good stuff including a framework for Solid Edge, but I may have used it maybe once.

Macro vs Add-in: I've really only done add-in or stand alone, VBA is tough for me and since I'm a bit of Christopher Columbus coder when it comes to what can be done with the available APIs :oops: I need a good debugger. Not saying Macros aren't great, I just don't get very far with them. Also, I don't know how to make API calls to other stuff or do SQL queries from a Marco. I think the Marco's scope is limited to the application that it is running in, but I don't really know. Honestly, I like a bit lower level interface that C# works with than VBA, it's a curse of having to understand how something functions to be able to use it.

I've been using VS Community since I left college a long time ago (.NET was at 1.1 at that time). I don't think Solid Edge had templates like SW SDK offers. I haven't bothered with the SW SDK templates, just add reference to the libraries the project needs and go from there. I guess I like the project and class templates that VS provides so I guess I contradict myself a little.

GITS: ? Are we talking about Git repository? I started using a couple years ago, makes life simpler even though I'm the only person working on the projects.
Or are you talking about Merriam-Webster version of the word. https://www.merriam-webster.com/dictionary/git In that case I'm told they're of no use so you're not missing much.

Your questions are part of what I'd like to find training on. If there were a five day course for Solidworks and PDM API programming I think we would try to send him. I would like to know what the prerequisites would be for such a class.
User avatar
Frederick_Law
Posts: 1948
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1638
x 1471

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by Frederick_Law »

You can connect to database in VB Macro. You need to ref it.
Yes, Git repository. Haven't used it yet. Didn't start looking into it.
I don't know if there are course for API. I've watched some that spend half an hour on 20 lines of code for Hello World.
User avatar
JSculley
Posts: 647
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 879

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by JSculley »

The SOLIDWORKS API is very much specific to SOLIDWORKS. There isn't going to be a generic 'API' course out there because every API for every piece of software does things differently. A person with a working knowledge of C++ and Java should have no problem using C#. It is far more important that they have a working knowledge of SW and PDM. Trying to write software using an API if you've never used the program that the API connects to is extremely difficult.

VBA an VB.NET are dead ends. One or both of them will eventually go away. Unless you are trying to do really high performance stuff, C# is the way to go (over C/C++).

Macros are great for trying out ideas with SW, but not so much for PDM. If you have a working PDM add-in it is trivial to copy it and make a 'Testing' add-in that you can use to try out different things. Just keep adding right click menu items for the different things you want to try out.

SOLIDWORKS add-ins are a much more difficult topic, not because the coding is hard, but getting the add-in to users is more difficult. With PDM you install the add-in on the server and everyone gets it automatically. For SW, you need to create installers or batch files and the whole process is more involved.
User avatar
Eddy Alleman
Posts: 50
Joined: Thu Apr 01, 2021 10:32 am
Answers: 8
Location: Belgium
x 80
x 89
Contact:

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by Eddy Alleman »

Frederick_Law wrote: Thu Jul 08, 2021 2:27 pm I haven't get the SW template to work yet in VC 2019 Community.
Hi Frederick,
Solidworks templates are not supported in visual studio versions > 2015.
That's why I still have a visual studio 2015 installed on my pc (only for using the template). After creating a new project with the template , close it and open it with VS 2019. You probably do the same? ;)

Artem's XCad is really worth looking into. It will take away a lot of the burden of setting up an addin. He made some straight to the point youtube films to get you started.

Eddy
artem
Posts: 26
Joined: Thu Mar 18, 2021 1:31 pm
Answers: 3
x 9
x 74

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by artem »

@Eddy Alleman, @Frederick_Law thank you for the mention!
That's the problem with API. Different program do it differently.
API for IV, SW, Excel will be different. Programmer need to learn how they behave and what to use to do what.
This is one of the reasons I actually started xCAD.NET. One of the main ideas (thus the part x in the CAD) is the ability to write the same code and target the same code base to different CAD systems, i.e. SwCad, IVCad, OnCad etc. Although I currently only have a partial implementation for Sw and Document Manager it still shows the main idea as shown in this video:

The same code is reused for SW and DM (although those are completely different APIs). It is still very early stages of the framework but I have quite ambitious plans with Inventor and Onshape next in the queue for the implementation.
Thanks,
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
artem
Posts: 26
Joined: Thu Mar 18, 2021 1:31 pm
Answers: 3
x 9
x 74

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by artem »

Eddy Alleman wrote: Fri Jul 09, 2021 6:25 am Hi Frederick,
Solidworks templates are not supported in visual studio versions > 2015.
That's why I still have a visual studio 2015 installed on my pc (only for using the template). After creating a new project with the template , close it and open it with VS 2019. You probably do the same? ;)

Artem's XCad is really worth looking into. It will take away a lot of the burden of setting up an addin. He made some straight to the point youtube films to get you started.

Eddy
Check this article of how to enable templates in other versions of Visual Studio: https://www.codestack.net/solidworks-ap ... tallation/
Thanks,
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
User avatar
gupta9665
Posts: 412
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 434
x 450

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by gupta9665 »

You can reach out to Keith Rice (https://www.linkedin.com/in/keitharice/) for the live training and I can highly recommend him. Check the training content here: https://www.cadsharp.com/live-training/
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
Sean Bennington
Posts: 5
Joined: Mon Jul 12, 2021 2:26 pm
Answers: 0
x 1
x 2

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by Sean Bennington »

I think the best thing you can do is hire an experienced software design engineer, and provide him with the specialized training in the Solidworks. Developing add-ins that don't do anything is not particularly difficult. Even without using one of the frameworks I was able to follow the SDK documentation and have one up and running that did nothing more than announce it was alive in about 30 mins without any specialized knowledge of Solidworks, or its API.

You should be looking for someone who already knows how to manage a software development project, utilize source control effectivly, read and maintain code, and has a solid grasp of software design principles. With the software engineering basics covered, you can focus training in the specialized Solidworks domain needed to produce effective add-in and macro code.

An a software design engineer that has loads of development experience, but not much practical experience with Solidworks, I would love to see more links to Solidworks API training.
User avatar
bnemec
Posts: 1944
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2548
x 1400

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by bnemec »

Sean Bennington wrote: Mon Jul 19, 2021 1:56 pm I think the best thing you can do is hire an experienced software design engineer, and provide him with the specialized training in the Solidworks. Developing add-ins that don't do anything is not particularly difficult. Even without using one of the frameworks I was able to follow the SDK documentation and have one up and running that did nothing more than announce it was alive in about 30 mins without any specialized knowledge of Solidworks, or its API.

You should be looking for someone who already knows how to manage a software development project, utilize source control effectively, read and maintain code, and has a solid grasp of software design principles. With the software engineering basics covered, you can focus training in the specialized Solidworks domain needed to produce effective add-in and macro code.
You mean "the best thing you should do". If what you suggest is something we could do it would have been done a while ago. PDM Admin experience was also in the list of requirements. The plan was to replace me with a PDM Admin that knows what they are doing and could program APIs to integrate with other systems, some already in place and some new.

edit: I want to add to this post that the person we did hire is from within our company and has been putting himself through school while working full time. While he may not be exactly what we though we wanted he is certainly someone we want to keep in our company. Experience must be gained somewhere, if he's going to gain it working for us I'd like to make sure we get him the training to make that process most effective.
User avatar
bnemec
Posts: 1944
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2548
x 1400

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Unread post by bnemec »

gupta9665 wrote: Sat Jul 10, 2021 4:02 am You can reach out to Keith Rice (https://www.linkedin.com/in/keitharice/) for the live training and I can highly recommend him. Check the training content here: https://www.cadsharp.com/live-training/
Thank you @gupta9665 I started an account there to view the introduction videos. This seems like a good direction.
Post Reply