Item Type get Index of Array

I want to get the current index of an item in an Array.

Use: I have an ItemType representing Signs on a Sign Post.  A sign post can contain multiple signs, called an assembly.  Each post has an AssemblyID (ie 1).  Each sign has a SignID (ie A).  So the individual signs will be labeled as 1A, 1B, 2A, 2B, 2C, etc...

Below is a simplified example: I have an ItemType with a Property Definition that is an array of Property Types.

I can see in the properties window that MSCE can access the index (Assembly[0] and Assembly[1]) but I can't seem to find any documentation or method to do this via ItemTypes.

In the above example, the SignID is just a picklist.  What I want to do, is access the Index of the Array, and associate to a letter (ie 0 = A, 1 = B, etc).

I can access the total count of the array via the following expression: this.GetItem("DgnCustomItemTypes_TrafficTest:Signz")["Assembly"].count

I tried this randomly and it worked.  I cannot seem to find documentation that the .count function exists.  There is no context / tooltip / auto complete help on this.  I have tried as many other options that I can think of, but i'm just stabbing around in the dark (ie .ID, .name, .index, .instance, etc...).

I've checked the list of examples (https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v21/en/GUID-98C96A16-A9BD-4916-8233-4053B020596C.html) but that didn't help.

Does anyone know of a way to do this, or more importantly, know of a location where I can see all the functions/properties expressions as I'm sure there will be more instances of this.

Thanks.

Parents Reply Children
No Data