Couple of questions. Can you post an example of the element path string you are passing to this method. Second, is it possible that the elements not resolving are checked out by another user/process at the time that this method call is made? The SDK documentation does indicate that the elements must be checked in first before this method can resolve the object paths.
May I ask you which version AF Server you're using?
In case of AF 188.8.131.5243, there's a work item (37343) which in some cases, the Server would fail to find elements using AFElement.FindElementsByPath due to timing issues with path cache editing.
The AF Server in use is Version 184.108.40.20666; Database: 220.127.116.1166
The PI Version listed in PI SMT is 3.4.395.72 for all subsystems in both memory and on disk.
The AFSDK version in use is 18.104.22.16838.
I wonder if we should update the AFSDK Version in use... where does one find these work items you mentioned?
Thanks in advance,
There's not much information ragarding to any issues with the AF SDK version, however, yes, upgrading AFSDK can be a thing you can try. (the latest version is 22.214.171.12449)
Unfortunately, the work item is internal only for OSIsoft.
Using our internal tools, I have found a similar Work Item (108254). Although the description is the same of WI 37343, the issue was resolved still in 2.6.1 (probably a patch). Anyway, upgrading to PI AF SDK 2.7 or 2.8 shall solve your issue.
Let us know how it goes!
It's likely that the issue you're seeing is related with path cache. You are using AF SDK 2.6.1 and I'm certain that we have fixed several issues with path cache. As Marcos and Joon already suggested, I would recommend that you upgrade your AF Client to the latest version.