MaxStrueverWipro

How to get child elements that are weak references

Discussion created by MaxStrueverWipro on Jul 8, 2013
Latest reply on Jul 15, 2013 by mhamel

Hi, 

 

I have an AF db with many Weak References. The weak reference of one element to another basically acts as a shortcut to find the referenced element, and because the relationship can be n:n, I chose weak references (let me know if this is not a good use of weak references).

 

2318.Untitled.png

 

I am not able to see the children elements that are weakly referenced via the AFSDK.

 

 

 
 AFElement plantEl = Master.AFdb.Elements["Plant ID 0"];
plantEl.HasChildren; //shows up as 'true'
plantEl.Elements.Count;  //shows up as 0, so I am not able to get the referenced elements 

 the .Elements property seems to only return parent-child referenced child elements, and not weak reference child elements. 

 

What am I missing here? How can I access weakly referenced elements?

 

using afsdk 2.4

Outcomes