amrit3701 / FreeCAD-Reinforcement

Reinforcement Workbench for FreeCAD
https://wiki.freecadweb.org/Reinforcement_Workbench
48 stars 19 forks source link

TypeError in Reinforcement Drawing Dimensioning #217

Open balrobs opened 5 months ago

balrobs commented 5 months ago

After clicking the Finishing-Button in the "Reinforcement Drawing Dimensioning"-dialog I see this error:

09:35:30  Traceback (most recent call last):
09:35:30    File "C:\Users\balrobs\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\ReinforcementDrawing\MainReinforcementDrawingDimensioning.py", line 574, in nextButtonClicked
09:35:30      self.accept()
09:35:30    File "C:\Users\balrobs\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\ReinforcementDrawing\MainReinforcementDrawingDimensioning.py", line 773, in accept
09:35:30      FreeCADGui.doCommand(
09:35:30    File "<string>", line 1, in <module>
09:35:30    File "C:\Users\balrobs\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\ReinforcementDrawing\make_reinforcement_drawing.py", line 293, in makeStructuresReinforcementDrawing
09:35:30      struct_drawing_page_dict[structure] = makeReinforcementDrawing(
09:35:30                                            ^^^^^^^^^^^^^^^^^^^^^^^^^
09:35:30    File "C:\Users\balrobs\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\ReinforcementDrawing\make_reinforcement_drawing.py", line 151, in makeReinforcementDrawing
09:35:30      reinforcement_drawing_page = makeReinforcementDrawingObject(template_file)
09:35:30                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
09:35:30    File "C:\Users\balrobs\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\ReinforcementDrawing\ReinforcementDrawingView.py", line 477, in makeReinforcementDrawingObject
09:35:30      drawing_page.addView(reinforcement_drawing_view)
09:35:30  TypeError: argument 1 must be TechDraw.DrawView, not FeaturePython

OS: Windows 10 build 19045 Word size of FreeCAD: 64-bit Version: 0.22.0dev.37543 (Git) Build type: Release Branch: main Hash: 3eb45b045cdda9d5bfe11baba2567a1df90f064c Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2 Locale: German/Germany (de_DE) Installed mods:

balrobs commented 5 months ago

the error can be reproduced with FreeCAD 0.21.2 and FreeCAD 0.21.1 for Windows10

balrobs commented 5 months ago

with FreeCAD 0.20.2 everything works fine! beam so the error must be caused by a change in TechDraw between the versions 0.20.2 and 0.21. I would like to fix this error so that this feature also works in the latest FreeCAD version, unfortunately I can't get any further with my limited knowledge. Therefore I turn to you, @amrit3701 and @WandererFan because I think you are the ones that can eventually help me. Thank you in advance for any helpful tips that can bring me further balrobs