FreeCAD icon indicating copy to clipboard operation
FreeCAD copied to clipboard

Assembly: BOM generation failures (v1.0)

Open wooddragon48 opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Problem description

The Create Bill of Materials tool for the Assembly workbench only creates an empty spreadsheet regardless of the parts in the assembly. After saving, closing, and reopening the file the spreadsheet has a single column labeled "Index". See attached images for the before and after saving view of the spreadsheet.

I have attached a exceedingly simple file that exhibits the problem.

Full version info

OS: Windows 10 build 19045
Architecture: x86_64
Version: 1.0.0.39109 (Git) Conda
Build type: Release
Branch: (HEAD detached at 1.0.0)
Hash: 2fcc5317fe3aee96ca73475986a577719fc78e20
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: OpenDark.qss/FreeCAD Dark/Fusion
Installed mods: 
  * 3D_Printing_Tools
  * A2plus 0.4.60i
  * animation
  * ArchTextures
  * Assembly4 0.12.5
  * CurvedShapes 1.0.4
  * Curves 0.6.5
  * dxf_library
  * ExplodedAssembly
  * fasteners 0.4.54
  * fcgear
  * freecad.gears 1.0.0
  * Info
  * kicadStepUpMod 10.16.8
  * Manipulator 1.5.0
  * OpenTheme 2024.9.1
  * pcb
  * Render 2023.2.5
  * SelectorToolbar
  * sheetmetal 0.2.61
  * ShortCuts

Subproject(s) affected?

Assembly

Anything else?

test file.zip Screen 1 Screen 2 Screen 3

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

wooddragon48 avatar Nov 22 '24 00:11 wooddragon48

Can confirm: grafik

@PaddleStroke @adrianinsaval @chennes this is the same error as the issue which was never found

maxwxyz avatar Nov 22 '24 07:11 maxwxyz

Same fault with Linux a using FreeCAD_1.0.0-conda-Linux-x86_64-py311.AppImage

module 'FreeCADGui' has no attribute 'doCommandEval'Running the Python command 'Assembly_CreateBom' failed: Traceback (most recent call last): File "/tmp/.mount_FreeCABhmecL/usr/Mod/Assembly/CommandCreateBom.py", line 94, in Activated self.panel = TaskAssemblyCreateBom() ^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_FreeCABhmecL/usr/Mod/Assembly/CommandCreateBom.py", line 146, in init self.createBomObject() File "/tmp/.mount_FreeCABhmecL/usr/Mod/Assembly/CommandCreateBom.py", line 337, in createBomObject self.bomObj = Gui.doCommandEval("bomObj") ^^^^^^^^^^^^^^^^^

module 'FreeCADGui' has no attribute 'doCommandEval'

It does create the BOM spreadsheet. But I have to add the columns to the BOM twice and add a custom column in order for it actually populate the SS.

ghost avatar Dec 08 '24 13:12 ghost

I can reproduce the error in V1.0. But not in the version listed below. Some mysterious commit must have fixed it?

OS: Windows 8 build 9600
Architecture: x86_64
Version: 1.1.0dev.39416 (Git) Conda
Build type: Release
Branch: main
Hash: f6268ffd2877dadb4440ade541e12c388a517d6e
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: Dutch/Netherlands (nl_NL)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default
Installed mods:

Roy-043 avatar Dec 09 '24 10:12 Roy-043

Sounds like a regression of https://github.com/FreeCAD/FreeCAD/pull/16671 If the error is not in main then perhaps it's a backport issue. Though I don't remember fixing regression on the BOM tool, only on the exploded view tool (https://github.com/FreeCAD/FreeCAD/pull/17724)

PaddleStroke avatar Dec 09 '24 10:12 PaddleStroke

Now it s reproduce for Mac M1 2020.

12:41:45 (qt.qpa.fonts) Populating font family aliases took 58 ms. Replace uses of missing font family "Courier" with one that exists to avoid this cost. 12:41:46 Migrating Start Workbench to Start command... done. 12:43:10 Running the Python command 'Assembly_CreateBom' failed: Traceback (most recent call last): File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 94, in Activated self.panel = TaskAssemblyCreateBom() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 146, in init self.createBomObject() File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 337, in createBomObject self.bomObj = Gui.doCommandEval("bomObj") ^^^^^^^^^^^^^^^^^

module 'FreeCADGui' has no attribute 'doCommandEval'Running the Python command 'Assembly_CreateBom' failed: Traceback (most recent call last): File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 94, in Activated self.panel = TaskAssemblyCreateBom() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 146, in init self.createBomObject() File "/Applications/FreeCAD.app/Contents/Resources/Mod/Assembly/CommandCreateBom.py", line 337, in createBomObject self.bomObj = Gui.doCommandEval("bomObj") ^^^^^^^^^^^^^^^^^

module 'FreeCADGui' has no attribute 'doCommandEval'

IgorokNerovnyi1980 avatar Dec 23 '24 10:12 IgorokNerovnyi1980

I have same problem and did some research.

This issue is same as #18615 and the problem (i.e. lack of "doCommandEval") is fixed with commit "d1707fdf10e0468155bf57ace64e219e2ab17b7e" at 2024/12/20.

Maybe we can close this issue.

H-Tsubota avatar Jan 23 '25 16:01 H-Tsubota