Cross-Database References
- Last UpdatedApr 27, 2023
- 2 minute read
The functionality described in this section exists in order to minimize problems of cross-database referencing when Design databases are deleted and rebuilt from macros.
All Draw elements with DDNM, IDLN, or IDNM reference attributes also have ‘system’ text attributes DDNX, IDLX, and IDNX respectively. These three attributes can be queried but not set.
Draw always uses the DDNM, IDLN and IDNM attributes; values in DDNX, IDLX and IDNX are ignored. Setting a DDNM, IDLN or IDNM attribute also causes the associated ‘system’ text attribute (for example, DDNX, IDLX and IDNX respectively) to be set to the name of the Design element referenced, so long as it is named.
The UPDATE commands exist to aid updating of a Draw database following rebuilding of an associated Design database:
UPDATE element_identifier REFS
UPDATE element_identifier NAMES
The first of these changes the DDNM, IDLN, and IDNM attributes of element_identifier, and all member elements in the Draw database hierarchy, to match the values obtained from the associated text attributes. If a Design database is deleted and rebuilt then, so long as those elements referenced from Draw databases are all named, references in Draw databases can easily be kept up to date.
The second command changes the DDNX, IDLX, and IDNX attributes to match the values obtained from the associated reference attributes. The option has been included primarily to allow a full set of these new text attributes to be generated for existing Draw databases. In each case no change occurs if a value cannot be obtained from the name/reference encoding/decoding process. The element_identifier can be omitted, in which case the current element is assumed.
During the updating process, warning messages are output whenever an attribute is changed or when Draw attempts to change an attribute but is unable to generate the required name or reference to do so. These messages is of the form:
VSEC 2 of /VIEW2: IDLN attribute updated to /ZONE1.PIPES
GLAB 1 of /D1/S1/V1/LAYER1: unable to update DDNX
attribute