Arch Schedule: Difference between revisions

From FreeCAD Documentation
(Vertical GuiCommand; see also Arch Equipment)
(Marked this version for translation)
(37 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:31-->
{{Docnav
|[[Arch_MultiMaterial|Multi-Material]]
|[[Arch_CutLine|Cut with a line]]
|[[Arch_Module|Arch]]
|IconL=Arch_MultiMaterial.svg
|IconR=Arch_CutLine.svg
|IconC=Workbench_Arch.svg
}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Arch Schedule
|Name=Arch Schedule
|MenuLocation=Arch → Schedule
|MenuLocation=Arch → Schedule
|Workbenches=[[Arch Module|Arch]]
|Workbenches=[[Arch_Module|Arch]]
|SeeAlso=[[Arch Equipment]]
|SeeAlso=[[Arch_Equipment|Arch Equipment]]
}}
}}



==Description== <!--T:2-->
==Description== <!--T:2-->
Line 16: Line 26:


<!--T:12-->
<!--T:12-->
'''Note''': This tool has been rewritten in FreeCAD 0.17 and differs in previous versions.
{{Emphasis|Note}}: This tool has been rewritten in FreeCAD 0.17 and differs from previous versions.


==How to use== <!--T:4-->
<!--T:35-->
For a more general solution, see the [https://github.com/furti/FreeCAD-Reporting/tree/master Reporting Workbench] in the list of [[external workbenches|external workbenches]]. This workbench uses SQL syntax to extract information from the document.

==Usage== <!--T:4-->


<!--T:8-->
<!--T:8-->
# Open or create a FreeCAD document which contains some objects
# Open or create a FreeCAD document which contains some objects.
# Press the {{KEY|[[Image:Arch Schedule.png|16px]] [[Arch Schedule|Schedule]]}} button
# Press the {{Button|[[Image:Arch_Schedule.svg|16px]] [[Arch_Schedule|Schedule]]}} button.
# Adjust the desired options
# Adjust the desired options.
# Press '''OK'''
# Press {{Button|OK}}.


==Workflow== <!--T:9-->
==Workflow== <!--T:9-->
Line 31: Line 44:
First you need to have a model. For example, here is a document with a couple of objects. I did Arch stuff here, but it doesn't need to be Arch, it can be anything.
First you need to have a model. For example, here is a document with a couple of objects. I did Arch stuff here, but it doesn't need to be Arch, it can be anything.


</translate>
<!--T:14-->
[[Image:Arch_schedule_example01.jpg]]
[[Image:Arch_schedule_example01.jpg]]
<translate>


<!--T:15-->
<!--T:15-->
Then you press the Arch Schedule button. You get a task panel like this. It is pretty wide, so you'll need to widen the task panel to be comfortable.
Then you press the {{Button|[[Image:Arch_Schedule.svg|16px]] [[Arch_Schedule|Arch Schedule]]}} button. You get a task panel like this. It is pretty wide, so you'll need to widen the task panel to be comfortable.


</translate>
<!--T:16-->
[[Image:Arch_schedule_example02.jpg]]
[[Image:Arch_schedule_example02.jpg]]
<translate>


<!--T:17-->
<!--T:17-->
Then you can fill line by line. Each line is a "query" and will render one line in the spreadsheet. Press the '''Add''' button to add a new line, and double-click each cell from that line to fill in the values. The '''Del''' button will delete the line which contains a currently selected cell, and '''Clear''' will delete all the lines. Possible values to put in columns are:
Then you can fill line by line. Each line is a "query" and will render one line in the spreadsheet. Press the {{Button|Add}} button to add a new line, and double-click each cell from that line to fill in the values. The {{Button|Del}} button will delete the line which contains a currently selected cell, and {{Button|Clear}} will delete all the lines. Possible values to put in columns are:


<!--T:18-->
<!--T:18-->
* '''Description''': A description for this query. The Description column will be the first column of the resulting spreadsheet. The description is mandatory to have a query performed. If you leave the description cell empty, the whole line will be skipped and left blank in the spreadsheet. This allows you to add "separator" lines.
* '''Description''': A description for this query. The Description column will be the first column of the resulting spreadsheet. The description is mandatory to have a query performed. If you leave the description cell empty, the whole line will be skipped and left blank in the spreadsheet. This allows you to add "separator" lines.
* '''Value''': This is the real query that you want to perform on all the objects selected by the query. It can be two things: either the word {{incode|count}} or an object property:
* '''Value''': This is the real query that you want to perform on all the objects selected by this query. It can be two kinds of things: either the word '''count''' (or Count or COUNT, it's case-insensitive), which will simply count objects, or retrieve ans sum a property, for example '''object.Shape.Volume''' or '''object.Length''' or even '''object.Label'''. The name you use before the first dot (object) can be anything, you could also write x.Shape.Volume. The rule is: what comes after the first dot will be retrieved from each object selected by this query, if possible (object that don't have the required property will be skipped), and the result will be added together. For example, if you use object.Shape.Volume, you will get the sum of all volumes of all objects selected by this query.
** If you enter {{incode|count}} (or {{incode|Count}} or {{incode|COUNT}}, it's case-insensitive) the selected objects will simply be counted.
* '''Unit''': An optional unit to express the results in. It's up to you to give a unit that matches the query you are doing, for example, if you are retrieving volumes, you should use a volume unit, such as m^3. If you use a wrong unit, for ex. cm, you'll get wrong results.
** If you enter an object property the value of this property for each of the selected objects will be retrieved and summed up. Objects that do not have the property will be skipped. Use dot notation to retrieve properties of properties: {{incode|PropertyOfObject.PropertyOfProperty1.PropertyOfProperty2}}. If the property before the first dot starts with a lowercase letter it will be considered a reference to the object itself and be ignored. Entering for example {{incode|object.Shape.Volume}} is the same as entering {{incode|Shape.Volume}}.
* '''Objects''': You can leave this empty, then all the objects of the document will be considered by this query, or give a semicolon (;)-separated list of object names (not labels). If any of the objects in this list is a group, its children will be selected as well. So the easiest way to use this feature is to group your objects meaningfully in the document, and just give a group name here. You can also use the '''Selection''' button to add objects currently selected in the document.
* '''Unit''': An optional unit to express the results in. It's up to you to give a unit that matches the query you are doing, for example, if you are retrieving volumes, you should use a volume unit, such as {{incode|m^3}}. If you use a wrong unit, for ex. cm, you'll get wrong results.
* '''Filter''': Here you can add a semicolon(;)-separated list of filters. Each filter is written in the form: filter:value, where filter can be (it's case-insensitive too): Name, Label, Type, or Role (see full list below). For example: name:door;type:window will filter the objects we got from the step above, and retain only those whose name contains "door" AND the type (returned by Draft.getType) is "wall". Everything is case-insensitive. Filters that begins with ! are inverted. For example, !name:wall will retain only objects that DON'T have "wall" in their name. "Role" is a property that all Arch objects have.
* '''Objects''': You can leave this empty, then all the objects of the document will be considered by this query, or give a semicolon (;)-separated list of object names (not labels). If any of the objects in this list is a group, its children will be selected as well. So the easiest way to use this feature is to group your objects meaningfully in the document, and just give a group name here. You can also use the {{Button|Selection}} button to add objects currently selected in the document.
* '''Filter''': Here you can add a semicolon{{incode|;}}-separated list of filters. Each filter is written in the form: {{incode|property:value}}. You can only use properties that hold a string value. Both the property and the value are case-insensitive. The {{incode|value}} can be left out but not the {{incode|:}}. To properly handle schedules created with previous versions of Arch Schedule the {{incode|type}} property will be translated to the {{incode|ifctype}} property. It is advisable to not use {{incode|type}} in new schedules.
: For example:
:: {{incode|label:floor1;ifctype:window}} will retain only objects that have "floor1" in their {{PropertyData|Label}} and "window" in their {{PropertyData|IFC Type}}. A window with the {{PropertyData|Label}} "Floor1-AA" and the {{PropertyData|IFC Type}} "Window Standard Case" will be included.
:: {{incode|label:door}} Will retain only objects that have "door" in their {{PropertyData|Label}}.
:: {{incode|!label:door}} Will retain only objects that do not have "door" in their {{PropertyData|Label}}.
:: {{incode|ifctype:structural}} Will retain only objects that have "structural" in their {{PropertyData|IFC Type}}.
:: {{incode|!ifctype:something}} Will retain only objects that do not have "structural" in their {{PropertyData|IFC Type}} or that do not have the {{PropertyData|IFC Type}} property.
:: {{incode|!ifctype:}} Will retain only objects that do not have the {{PropertyData|IFC Type}} property.


<!--T:19-->
<!--T:19-->
The '''Import''' button allows you to build this list in another spreadsheet application, and import that as a csv file here.
The {{Button|Import}} button allows you to build this list in another spreadsheet application, and import that as a csv file here.


<!--T:20-->
<!--T:20-->
So we can build a list of queries like this:
So we can build a list of queries like this:


</translate>
<!--T:21-->
[[Image:Arch_schedule_example03.jpg]]
[[Image:Arch_schedule_example03.jpg]]
<translate>


<!--T:22-->
<!--T:22-->
After that, press OK and a new Schedule object is added to the document, which contains a result spreadsheet:
After that, press {{Button|OK}} and a new Schedule object is added to the document, which contains a result spreadsheet:


</translate>
<!--T:23-->
[[Image:Arch_schedule_example04.jpg]]
[[Image:Arch_schedule_example04.jpg]]
<translate>


<!--T:24-->
<!--T:24-->
By double-clicking the Schedule object, you get back to the task panel and change the values. By double-clicking the spreadsheet itself, you get the results in 3 columns: description, value, unit (if applicable):
By double-clicking the Schedule object, you get back to the task panel and change the values. By double-clicking the spreadsheet itself, you get the results in 3 columns: description, value, unit (if applicable):


</translate>
<!--T:25-->
[[Image:Arch_schedule_example05.jpg]]
[[Image:Arch_schedule_example05.jpg]]
<translate>


<!--T:26-->
<!--T:26-->
The spreadsheet can then be exported to csv normally, from the Spreadsheet workbench.
The spreadsheet can then be exported to csv normally, from the Spreadsheet workbench.


==Filters== <!--T:27-->
==Dynamic properties== <!--T:36-->


<!--T:28-->
<!--T:37-->
It is possible to add your own properties to objects. These are called [[Property_editor#Actions|Dynamic properties]]. If they have been added with the {{MenuCommand|Prefix group name}} option selected, their names will indeed start with the group name, but this prefix is not displayed in the [[Property_editor|Property editor]]. Their names have this form: {{incode|NameOfGroup_NameOfProperty}}. To reference them in a schedule this full name must be used.
Currently available filters:


<!--T:29-->
* '''name:something''': Will retain only objects that have "something" in their name (case-insensitive)
* '''!name:something''': Will retain only objects that don't have "something" in their name
* '''label:something''': Will retain only objects that have "something" in their label (case-insensitive)
* '''!label:something''': Will retain only objects that don't have "something" in their label
* '''type:something''': Will retain only objects where the Draft.getType() function returns "something"
* '''!type:something''': Will retain only objects where the Draft.getType() function does not return "something"
* '''role:something''': Will retain only objects that have a Role property set to "something"
* '''!role:something''': Will retain only objects that don't have a Role property, or where the Role property is not set to "something"
</translate>


<!--T:32-->
{{Docnav
|[[Arch_MultiMaterial|Multi-Material]]
|[[Arch_CutLine|Cut with a line]]
|[[Arch_Module|Arch]]
|IconL=Arch_MultiMaterial.svg
|IconR=Arch_CutLine.svg
|IconC=Workbench_Arch.svg
}}


<translate>
<!--T:30-->
[[Category:Arch]]
</translate>
</translate>
{{Arch Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 18:28, 25 January 2021

Arch Schedule

Menu location
Arch → Schedule
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch Equipment

Description

The Schedule tool allows you to create and automatically populate a spreadsheet with contents gathered from the model.

Note: This tool has been rewritten in FreeCAD 0.17 and differs from previous versions.

For a more general solution, see the Reporting Workbench in the list of external workbenches. This workbench uses SQL syntax to extract information from the document.

Usage

  1. Open or create a FreeCAD document which contains some objects.
  2. Press the Schedule button.
  3. Adjust the desired options.
  4. Press OK.

Workflow

First you need to have a model. For example, here is a document with a couple of objects. I did Arch stuff here, but it doesn't need to be Arch, it can be anything.

Then you press the Arch Schedule button. You get a task panel like this. It is pretty wide, so you'll need to widen the task panel to be comfortable.

Then you can fill line by line. Each line is a "query" and will render one line in the spreadsheet. Press the Add button to add a new line, and double-click each cell from that line to fill in the values. The Del button will delete the line which contains a currently selected cell, and Clear will delete all the lines. Possible values to put in columns are:

  • Description: A description for this query. The Description column will be the first column of the resulting spreadsheet. The description is mandatory to have a query performed. If you leave the description cell empty, the whole line will be skipped and left blank in the spreadsheet. This allows you to add "separator" lines.
  • Value: This is the real query that you want to perform on all the objects selected by the query. It can be two things: either the word count or an object property:
    • If you enter count (or Count or COUNT, it's case-insensitive) the selected objects will simply be counted.
    • If you enter an object property the value of this property for each of the selected objects will be retrieved and summed up. Objects that do not have the property will be skipped. Use dot notation to retrieve properties of properties: PropertyOfObject.PropertyOfProperty1.PropertyOfProperty2. If the property before the first dot starts with a lowercase letter it will be considered a reference to the object itself and be ignored. Entering for example object.Shape.Volume is the same as entering Shape.Volume.
  • Unit: An optional unit to express the results in. It's up to you to give a unit that matches the query you are doing, for example, if you are retrieving volumes, you should use a volume unit, such as m^3. If you use a wrong unit, for ex. cm, you'll get wrong results.
  • Objects: You can leave this empty, then all the objects of the document will be considered by this query, or give a semicolon (;)-separated list of object names (not labels). If any of the objects in this list is a group, its children will be selected as well. So the easiest way to use this feature is to group your objects meaningfully in the document, and just give a group name here. You can also use the Selection button to add objects currently selected in the document.
  • Filter: Here you can add a semicolon;-separated list of filters. Each filter is written in the form: property:value. You can only use properties that hold a string value. Both the property and the value are case-insensitive. The value can be left out but not the :. To properly handle schedules created with previous versions of Arch Schedule the type property will be translated to the ifctype property. It is advisable to not use type in new schedules.
For example:
label:floor1;ifctype:window will retain only objects that have "floor1" in their DataLabel and "window" in their DataIFC Type. A window with the DataLabel "Floor1-AA" and the DataIFC Type "Window Standard Case" will be included.
label:door Will retain only objects that have "door" in their DataLabel.
!label:door Will retain only objects that do not have "door" in their DataLabel.
ifctype:structural Will retain only objects that have "structural" in their DataIFC Type.
!ifctype:something Will retain only objects that do not have "structural" in their DataIFC Type or that do not have the DataIFC Type property.
!ifctype: Will retain only objects that do not have the DataIFC Type property.

The Import button allows you to build this list in another spreadsheet application, and import that as a csv file here.

So we can build a list of queries like this:

After that, press OK and a new Schedule object is added to the document, which contains a result spreadsheet:

By double-clicking the Schedule object, you get back to the task panel and change the values. By double-clicking the spreadsheet itself, you get the results in 3 columns: description, value, unit (if applicable):

The spreadsheet can then be exported to csv normally, from the Spreadsheet workbench.

Dynamic properties

It is possible to add your own properties to objects. These are called Dynamic properties. If they have been added with the Prefix group name option selected, their names will indeed start with the group name, but this prefix is not displayed in the Property editor. Their names have this form: NameOfGroup_NameOfProperty. To reference them in a schedule this full name must be used.