Operations on tables

From Dynamo
Jump to navigation Jump to search

Extraction of subtables

The basic command to choose elements inside a table is dtgrep

Selecting sets of tags

In order to create a subtable with a predefined set of tags, use the flagtags:

tr = dtgrep(t,'tags',[5,9,11:15]);

would explore the table t and create the output table tr, including only the tags 5,9, 11:15.

Excluding sets of tags

In order to exclude a set of tags, use the flagexclude:

tr = dtgrep(t,'exclude',[5,9,11:15]);

would explore the table t and create the output table tr, excluding any rows with tags 5,9, 11:15.

Selecting subtables by property

The flag tr (for table restriction) allows operating restrictions on a table.

By property name

If you know the shortname of the property, you can use directly:

<> >> tRestricted = dtgrep(t,'tr','0.3<cc<0.5'); 
<> operator 0.3<cc<0.5 (#1) 100 before, 16 after

By column number

<> >> tRestricted= dtgrep(t,'tr','0.3<&10<0.5'); 
<> operator 0.3<cc<0.5 (#1) 100 before, 16 after


Geometrical operations on tables

Rigid body operations can be applied onto tables with dynamo_rigid_apply or Template:Dynamo table rotate