FC19 and WB Drawing Dimensioning

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

FC19 and WB Drawing Dimensioning

Post by Roland »

Dear Forum!

I was used to WB Drawing and WB Drawing Dimensioning, and quite happy with these WBs.
I am also aware that the main developers are of the opinion that WB TechDraw is THE way to go. Although that may be true in the future, at the moment WB TechDraw is not adequate for my goals.

Now the trouble is, that I get errors in FC19 when trying to use WB Drawing Dimensioning. This leaves me 2 potential ways forward:
  • Go back to FC18 to prepare the drawings. This does not work for me because the things prepared in FC19 are not compatible with FC18.
      Or make adaptations to the set-up of WB Drawing Dimensioning in FC19. For this approach you might be able to help me. Please consider this.
    First, do note that I use FC19 Portable from D:/.../FreeCAD-0.19.1.a88db11-WIN-x64-portable
    And I still have the latest FC18 installed on C:/ Hence there exists also a directory C:/Users ... AppData\Roaming\FreeCAD\Mod\

    A first error begins at start-up:
    Upon start-up of FC19 I get this error in a window: File does not exist - D:/:/dd/icons/linearDimension.svg
    error2.png
    error2.png (4.97 KiB) Viewed 1729 times
    This contradicts the message in the Report View, which clearly says:

    Code: Select all

    Init:      Initializing C:\Users\Roland\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning... done
    I observe that FC19 Portable from D: does initialize WBs located on C:/Users ... AppData\Roaming\FreeCAD\Mod\ Ain't that a bit strange, especially since WB Drawing Dimensioning has also been installed inside FC19 Portable on D:/ ? Here: D:\...\FreeCAD-0.19.1.a88db11-WIN-x64-portable\FreeCAD\Mod\drawing_dimensioning

    Upon trying to use WB Drawing Dimensioning. Python Panel gives:

    Code: Select all

    >>> Gui.activateWorkbench("DrawingDimensioningWorkbench")
    >>> ### End command Std_Workbench
    So far so good.

    When I activate a dimensioning command, report gives this error:

    Code: Select all

    19:07:05  Traceback (most recent call last):
      File "C:\Users\Roland\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning\drawingDimensioning\selectionOverlay\__init__.py", line 23, in mousePressEvent
        self._onClickFun( event, self, self.elementXML, self.elementParms, self.elementViewObject )
      File "C:\Users\Roland\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning\drawingDimensioning\linearDimension.py", line 214, in selectDimensioningPoint
        previewDimension.initializePreview( d, linearDimension_points_preview, linearDimension_points_clickHandler )
      File "C:\Users\Roland\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning\drawingDimensioning\previewDimension.py", line 60, in initializePreview
        preview.SVGRenderer.load( QtCore.QByteArray( '''<svg width="%i" height="%i"> </svg>''' % (drawingVars.width, drawingVars.height) ) ) #without this something goes wrong...
    TypeError: 'PySide2.QtCore.QByteArray' called with wrong argument types:
      PySide2.QtCore.QByteArray(str)
    Supported signatures:
      PySide2.QtCore.QByteArray()
      PySide2.QtCore.QByteArray(bytearray)
      PySide2.QtCore.QByteArray(bytes)
      PySide2.QtCore.QByteArray(PySide2.QtCore.QByteArray)
      PySide2.QtCore.QByteArray(int, int)
    Questions:
    • Should I instruct FC19 to NOT use the WB install inside C:/Users ... AppData\Roaming\FreeCAD\Mod\? But rather the one inside D:\...\FreeCAD-0.19.1.a88db11-WIN-x64-portable\FreeCAD\Mod\? If so, how?
    • Should I try to find solutions into another direction?
    Note that I prefer to keep the FC18 installation with its WBs on C:/Users ... AppData\Roaming\FreeCAD\ alive.

    Your tips and suggestions will be most welcome!

    Best regards from,

    Roland on
    OS: Windows 10 Version 2009
    Word size of OS: 64-bit
    Word size of FreeCAD: 64-bit
    Version: 0.19.24276 (Git)
    Build type: Release
    Branch: releases/FreeCAD-0-19
    Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
    Python version: 3.8.6+
    Qt version: 5.15.1
    Coin version: 4.0.1
    OCC version: 7.5.0
    Locale: English/United Kingdom (en_GB)
    chrisb
    Veteran
    Posts: 54201
    Joined: Tue Mar 17, 2015 9:14 am

    Re: FC19 and WB Drawing Dimensioning

    Post by chrisb »

    What is it what you are missing in TechDraw that was available in DrawingDimensioning?
    A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
    User avatar
    Roland
    Posts: 333
    Joined: Fri Aug 21, 2015 2:20 pm

    Re: FC19 and WB Drawing Dimensioning

    Post by Roland »

    Hi Chris,

    WB TechDraw by itself is another discussion. I hope to be able to make good suggestions later. For this moment, the fact is that in my project I need to prepare 500+ drawings, 1/3 of which is ready now, made in FC18, using the obsolete drawing WB. I use a very specific workflow in which I combine FC18 with Visio. After this project is ready, I shall give TechDraw a new try.

    Meanwhile, I experimented further on a Linux machine, using the AppImage FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage.
    That machine does not have the older FC18, so there cannot be any interference with Roaming AppData on C:/Users etc.

    During start-up FC19 the report tells me that the obsolete WB Drawing Dimensioning made a good start:

    Code: Select all

    10:37:55  Init:      Initializing /home/roland/.FreeCAD/Mod/drawing_dimensioning... done
    However, during startup there is also this little window that tells me that linearDimensions.svg is missing. Hence the report makes a mistake.

    Further, when using WB Drawing Dimensioning the same errors appear:

    Code: Select all

    10:44:27  Traceback (most recent call last):
      File "/home/roland/.FreeCAD/Mod/drawing_dimensioning/drawingDimensioning/selectionOverlay/__init__.py", line 23, in mousePressEvent
        self._onClickFun( event, self, self.elementXML, self.elementParms, self.elementViewObject )
      File "/home/roland/.FreeCAD/Mod/drawing_dimensioning/drawingDimensioning/linearDimension.py", line 214, in selectDimensioningPoint
        previewDimension.initializePreview( d, linearDimension_points_preview, linearDimension_points_clickHandler )
      File "/home/roland/.FreeCAD/Mod/drawing_dimensioning/drawingDimensioning/previewDimension.py", line 60, in initializePreview
        preview.SVGRenderer.load( QtCore.QByteArray( '''<svg width="%i" height="%i"> </svg>''' % (drawingVars.width, drawingVars.height) ) ) #without this something goes wrong...
    TypeError: 'PySide2.QtCore.QByteArray' called with wrong argument types:
      PySide2.QtCore.QByteArray(str)
    Supported signatures:
      PySide2.QtCore.QByteArray()
      PySide2.QtCore.QByteArray(bytearray)
      PySide2.QtCore.QByteArray(bytes)
      PySide2.QtCore.QByteArray(PySide2.QtCore.QByteArray)
      PySide2.QtCore.QByteArray(int, typing.Char)
    Conclusion:
    The error is not caused by any interference between a previous FC18 install and FC19.

    Question:
    • How could I tweak my FC19 install to make operate the WB Drawing Dimensioning again?
    Anybody?

    Greetz!

    Roland
    chrisb
    Veteran
    Posts: 54201
    Joined: Tue Mar 17, 2015 9:14 am

    Re: FC19 and WB Drawing Dimensioning

    Post by chrisb »

    Roland wrote: Fri May 21, 2021 8:51 am Hence the report makes a mistake.
    I don't think so. We have seen missing SVGs before, and this didn't stop the functions from working. Furthermore, not every function is executed on startup, so it is possible that errors occur later.

    To be honest: I rather prefer to see people working on TechDraw, than to fix an obsolete workbench, so I recommend to use the 0.18 AppImage until you make the switch.
    A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
    User avatar
    Roland
    Posts: 333
    Joined: Fri Aug 21, 2015 2:20 pm

    Re: FC19 and WB Drawing Dimensioning

    Post by Roland »

    chrisb wrote: Fri May 21, 2021 9:47 am I recommend to use the 0.18 AppImage until you make the switch.
    Yes, Chris, if no tweaks to FC19 are advised, I shall continue to prepare the models in FC18.

    Best regards,

    Roland
    Post Reply