Best practices for creating and editing components and TGMLs

When creating components and TGMLs, consider implementing the following best practices:

  • Avoid combining reference and non-reference instances in the TGML or TGML component document. This can cause complexities in the component hierarchy.
  • Use reference components when creating custom components, as you can use the Reference Definition Updater to update the component and all its instances in TGML and components at the same time. This Reference Definition Updater will not update non-reference components.
  • Avoid creating cyclic reference dependencies for custom components. This occurs when one custom component is used to create another, which then refers back to the initial custom component. Cyclic referencing is not supported by the tool.
  • Avoid importing a TGML as a layer within another TGML if both TGMLs use referenced components. Doing so can lead to inconsistent results when adding, moving, or deleting components.

When editing or working with components and TGMLs, consider implementing the following best practices:

  • When working with components, avoid making changes at the component definition level directly in the Object Browser. If customization is required, it is best to duplicate the component and make changes to the duplicate.
  • When editing a TGML component, ensure that only one TGML component file is open.
  • When editing a TGML component, ensure that any other TGML component files are saved.
  • Avoid deleting or editing any properties from components' Definitions (TGML > Definitions > Component). If a component property, such as ID, is mistakenly removed, you can recover it by re-entering the property again using the same syntax as was used before the removal.