SQL Reporting Workbench for FreeCAD

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: SQL Reporting Workbench for FreeCAD

Post by yorik »

wow,VERY interesting! I'm also not happy with the arch schedule tool. This indeed is extremely more powerful.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: SQL Reporting Workbench for FreeCAD

Post by paullee »

Another amasing works after the Arch Texture WB!

Can't wait to try unfortunately I have no acess to a PC right now.

Hope there is also some quantity surveyor joining the discussion about Bill of Quantity / Material etc.
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

I'm glad to here that there is some interest in such a tool :)

I updated the repository with the first Basic implementation of a report. (still no documentation yet)

The tool works a bit like the "Arch schedule" tool.

Open a document and start the "Reporting" workbench.
reporting_start.png
reporting_start.png (14.09 KiB) Viewed 2953 times
This will create a Report Object in the document for you. Each Report object has a spreadsheet attached that stores the result of the report.

Double click the Report Object to add some queries to it.
reporting_statements.png
reporting_statements.png (8.89 KiB) Viewed 2953 times
For the sample file attached in the initial post i used this statement:

Code: Select all

Select Label, HorizontalArea
From document
Where IfcRole = 'Column'

When you click "OK" the report is executed. Now open the Spreadsheet and you should see a result like this
reporting_result.png
reporting_result.png (4.99 KiB) Viewed 2953 times
You can use multiple Statements per report. And you can skip the Header field if you don't Need one.

Maybe some of you could already test it and give me feedback about the general workflow.
Also intersting to me is: Are there any properties that need special tostring handling (e.g. for quantities i use the UserString property. Everything else is simply converted to a string with pythons "str" method)


Happy reporting ;)
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

I updated the Readme with a short tutorial and the SQL Reference.

The SQL parser also supports grouping now. :)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: SQL Reporting Workbench for FreeCAD

Post by Kunda1 »

yorik wrote: Mon Jan 14, 2019 4:33 pm wow,VERY interesting! I'm also not happy with the arch schedule tool. This indeed is extremely more powerful.
Hey @yorik
@furti opened a request to add this WB to the Addon repo
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
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

Added some bugfixes and minor improvements. Also started a "How To" section in the Readme where I want to collect some useful SQL Statements that might be of interest for others too :)

See https://github.com/furti/FreeCAD-Report ... es/tag/0.1 for more Details.
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

Added some new Features and redesigned the Report Config UI a bit.

See https://github.com/furti/FreeCAD-Report ... es/tag/0.2 for more Details.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: SQL Reporting Workbench for FreeCAD

Post by yorik »

Added to the addons manager!
I'll need to have a look at integrating it with the BIM WB... :)
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

Awesome :)
yorik wrote: Thu Jan 24, 2019 1:53 pm integrating it with the BIM WB
This would be pretty nice. I think the Report is already a good replacement for the arch schedule tool :)
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Post by furti »

Added Export / Import commands to the workbench. This makes it possible to share Reports between different Projects or create a report library with common used Reports. :)

For a full list of changes see https://github.com/furti/FreeCAD-Report ... es/tag/0.3
Post Reply