Arch Schedule/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 48: Line 48:


* '''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 {{incode|object.Shape.Volume}} or {{incode|object.Length}} or even {{incode|object.Label}}. The name you use before the first dot (object) can be anything, you could also write {{incode|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 {{incode|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.
** 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}}.
* '''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.
* '''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.
* '''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.
* '''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.
Line 71: Line 73:
==Filters==
==Filters==


You can use any object property as a filter. The syntax is {{incode|property:value}}. Both the property and the value are case-insensitive. The {{incode|value}} can be left out but not the {{incode|:}}. To invert a filter prepend {{incode|!}}. Note that the {{incode|type}} property will be translated to the {{incode|ifctype}} property.
Currently available filters:


Some examples:
: {{incode|name:something}}: Will retain only objects that have "something" in their name (case-insensitive)
: {{incode|!name:something}}: Will retain only objects that don't have "something" in their name
: {{incode|label:something}} Will retain only objects that have "something" in their label.
: {{incode|label:something}}: Will retain only objects that have "something" in their label (case-insensitive)
: {{incode|!label:something}} Will retain only objects that do not have "something" in their label.
: {{incode|!label:something}}: Will retain only objects that don't have "something" in their label
: {{incode|ifctype:something}} Will retain only objects that have "something" in their IFC Type property.
: {{incode|type:something}}: Will retain only objects where the {{incode|Draft.getType()}} function returns "something"
: {{incode|!ifctype:something}} Will retain only objects that do not have "something" in their IFC Type property or that do not have the IFC Type property.
: {{incode|!type:something}}: Will retain only objects where the {{incode|Draft.getType()}} function does not return "something"
: {{incode|!ifctype:}} Will retain only objects that do not have the IFC Type property.
: {{incode|role:something}}: Will retain only objects that have a Role property set to "something"
: {{incode|!role:something}}: Will retain only objects that don't have a Role property, or where the Role property is not set to "something"





Revision as of 15:25, 23 January 2021

Arch Schedule

Системное название
Arch Schedule
Расположение в меню
Архитектура → Create schedule...
Верстаки
Arch
Быстрые клавиши
Нет
Представлено в версии
-
См. также
Нет


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: 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.

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.

Filters

You can use any object property as a filter. The syntax is property:value. Both the property and the value are case-insensitive. The value can be left out but not the :. To invert a filter prepend !. Note that the type property will be translated to the ifctype property.

Some examples:

label:something Will retain only objects that have "something" in their label.
!label:something Will retain only objects that do not have "something" in their label.
ifctype:something Will retain only objects that have "something" in their IFC Type property.
!ifctype:something Will retain only objects that do not have "something" in their IFC Type property or that do not have the IFC Type property.
!ifctype: Will retain only objects that do not have the IFC Type property.