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!
User avatar
yorik
Site Admin
Posts: 11458
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: SQL Reporting Workbench for FreeCAD

Postby yorik » 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.
paullee
Posts: 1643
Joined: Wed May 04, 2016 3:58 pm

Re: SQL Reporting Workbench for FreeCAD

Postby paullee » Wed Jan 16, 2019 1:14 am

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: 311
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Wed Jan 16, 2019 7:20 pm

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 826 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 826 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 826 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: 311
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Fri Jan 18, 2019 8:26 pm

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

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

Re: SQL Reporting Workbench for FreeCAD

Postby Kunda1 » Sat Jan 19, 2019 12:12 pm

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
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
furti
Posts: 311
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Sat Jan 19, 2019 4:13 pm

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: 311
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Wed Jan 23, 2019 7:59 pm

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
Site Admin
Posts: 11458
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: SQL Reporting Workbench for FreeCAD

Postby yorik » Thu Jan 24, 2019 1:53 pm

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

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Thu Jan 24, 2019 4:51 pm

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: 311
Joined: Mon Nov 27, 2017 5:27 pm

Re: SQL Reporting Workbench for FreeCAD

Postby furti » Sat Jan 26, 2019 11:44 am

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