|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 pyczt 于 2016-7-14 17:18 编辑
- 'Enables a sheet metal part to be saved to disk in its flattened state to a DXF/DWG file.
- '钣金零件以平板型式存为DXF/DWG文件-----PYCZT
- Dim swApp As Object
- Dim swModel As Object
- Dim swModelName As String
- Dim FilePath As String
- Dim value As Boolean
- Sub main()
- Set swApp = Application.SldWorks
- Set swModel = swApp.ActiveDoc
- swModelName = swModel.GetPathName '读取当前SW模型文档名(含路径)
- FilePath = Left(swModelName, Len(swModelName) - 7) + "平板图.dwg" '定义工程图名
- 'value = swModel.ExportFlatPatternView(FilePath, swExportFlatPatternOption_None) 保留折弯线
- value = swModel.ExportFlatPatternView(FilePath, swExportFlatPatternOption_RemoveBends) '无折弯线
- End Sub
复制代码 当前为钣金零件,运行宏,将在同路径下以平板型式存为DWG文件 |
评分
-
查看全部评分
|