Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

Register Log in

Help VBA

I know this topic is old, but I'd like some help. I need a good code, I would like when starting the macro, solidworks saved my BOM in Excel format, it could be .xls or something, I'll post what I've done so far. Thank you very much.


Dim Part As Object
Dim Caminho As String
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

Set swApp = _
Application.SldWorks

Set Part = swApp.ActiveDoc
Dim swBOMTable As Object
Set swBOMTable = Part.Extension.InsertBomTable("C:\Users\Leonardo\Desktop\Projetosq\SOLID\Mateus\Excel\Template2.sldbomtbt", 311, 159, swBomType_e.swBomType_Indented, "Valor predeterminado")
boolstatus = Part.Extension.SelectByID2("Item de [email protected]ções", "ANNOTATIONTABLES", -8.71012081611496, 5.30156339831854, 15.1006338999379, False, 0, Nothing, 0)
End Sub
 

Sponsor

Top