|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
我复制的宏代码运行错误!!!跪求个SOLEDWORKS转DWG的宏文件,
错误的地方在下面红色地方,所以我求个SOLEDWORKS转DWG的宏文件,不要代码了,呵呵。有的传个给我,谢谢!
Dim swApp As Object
Dim Part As Object
Dim Filename As String
Dim No As Integer
Dim Title As String
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Filename = Part.GetPathName()
No = Len(Filename)
Filename = Left(Filename, No - 7)
Part.SaveAs2 Filename & ".DWG", 0, True, False
Title = Part.GetTitle
Set Part = Nothing
swApp.CloseDoc Title
X = MsgBox(" 已保存为 DWG 文件 ", 0)
End Sub
红色的地方在SW中错误,???? |
|