Check below the assemblers used for Aggregates or directly access the content you have doubts:
- %ModuleID.IDAaggregate.DesiredInformation%
- %CHECKED(IDmódulo. IDAgregado)% assembler
- $HASCHILDREN(ENTITY_ID)$ assembler
!Find Assembler
The !Find assembler is used to search for information about a specific group or entity. It is generally used in the reference assembly of Format Templates, but it can be used in several other functions in the customization of Promob.
Find can only be used to search for references when this search refers to one of the item's aggregates.
To search for information for a particular reference in a module aggregate:
!find(entityid,id_entity).$REFERENCE(information)$!
To search for information for a particular reference in a group aggregate:
!find(groupid,id_group).$REFERENCE(information)$!
IMPORTANT: For that command !find(groupid) can locate the information in the Model Groups Format, it is essential that this group be configured as a group aggregate. Use the !find(groupid) to search information in Model Groups Format that contains only individual models as module aggregates can compromise the reliability of the search, resulting in missing information or inaccurate answers.
EXAMPLE 1:
!find(groupid,POR_MOD_INF*).$REFERENCE(FORMAT)$!
In this example, the search will be for the FORMAT reference within any item (*) of the group (groupid) POR_MOD_FOR *.
IMPORTANT: The * used at the end of the ID is for the reference to search in all groups that have the ID POR_MOD_FOR even if it contains some information after the FOR such as the ID POR_MOD_FOR_INF, this makes it easier when looking for the IDs in the format templates door.
EXAMPLE 2:
!find(entityid,POR_COZ_INF).$D$!
In this example, the search will be done by the depth ($ D $) of the entity (entityid) POR_COZ_INF.
IMPORTANT: For the result to return, the aggregate in question must be active.
!FindAt Assembler
The assembler !findAt is used to search for information on all occurrences of an item in a list and select one based on an index. It is ideal for locating the finishes of a specific child item within a parent item.
Just like the assembler !find!, the !findAt can be used in various contexts to access different variables and references.
How it works
The structure of the assembler includes the following parameters:
- entityid: identifies the base entity of the search.
- Entity ID: corresponds to the item being searched.
- Index: indicates the position of the item in the list (starting from 0).
- Sorting (optional): defines the order of the returned items, which can be ascending (ASC) or descending (DESC).
Example 1 - Search for information on multiple aggregates with the same ID
- The references DEPTH_LAT_1 and DEPTH_LAT_2 are used.
- A module has two sides, left and right, with the same ID: com_coz_lat_lat.
- The depth reference varies according to the side of the lateral.
In this case, the assembler !findAt can be used to search for the specific information of each side:
- Using index 0 returns the depth of the left side: 800.
- With index 1, it returns the depth of the right side: 600.
This data can be checked in the budget XML.
Example 2 - Search for information with sorting
Using the same base as the previous example, it is possible to apply sorting to the results:
- If it is necessary for the reference DEPTH_LAT_1 to always bring the lowest value and DEPTH_LAT_2 the highest, ascending sorting (ASC) can be applied.
In this scenario:
- Index 0 returns the depth of the side with the lowest value: 600.
- Index 1 returns the depth of the side with the highest value: 800.
The visualization of these results can also be checked in the budget XML.
!FindAndJoin Assembler
The !FindAndJoin assembler is used to search for information from all repetitions of the item and sum up the responses. That is, it is used to fetch the finishes of all child items of the parent item. Just like the Find! Assembler, with it, it is possible to use it in different places and search for different variables and references.
EXAMPLE:
To register a door with two panels of different types of finishes:
1. Reference PANELS with the value !findAndJoin(groupid,group_id,-).#DESCRIPTION#!
NOTE: The separator used in the assembler is the hyphen ( - )
2. group_id as panel group ID;
3. Description of the door (parent item) searches the PANELS reference;
4. Each Panel in the panel group has the description Panel #POSITION# @color_model@;
5. Door with 2 panels, wich, the panel in position 1 will be Black and the panel in position 2 will be White, the name of the door in the 3D space will be: Panel 2 White - Panel 1 Black.
NOTE: It is possible to indicate instead of groupid value, entityid value, and entity_ID when there is no item group. Below are images in practice:
In the Traverse Function of this door, only one module is set, so the assembler is !findAndjoin(entityid.'. If it were a group of glasses, it would look for the 'findAndjoin(groupid.'
Still in this example, in the reference of the parent item, the assembler searched the entity, the entity id and the description of the child items of the door panel (image above), getting: !findAndjoin(entityid,rom_r_mov_co_pai_p_mon_ocu_int_vid_s,-).#DESCRIPTION# !
In the 3D space, when selecting the door with two types of finish, it is possible to view the description of the two types of finish present on it.
%IDmodule.IDAggregate.DesiredInformation% Assembler
In addition to Find, it is possible to use the assembler below to search for aggregate information. This assembler should only be used on the item that has the item mentioned in the aggregate formula.
%IDmodule.IDAggregate.DesiredInformation%
Example:
%POR_MOD_FOR_INF.Model.$REFERENCE(FORMAT)%
In the example, the information sought will be the FORMAT reference in the item or group POR_MOD_FOR_INF.
The desired information may be an assembler (not related to the environment) mentioned in the table above.
EXAMPLE:
%IDmodule.IDAggregate.$EntityID$% assembler
Returns the name (abbreviation) of the aggregate.
%IDmodule.IDAggregate.$Width$% assembler
Returns the width of the aggregate.
%IDmodule.IDAggregate.$Reference(COMPLETE)$% assembler
Returns the COMPLETE reference of the aggregate.
IMPORTANT: For the result to return, the aggregate in question must be active.
%CHECKED(IDmodule. IDAggregate)% Assembler
The CHECKED assembler checks whether the aggregate is checked. This function is useful when the reference is different depending on the aggregate that is active or in visibility conditions, where a specific aggregate will only be visible if aggregate X is active.
%CHECKED(IDmodule. IDAggregate)% == ‘TRUE’
$HASCHILDREN(ENTITY_ID)$ assembler
Returns true / false, if it contains the child entity;