How much interest is there to integrate LibreOffice into FreeCAD?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
salp
Posts: 252
Joined: Thu Nov 21, 2013 11:58 pm
Location: Putnam, NY

How much interest is there to integrate LibreOffice into FreeCAD?

Post by salp »

For the past few years I played around with integrating LibreOffice Calc into FreeCAD, with not much luck as the Open Office API was quite cryptic and difficult to implement (for me).

However in Python 3 the process has been made simpler with the introduction of PyUNO, and although the amount of information is still limited there is enough out there to show what can be done. So I wanted to visit the topic again.
Much of the information I found was for running Python scripts inside LibreOffice, but I think some of that code can be adapted.

One of the challenges is that LibreOffice needs to run as a service independent of FreeCAD, and so far I have had limited success stopping a specific LibreOffice session once it's started.

I'm looking for feedback on what information / methods should included.be shared between FreeCAD and Calc.
  • Auto populate spreadsheet with FreeCAD object properties
    Do data changes need to be auto detected or can the user initiate the process?
    Is it acceptable to have Calc running outside of the FreeCAD window?

If you have any thoughts on this please share.

Sal
User avatar
Aleks
Posts: 309
Joined: Sun Mar 08, 2020 5:27 pm
Location: Bonn, Germany
Contact:

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Aleks »

I am interested in an integration of LibreOffice or OpenOffice (Writer) into FreeCAD. I need to be able to generate PDF Files e.g. Manuals of products I develop with dynamic linking to a spreadsheet inside the FreeCAD Document. Is there a way I can help you with that?
FreeCAD als Maschinenbauer in die Konstruktion und Fertigung integrieren. Schulung buchen: www.alsado.de/freecad-schulungen
User avatar
salp
Posts: 252
Joined: Thu Nov 21, 2013 11:58 pm
Location: Putnam, NY

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by salp »

Aleks
From what I'v been reading the UNO api treats all LibreOffice/OpenOffice documents the same way, so what works for Calc should also work for Writer.
dynamic linking to a spreadsheet inside the FreeCAD Document.
I dont think LibreOffice runs inside FreeCAD, as I understand it a LibreOffice session is created (usually on the local computer) and you connect to the session and then manipulate the document.
One issue I see right away is that the you are now handling 2 documents (FreeCAD and Libreoffice), also the user needs to have the LibreOffice application installed.
Is there a way I can help you with that?
Right now I'm still in the process of getting an idea of what to concentrate on.

I'll start by creating a GitHub repository and start placing the code there.
I'll post the GitHub site once its created.

Sal
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Zolko »

salp wrote: Sun Mar 08, 2020 11:18 pm How much interest is there to integrate LibreOffice into FreeCAD ?
...
If you have any thoughts on this please share.
0 (=zero). Focus should be on removing stuff from FreeCAD and not add more bloat to it.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Kunda1 »

Zolko wrote: Tue Mar 10, 2020 9:05 am 0 (=zero). Focus should be on removing stuff from FreeCAD and not add more bloat to it.
No need to be dogmatic here.

So I disagree, this extension could opens up a whole lot of possibilities and toolsets of the LibreOffice suite that some will find useful. It also build a link to that very active open source community. Ideally it could be hacked as an external extension. So :+1: from me.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Joel_graff »

Integrating LibreOffice into FreeCAD would be a fantastic idea.

I made an attempt at this a couple of years ago with very limited success and it's been revisited a number of times by others as well. It's not an easy / straightforward task, it seems.

Usually the motivation is to provide an alternate for the Spreadsheet module using Calc, but it's not a particularly great need. The Spreadsheet Module works pretty well and there aren't a lot of use cases at this point that demand functionality it can't reasonably provide.

Still, creating a tight / seamless integration that uses an existing LibreOffice install would be fantastic.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Joel_graff »

salp wrote: Sun Mar 08, 2020 11:18 pm I'm looking for feedback on what information / methods should included.be shared between FreeCAD and Calc.
  • Auto populate spreadsheet with FreeCAD object properties
    Do data changes need to be auto detected or can the user initiate the process?
    Is it acceptable to have Calc running outside of the FreeCAD window?

If you have any thoughts on this please share.

Sal
I explored this a couple of years ago and built a little python bridge that worked, but it proved too challenging for me to sort out all of the details at the time. It was more UNO's fault than FC's, though. :)

To your points:
  • Seems like a useful idea. Doable in Python, but I don't know the use cases that would demand it.
  • A Sync button would be the default, for sure. Could possibly tack it on to the end of a document recalc as well. As for auto-updating specific properties, that would be something users / individual devs would have to sort out for themselves. Though, an API that makes that process straightforward wouldn't be a bad idea.
  • Running calc in the application main window would be pretty tricky, I think. I did some digging and it wasn't clear to me even if it could be done, though I'm sure it could. An external window would be the place to start, without a doubt.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Aleks
Posts: 309
Joined: Sun Mar 08, 2020 5:27 pm
Location: Bonn, Germany
Contact:

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Aleks »

Zolko wrote: Tue Mar 10, 2020 9:05 am
salp wrote: Sun Mar 08, 2020 11:18 pm How much interest is there to integrate LibreOffice into FreeCAD ?
...
If you have any thoughts on this please share.
0 (=zero). Focus should be on removing stuff from FreeCAD and not add more bloat to it.
Usually I would be on your side, but I just mentioned a specific use case of LibreOffice that would fit into my production process.
FreeCAD als Maschinenbauer in die Konstruktion und Fertigung integrieren. Schulung buchen: www.alsado.de/freecad-schulungen
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Kunda1 »

Joel_graff wrote: Tue Mar 10, 2020 11:32 am
Where are some of those experiments that you did? is there code still laying around ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: How much interest is there to integrate LibreOffice into FreeCAD?

Post by Joel_graff »

Kunda1 wrote: Tue Mar 10, 2020 1:32 pm Where are some of those experiments that you did? is there code still laying around ?
salp wrote:
https://github.com/joelgraff/freecad-tr ... eBridge.py

It's not much...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply