API in Soildworks

Can anybody suggest the best way to get started in API of Solidworks? And may I add, from scratch.

Thank You,

S.Dheeraj

Reply to
sivampeta_dheeraj
Loading thread data ...

I always recommend that one first learns VBA or VB6 (or C++) before attempting to do much with SolidWorks API. It will be a long slow struggle to learn SW API if you do not know the basics of one of these programming languages. I recommend start with VBA, as it is the language of macro programs. There are many books and websites that can help you learn.

To make an add-> Can anybody suggest the best way to get started in API of Solidworks?

Reply to
That70sTick

Hi.

I would recommend first becoming familiar with VBA. If you use Microsoft Excel, thats a great place to start. The Excel API is probably easier to learn than the SolidWorks API, and there are a host of good books out there to teach you VBA programming in Excel step-by-step.

Once you have a handle on VBA, you might want to find a training course if your SolidWorks VAR has one. Where are you located?

Other than that, find something you want to automate in SW and just get started. You'll run into many problems, and can resolve them through research and by asking questions here. The more you do it, the easier it will become.

Mike Spens has a book out called "Automating SolidWorks 2006 using Macros". I've never read it, but it would probably be helpful.

Good luck. I was in your shoes 5 years ago, and know how difficult it can be to know where to start.

Regards,

- Luther

sivampeta_dheeraj wrote:

Reply to
lcifers

I have this book and it is very helpful.

There are also several examples in the Help files and on the SW Web site etc. These can be helpful.

Hope this helps,

Ed

Reply to
Ed

Thank you all for your advise.As I understand from your mails it would be better if I get a working knowledge of any VBA or more specifically Excel VBA because it is comparatively easier, before I dip my hands into Solidworks API. I can understand the spirit behind the advise.

However I do feel Autocad VBA would be more ideal if it comes to learning some VBA..

And would C be of any help?

Finally I would appreciate if you can post the addresses of some web sites which cover VBA basics (if those are of Autocad it would be that much more helpful)

Thank you once again for replying to my query.

S.Dheeraj

Reply to
sivampeta_dheeraj

Excel VBA is about the same as any other VBA.

There are two aspects to consider:

  1. Visual Basic (VBA and VB6) as a pure programming language. Learn how VB works to accomplish simple programming tasks. Get a solid understanding of objects and object-oriented programming.

  1. VB interacting with other applications like Excel or SW. The macro editors in Excel and SW are basic VB editors with templates that provide some default connections to Excel or SW. Learn how VB is connecting to the applications and accesing the application's functions.

You can use either SW or Excel's VB (macro) editor to learn basic VB, even if your initial programs do not interact with Excel or SW.

Reply to
That70sTick

True, but the Excel object model is a bit more intuitive and very well documented. I think it's easier to develop your first project in Excel than SW. And I would recommend against starting in AutoCAD. I think the SW API is better documented then AutoCAD's.

I agree. But for me it was easier to learn when I was trying to accomplish something rather that doing purely academic exercises.

Cheers.

- Luther

Reply to
lcifers

Thanks once again

I am proceeding in the direction you have suggested.For starters I am going to concentrate on learning VB till I am comfortable in it.It may take some time.This will I believe give solid grounding in objects and object oriented programming.

After that I will go in for Solidworks API.

Comment solicited

S.Dheeraj

Reply to
sivampeta_dheeraj

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.