在做基于Solidworks的二次开发时,用VB连接Solidworks出现了下面的问题,谁能帮我解决一下啊,跪谢。
1个回答
展开全部
Private Sub Command1_Click()
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
'连接solidworks
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible (True)
'新建零件
Set Part = swApp.NewPart()
Set Part = swApp.ActiveDoc
前面的定义为题 按照这个改一下就好了
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
'连接solidworks
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible (True)
'新建零件
Set Part = swApp.NewPart()
Set Part = swApp.ActiveDoc
前面的定义为题 按照这个改一下就好了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询