I'm currently working on an personal Architecture Project. Now I have some stuff created and want to get some informations out of the model.
I know there is the "Arch Schedule" tool available. But i think it is not flexible enough to get all sorts of Information one can dream about out of the model. As I work with SQL (Structured Query Language https://en.wikipedia.org/wiki/SQL) a lot during work, I decided to give it a try and create a SQL Module for FreeCAD.
After a few hours of playing around with it I have something to show to you. It is by far not finished, but I think it is still useable (at least in the python console).
The workbench can be found at https://github.com/furti/FreeCAD-Reporting.
For help requests or Bugs use this Topic: https://forum.freecadweb.org/viewtopic.php?f=3&t=38225
For new Features post to this Topic: https://forum.freecadweb.org/viewtopic.php?f=10&t=38224
EDIT: The following is a bit outdated. See the up to date documentation (https://github.com/furti/FreeCAD-Reporting) for a list of all available features.
There is no documentation available right now. But i will give you a short introduction here. I think this should be enough to get you going
The workbench has no GUI tools yet. So everything works via the python console right now.
1. At first you might want to open a document that has some objects in it. E.g. the attached one.
2. Go to the python console and create a new SQL parser. You can reuse this parser to parse multiple SQL Statements
Code: Select all
from sql import freecad_sql_parser
sql_parser = freecad_sql_parser.newParser()
Code: Select all
# Simply select all objects from the document
select_all = sql_parser.parse('Select * from document')
select_all.execute()
[[<Sketcher::SketchObject>], [<Part::PartFeature>], [<Sketcher::SketchObject>], [<Part::PartFeature>], [<Sketcher::SketchObject>], [<Part::PartFeature>], [<Part::PartFeature>], [<Part::PartFeature>], [<Part::PartFeature>]]
4. You can select only some properties of the object if you want
Code: Select all
select_label = sql_parser.parse('Select Label from document')
select_label.execute()
[['WallTrace'], ['Wall'], ['WallTrace001'], ['Wall001'], ['WallTrace002'], ['Wall002'], ['Structure'], ['Structure001'], ['Structure002']]
Code: Select all
select_something = sql_parser.parse("Select Label from document Where IfcRole = 'Column' OR Label = 'Wall'")
select_something.execute()
[['Wall'], ['Structure'], ['Structure001'], ['Structure002']]
Code: Select all
select_name_area_columns = sql_parser.parse("SELECT Label, VerticalArea From document Where IfcRole = 'Column'")
select_name_area_columns.execute()
[['Structure', 400000 mm^2], ['Structure001', 400000 mm^2], ['Structure002', 4e+06 mm^2]]
Code: Select all
select_number_of_objects = sql_parser.parse('Select count(*) From document')
select_number_of_objects.execute()
[[9]]