Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help VBA

  • Thread starter Thread starter Leonardo Schneider
  • Start date Start date
L

Leonardo Schneider

Guest
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 detalhe2@Anotações", "ANNOTATIONTABLES", -8.71012081611496, 5.30156339831854, 15.1006338999379, False, 0, Nothing, 0)
End Sub
 

Part and Inventory Search

Sponsor

Back
Top