intgrating vb with solidworks

hi i was just wondering if any of you know about a guide that can tell me how to integrate vb with solidworks coz the tutrial they put in the software isn't very helpful


Reply to
Loading thread data ...

How well do you know VB? I found SW macros made little sense until I stepped back and did some straight VB programming. VBA and VB6 are most similar to SW macros (which are VBA).

After that, the most important concept is how other programs (Excel, SW) "plug into" VB. The programs need to be added as project as references, then objects created that access the applications and various documents and other entities.

For example, to get access to SW in a VB program, you first need to include the "SW 200x Type Library" under "Project --> References" (in VBA environment). Then, access the SW application by creating an object, i.e.: Dim swApp as object 'defines an object that carries the SW application Set swApp = CreateObject("SldWorks.Application") 'hooks up SW to your swApp object variable

More advanced users prefer "Dim swApp as SldWorks.SldWorks". This is called "early binding". It's a way of being more specific with your object variables. It has many advantages.

has a project for creating a VB addin. Might be a bit advanced.

Reply to

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.