Bill of Material

Foro para discussão, perguntas e respostas em português

Moderator: Renato Rebelo

Forum rules
regras do fórum e informações úteis

IMPORTANTE - Leia isto antes de pedir ajuda
Claudiosp
Posts: 1
Joined: Thu May 14, 2020 1:14 pm

Bill of Material

Postby Claudiosp » Tue May 19, 2020 9:43 am

Ola a todos.
Sou novo no freecad e claro preciso de uma GRANDE ajuda.
Como faço para automaticamente preencher a tabela BOM que criei com o nome dos componentes e suas medidas em x y z.
Envio ficheiro.
Macro como criar a tabela


App.activeDocument().addObject('Spreadsheet::Sheet','BOM')
App.ActiveDocument.BOM.set('A1', 'QTY:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setColumnWidth('A', 48)
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('A1:A1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.set('B1', 'NOME:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setColumnWidth('B', 152)
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('B1:B1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.set('C1', 'COMPRIMENTO:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('C1:C1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.set('D1', 'LARGURA:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('D1:D1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.set('E1', 'ESPESSURA:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('E1:E1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.set('F1', 'MATERIAL:')
App.ActiveDocument.recompute()
App.ActiveDocument.BOM.setBackground('F1:F1', (0.000000,1.000000,0.000000,1.000000))
App.ActiveDocument.recompute()


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Portuguese/Portugal (pt_PT)
Attachments
corpo.FCStd
(11.74 KiB) Downloaded 18 times
walpa
Posts: 35
Joined: Wed Nov 09, 2016 5:22 pm
Location: Brazil

Re: Bill of Material

Postby walpa » Wed Jun 03, 2020 1:41 pm

Já tentou encontrar alguma macro que te inspire uma solução.
https://wiki.freecadweb.org/Macros_recipes
Abs.