IntroductiontoProgrammingtheSolidWorksAPIwithVisualBasicJamesLewontinBitwrightSoftware“API”=“ApplicationProgrammingInterface”API=AmeansforcontrollingaSolidWorkssessionTheSolidWorksAPI=TheSolidWorksAPI=MethodsandPropertiesofSolidWorksObjectsVisualBasicisacomputerlanguageformanipulatingobjects.VBOBJECTSYNTAX:DimvariableNameasObjectVBOBJECTSYNTAX:DimvariableNameasObjectVisualBasictypeObject=C++typeLPDISPATCHVBOBJECTSYNTAX:DimvariableNameasObjectVBOBJECTSYNTAX:DimvariableNameasObjectSetvariableName=objectVBOBJECTSYNTAX:DimvariableNameasObjectvariableName.somethingSetvariableName=objectVBOBJECTSYNTAX:DimvariableNameasObjectvariableName.property=newValueSetvariableName=objectVBOBJECTSYNTAX:DimvariableNameasObjectvariableName.property=newValuevalue=variableName.propertySetvariableName=objectVBOBJECTSYNTAX:DimvariableNameasObjectvariableName.property=newValuevalue=variableName.propertyvariableName.method[parms]SetvariableName=objectreturn=variableName.method([parms])VBOBJECTSYNTAX:DimvariableNameasObjectvariableName.property=newValuevalue=variableName.propertyvariableName.method[parms]SetvariableName=objectreturn=variableName.method([parms])VBOBJECTSYNTAX:DimvariableNameasObjectvariableName.property=newValuevalue=variableName.propertyvariableName.method[parms]SetvariableName=objectHowtogetaDispatchpointertoaSolidWorksobject?HowtobreakintotheSolidWorksobjecthierarchy?SetswApp=CreateObject(“SldWorks.Application”)DimswAppasObjectNavigatetheSolidWorksAPIObjectHierarchy:•“DigDown”•Traverse•SelectObjectsIntroductiontoProgrammingtheSolidWorksAPIwithVisualBasicJamesLewontinBitwrightSoftware