Database macros
Database macros tell Digi3D.AI which values to calculate when creating a database record.
Enter them in a database field's Default value.
When storing the record, Digi3D.AI replaces each assigned macro with its calculated value.
Supported macros:
| Macro | Description |
|---|---|
| %UID% | Stores a globally unique identifier (GUID) calculated when the record is created, including braces. For example: {F9E7E680-3CDD-4733-A8F1-22F850F8774B} |
| %UID_SIMPLE% | Stores a GUID calculated at that moment, complete with braces, for example: F9E7E680-3CDD-4733-A8F1-22F850F8774B |
| %CENTROID_TEXT% | For a polygon generated from topology, stores its centroid text. |
| %CENTROID_VALUE=[valor]% | For a polygon generated from topology, stores the value named after the equals sign from the centroid code's Values. |
| %ENTITY_CODE% | Stores the geometry's primary code. |
| %ENTITY_CODE_ID% | Stores the database record ID of the geometry's primary code. |
| %ENTITY_TEXT% | For text geometry, stores its text. |
| %ENTITY_LENGTH_2D% | Stores the geometry's perimeter in the X, Y plane. |
| %ENTITY_LENGTH_3D% | Stores the geometry's three-dimensional perimeter. |
| %ENTITY_AREA% | Stores the geometry's area. |
| %ENTITY_FIRST_VERTEX_Z% | Stores the first vertex's Z coordinate. |
| %ENTITY_FIRST_VERTEX_Z_INT% | Stores the first vertex's Z coordinate rounded to the nearest integer. |
| %ENTITY_XMIN% | Stores the geometry's minimum X coordinate. |
| %ENTITY_XMIN_TRUNC_INT% | Stores the geometry's minimum X coordinate truncated to an integer. |
| %ENTITY_XMIN_ROUND_INT% | Stores the geometry's minimum X coordinate rounded to the nearest integer. |
| %ENTITY_XMIN_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's minimum X coordinate. |
| %ENTITY_XMIN_CEIL_INT% | Stores the smallest integer not less than the geometry's minimum X coordinate. |
| %ENTITY_YMIN% | Stores the geometry's minimum Y coordinate. |
| %ENTITY_YMIN_TRUNC_INT% | Stores the geometry's minimum Y coordinate truncated to an integer. |
| %ENTITY_YMIN_ROUND_INT% | Stores the geometry's minimum Y coordinate rounded to the nearest integer. |
| %ENTITY_YMIN_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's minimum Y coordinate. |
| %ENTITY_YMIN_CEIL_INT% | Stores the smallest integer not less than the geometry's minimum Y coordinate. |
| %ENTITY_ZMIN% | Stores the geometry's minimum Z coordinate. |
| %ENTITY_ZMIN_TRUNC_INT% | Stores the geometry's minimum Z coordinate truncated to an integer. |
| %ENTITY_ZMIN_ROUND_INT% | Stores the geometry's minimum Z coordinate rounded to the nearest integer. |
| %ENTITY_ZMIN_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's minimum Z coordinate. |
| %ENTITY_ZMIN_CEIL_INT% | Stores the smallest integer not less than the geometry's minimum Z coordinate. |
| %ENTITY_XMAX% | Stores the geometry's minimum X coordinate. |
| %ENTITY_XMAX_TRUNC_INT% | Stores the geometry's maximum X coordinate truncated to an integer. |
| %ENTITY_XMAX_ROUND_INT% | Stores the geometry's maximum X coordinate rounded to the nearest integer. |
| %ENTITY_XMAX_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's maximum X coordinate. |
| %ENTITY_XMAX_CEIL_INT% | Stores the smallest integer not less than the geometry's maximum X coordinate. |
| %ENTITY_YMAX% | Stores the geometry's minimum Y coordinate. |
| %ENTITY_YMAX_TRUNC_INT% | Stores the geometry's maximum Y coordinate truncated to an integer. |
| %ENTITY_YMAX_ROUND_INT% | Stores the geometry's maximum Y coordinate rounded to the nearest integer. |
| %ENTITY_YMAX_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's maximum Y coordinate. |
| %ENTITY_YMAX_CEIL_INT% | Stores the smallest integer not less than the geometry's maximum Y coordinate. |
| %ENTITY_ZMAX% | Stores the geometry's minimum Z coordinate. |
| %ENTITY_ZMAX_TRUNC_INT% | Stores the geometry's maximum Z coordinate truncated to an integer. |
| %ENTITY_ZMAX_ROUND_INT% | Stores the geometry's maximum Z coordinate rounded to the nearest integer. |
| %ENTITY_ZMAX_FLOOR_INT% | Stores the greatest integer not exceeding the geometry's maximum Z coordinate. |
| %ENTITY_ZMAX_CEIL_INT% | Stores the smallest integer not less than the geometry's maximum Z coordinate. |
| %ENTITY_WIDTH% | Stores geometry width (maximum X minus minimum X). |
| %ENTITY_HEIGHT% | Stores geometry height (maximum Y minus minimum Y). |
| %ENTITY_LENGTH% | Stores geometry length (maximum Z minus minimum Z). |
| %ENTITY_ROTATION_TRIGONOMETRIC_SEXAGESIMAL% | Stores the geometry's trigonometric rotation in sexagesimal degrees. |
| %ENTITY_ROTATION_TRIGONOMETRIC_CENTESIMAL% | Stores the geometry's trigonometric rotation in centesimal degrees. |
| %ENTITY_ROTATION_TRIGONOMETRIC_RADIAN% | Stores the geometry's trigonometric rotation in radians. |
| %ENTITY_ROTATION_AZIMUTAL_SEXAGESIMAL% | Stores the geometry's azimuthal rotation in sexagesimal degrees. |
| %ENTITY_ROTATION_AZIMUTAL_CENTESIMAL% | Stores the geometry's azimuthal rotation in centesimal degrees. |
| %ENTITY_ROTATION_AZIMUTAL_RADIAN% | Stores the geometry's azimuthal rotation in radians. |
| %MACRO% | Expands variables to the right of %MACRO%: $(NombreUsuario), $(NombreOrdenador), $(Fecha), $(Dia), $(Mes), $(Año), $(Escritorio), $(Temp) and other system folders, using English or Spanish names.Example: %MACRO%Digitalizado por $(NombreUsuario) |
| %DATE% | Current date. |
| %DAY% | Current day of the month. |
| %MONTH% | Current month of the year. |
| %YEAR% | Current year. |
| %TIME% | Current time, including hours, minutes and seconds. |
| %HOUR% | Current hour. |
| %MINUTE% | Current minute. |
| %SECOND% | Current second. |
| %CODE_VALUE=[valor]% | Retrieves "valor" from the value dictionary associated with the geometry's code. Example: if the geometry has code 020102, whose Values field contains tipo_de_suelo=superficial, use %CODE_VALUE=tipo_de_suelo% as the database field default to store superficial. |
| %ENTITY_ATTRIBUTE=[nombre]% | Retrieves a value from the geometry attribute dictionary. Example: for attribute Carriles=3, use %ENTITY_ATTRIBUTE=Carriles% as the database field default to store 3. |