英文版利用VB进行SW二次开发的初步教程课件.pptx
“API” = “Application Programming Interface”,API =A means for controlling a SolidWorks session,The SolidWorks API =,The SolidWorks API =Methods and Properties of SolidWorks Objects,Visual Basic is a computer language for manipulating objects.,VB OBJECT SYNTAX:,Dim variableName as Object,VB OBJECT SYNTAX:,Dim variableName as Object,Visual Basic type Object = C+ type LPDISPATCH,VB OBJECT SYNTAX:,Dim variableName as Object,VB OBJECT SYNTAX:,Dim variableName as Object,Set variableName = object,VB OBJECT SYNTAX:,Dim variableName as Object,variableName.something,Set variableName = object,VB OBJECT SYNTAX:,Dim variableName as Object,variableName.property = newValue,Set variableName = object,VB OBJECT SYNTAX:,Dim variableName as Object,variableName.property = newValue,value = variableName.property,Set variableName = object,VB OBJECT SYNTAX:,Dim variableName as Object,variableName.property = newValue,value = variableName.property,variableName.method parms,Set variableName = object,return = variableName.method (parms),VB OBJECT SYNTAX:,Dim variableName as Object,variableName.property = newValue,value = variableName.property,variableName.method parms,Set variableName = object,return = variableName.method (parms),VB OBJECT SYNTAX:,Dim variableName as Object,variableName.property = newValue,value = variableName.property,variableName.method parms,Set variableName = object,How to get a Dispatch pointer to a SolidWorks object?,How to break into the SolidWorks object hierarchy?,Set swApp = CreateObject(“SldWorks.Application”),Dim swApp as Object,Navigate the SolidWorks API Object Hierarchy:,“Dig Down”TraverseSelect Objects,Introduction to Programming the SolidWorks API with Visual Basic,James LewontinBitwright STools for Programming the SolidWorks API with Visual Basic,