You can only get to attributes of components contained within the same top level component. Within that context, you can access any attribute with: ComponentName!attributeName
If you leave out ComponentName!, you are referencing an attribute in the same component as the reference.
There is 1 other, generic reference available: parent!attributeName which references attributeName in the component which is the immediate parent of the referencing component.
So, to get to an attribute of a GrandParent, you have two choices:
Just use the name of the grandparent: GrandParentName!attributeName or
Add a custom attribute to the PARENT. In that attribute, use parent!attributeNameinGrandParent, then in your attribute, again use the parent!attributeNameinParent
That would be nice, but I don’t think it currently exists.
What would be a real world use case? I’m guessing a small fraction of DCs even have 3 levels, and at that point, they’re fairly complex components where the designer must already keep careful track of sub component names.
What was driving this was the desire to have global variables for the entire project. I would like to have a global variable with length and height for the entire project. Is there a way to have global variables?