Using Array of objects (29) in custom components

Tekla Structures
Not version-specific
Tekla Structures
Environment
Not environment-specific

The use of Array of objects (29) component in custom components has 2 limitations:

Image
AA.png

  1. There is always 1 extra array of the original objects.
  2. When you modify the original object, the arrays do not change.

There is a workaround for both of these limitations.

Show only 1 object without an array

The Array of objects (29) component always creates 1 array. If you want to show only 1 object in your custom component, you can use this workaround.
  1. Add a new parameter and create an If-condition in the formula that outputs 1 when there are more than 1 object. For example =if (N_A>1) then 1 else 0 endif
    Image
    Attribute_A.png
  2. Go to the custom component browser and search for the Creation property of the Array of objects (29) component.
  3. Add the equation to the Creation property: Creation = Parameter Name.
    Image
    CC-Editor_A.png

Automatically updated array

My custom component only changes the original objects and not the objects in the array.
When you modify a setting of the custom component property dialog that affects the parts that you want to array but does not change a setting that affects the array macro itself, the original objects are affected by the change and not the arrayed objects.

A simple method to make the Array of objects (29) component update automatically is to add the value of the “TIME” attribute to the get_menu property of the macro. This will refresh the macro every time something is modified.
  1. Make a new parameter within the formula the template attribute string =fTpl("TIME", "object GUID"), and replace "object GUID" with the Guid of an original object. Set value type to Text and visibility to Hide. (More Information, see TUA-Page
    Image
    Attribute.png
  2. Go to the custom component browser and search for the General properties of the Array of objects (29) component.
  3. Add the equation to the get_menu property: get_menu = Parameter Name.
    Image
    CC-Editor.png

 
Was this helpful?