When the same meshes are used for modeling and inversion, This will give you a list of all objects in the document.Two geometries have to be created. You can execute a parsed statement as often as you want. Now use the sql_parser to parse a statement. The parser can be used to parse as may statements as you want. Now that everything is set up, open the python console and import the SQL Parser and create a new instance. Next you should download the sample File Simple_House.FCStd and open it in FreeCAD. It's best to restart FreeCAD after the installation is done. Go to Tools > Addon Manager, scroll down select the Reporting entry and click Install. It is available from the addon manager directly in FreeCAD. First you should install the Reporting Workbench. Its not pretty, but it should be good enough to extract some data out of it ). This file contains a simple House with some rooms and doors. If you are familiar with the Python in FreeCAD, you might want to read the Getting started with python section Read the SQL Reference section for an overview of the supported SQL Features This section gives you a step by step introduction on how to get startet with the sql module in python. Whats next? Feel free to play around and add more Reports or more statements to the Report we created right now. Enable Skip Column Names and Print Result in Bold and add the following to the Statement field: If you look at the Result Spreadsheet again you see that there is some more data below the room list now (1) The living area on the upper floor (2) The living area on the ground floor (3) And the overall living area for the entire building This is the end of the getting started guide. Also enable Skip empty rows after statement here and add the following in the Statement field: Click Add Statement once again and leave the Header field empty. Click on Add Statement and add "Living Area" in the Header field. Double click the Report in the Treeview again. (1) The header we added in the Report Config (2) The column names extracted from our statement (3) The list of objects matching our statement and the values extracted for each column This is pretty good. Expand the Report in the Treeview and you should see a Spreadsheet named Result. The Task dialog closes and the report recomputes. Now fill in "Rooms" into the Header field and the following statement into the Statement field Click OK. Click Add Statement to add a new statement. Double click the Report object in the Treeview and the configuration shows up. Lets say we want to query some informations about the rooms inside the house. Now that the file is set up, we should fire up the report workbench and create our first report.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |