FreeCAD BOM Generator: Difference between revisions
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
There is a macro: | There is a macro: | ||
obj = FreeCADGui.Selection.getSelection() | |||
bom = App.activeDocument().addObject('Spreadsheet::Sheet','BOM') | bom = App.activeDocument().addObject('Spreadsheet::Sheet','BOM') | ||
cell = 0 | cell = 0 | ||
for x in obj: | for x in obj: | ||
cell = cell + 1 | cell = cell + 1 | ||
bom.set("A" + str(cell), x.Label) | bom.set("A" + str(cell), x.Label) | ||
App.ActiveDocument.recompute()</nowiki> | App.ActiveDocument.recompute()</nowiki> | ||
=FreeCAD Evolution= | =FreeCAD Evolution= |
Revision as of 12:54, 18 September 2020
Tools That Can Be Used For Generating Bills of Materials by Counting
Structured Way
- The simplest method of obtaining a complete BOM, line by line, is to export parts in a FreeCAD document, and simply count them. You can count phrases by using an online phrase counter - [1]
- For this to work, the part names must be structured in an understandable way, such as "8 mm Screw #" such that every time it is copied, it appears as: "8 mm Screw #0",
- Check out what happens when you copy a part, if its name allows for easy counting by examinging part name:
- The count appears readily by observing the last number.
- Out of the box - you can even include a BOM link to that part with URL or shortcut, so that the exported BOM can include links out of the box:
- FreeCAD allows CSV export of part spreadsheets - so further processing into finished BOMs can happen readily.
Extracting Parts Spreadsheet in FreeCAD
There is a macro:
obj = FreeCADGui.Selection.getSelection()
bom = App.activeDocument().addObject('Spreadsheet::Sheet','BOM') cell = 0 for x in obj: cell = cell + 1 bom.set("A" + str(cell), x.Label)
App.ActiveDocument.recompute()</nowiki>
FreeCAD Evolution
2018 Progress
- Note comment: part organization is what makes for proper assemblies - not constraints! Exactly. [2]