Arch: Scheda

From FreeCAD Documentation
Revision as of 20:33, 12 October 2016 by Renatorivo (talk | contribs)

Scheda

Posizione nel menu
Arch → Crea scheda...
Ambiente
Arch
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Nessuno


Descrizione

Lo strumento Scheda consente di creare e compilare automaticamente un foglio di calcolo con contenuti prelevati dal modello.

Nota: Questo strumento è stato riscritto in FreeCAD 0.17 e differisce dalle versioni precedenti.

Utilizzo

  1. Aprire o creare un documento di FreeCAD con alcuni oggetti
  2. Premere il pulsante Scheda
  3. Regolare le opzioni desiderate
  4. Premere OK

Flusso di lavoro

In primo luogo è necessario disporre di un modello. Ad esempio, qui c'è un documento con una coppia di oggetti. Non è necessario che siano oggetti Arch, possono di qualsiasi tipo.

Poi premere il pulsante Scheda di Arch. Si ottiene un pannello delle Azioni come questo. È piuttosto ampio, quindi può essere necessario allargarlo.

Poi si può riempire riga per riga. Ogni riga è un "query" e restituisce una riga nel foglio di calcolo. Premere il pulsante 'Aggiungi' per aggiungere una nuova riga e fare doppio clic su ciascuna cella di quella riga per inserire i valori. Il pulsante Del cancella la riga che contiene una cella selezionata, e Clear' elimina tutte le righe. I valori che è possibile mettere nelle colonne sono:

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

Currently available filters:

  • 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"