×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BEST APPROACH FOR API LEARNING

BEST APPROACH FOR API LEARNING

BEST APPROACH FOR API LEARNING

(OP)
Hi all,
i know VB6 upto database connectivity concepts. i don't know COM concepts in VB6.Just now i've started to study SolidWorks -API concepts myself.i'm refering SolidWorks help and studying.
I hve seen there r three types of API programming.
1) through VC++
2) through VB.
3) through MACRO. (Visual Basic Application like M.S Exell MACRO- VB Editor)
Is there any best appoarch to study the API concepts?
Can u give me good web site details for downloading the API Tutorials?
do u have any tutorials for API concepts?
THANK YOU,

regards,
murugan.S
Design Engineer,
GlobalSoft Pvt Ltd,
INDIA
murugan_subham@rediffmail.com

RE: BEST APPROACH FOR API LEARNING

I recommend to all people who wish to learn SW API that they first learn Visual Basic (VB6) or VBA.  There are many books available to teach yourself VB.  Check amazon.com.  Many of these books come with a "Working model" version of VB, as well.

Once one is comfortable with VB, learning SW API comes much easier.  It is easier to understand the examples in the help and it is easier to follow the code resulting from recording a macro.

"Great ideas need landing gear as well as wings."--C. D. Jackson

RE: BEST APPROACH FOR API LEARNING

From my experience, I don't think you need to learn much of VB (that is, don't buy a very expensive or very technical VB book - try one for biginners).
The most important (I am guessing that you have some programming skills) is to know the concepts of VB and the concept of object oriented programming (for me, used to "traditional" programming, it was the most triky part).
Then download the VB examples from SW site, download macros from the many sites on wich they are available and test them, make simple modifications. Record macos of things you want to do and see the generated code. Also take a look at the API help of SW: it really helps.
With the concepts and with some experiments you will soon be able to do program your macros.

C++ is more for gurus.

Regards

RE: BEST APPROACH FOR API LEARNING

Right, macPT.  One doesn't need to be expert at VB.  However, one should be "VB literate" going into learning API.

Key concepts that can trip up beginners (or people accustomed to "linear" programming like FORTRAN):
•object oriented programming, especially understanding objects' methods and properties
•variable scope
•data types-- many SW API calls are sensitive to what data type (string, boolean, variant) are used for return variables

There is a SW API tutorial available through http://www.cpuandsimplepdm.com

RE: BEST APPROACH FOR API LEARNING

(OP)
thanks.... thetick and macpt.
actually i've some knowledge in object oriented programming.
i did 10 projects using AutoLISP.
i 've worked some VB , ASP projects also.
i think , i can manage.

my question is how to approach Solidworks -API.
i am able to understand the solidworks API coding.
But main problem in help is they have given lot of events, methods, objects. it is confusing me.

which method is good?

1)observing and studying API coding from example programs. ( from coding, we can refer particular method, events, object  in solidworks api help.)

2)studying through help contents step by step.

thanks,

regards,
murugan.S
Design Engineer,
GlobalSoft Pvt Ltd,
INDIA
murugan_subham@rediffmail.com



RE: BEST APPROACH FOR API LEARNING

(OP)
thanks thetick. the website that u 've given for solidwork api tutorial is very nice.
thanks,

regards,
murugan.S
Design Engineer,
GlobalSoft Pvt Ltd,
INDIA
murugan_subham@rediffmail.com





RE: BEST APPROACH FOR API LEARNING

I generally map out what I want to do in a flow chart outline that specifically references SW commands, functions, etc.  Then I consult with the help file regarding the particular API calls/functions that I need to use to accomplish my task.  Certainly you'll want to take advantage of any sample code or examples that are provided.  Also if you look in your SW installation directory there are a couple of sample VB applications that you can look at and step through.

Hope this helps some,

Chris Gervais
Sr. Mechanical Designer
Lytron Corp.

RE: BEST APPROACH FOR API LEARNING

(OP)
thanks for kind reply RawheadRex .i can follow the things u suggest.
thanks,

regards,
murugan.S
Design Engineer,
GlobalSoft Pvt Ltd,
INDIA
murugan_subham@rediffmail.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources