AnsweredAssumed Answered

macro to rename bill of materials

Question asked by MIRCO BIGAL on Oct 9, 2018
Latest reply on Oct 10, 2018 by MIRCO BIGAL

Good morning, I created a macro that I'm going to export the bill of materials, as a tile always rename it with a specific name ?

 

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

 

Sub main()

 

Set swApp = _

Application.SldWorks

 

 

Set Part = swApp.ActiveDoc

Part.ClearSelection2 True

Dim swActiveView As Object

Set swActiveView = Part.ActiveDrawingView

Dim swBOMTable As Object

Set swBOMTable = swActiveView.InsertBomTable2(False, -1.95689826589595E-02, 0.239732219653179, swBOMConfigurationAnchorType_e.swBOMConfigurationAnchor_TopLeft, swBomType_e.swBomType_Indented, "Default", "C:\Users\Utente\Desktop\bom-standard.sldbomtbt")

boolstatus = Part.EditRebuild3()

End Sub

Outcomes