Page 1 of 1

HierarchySubset functions don't work

Posted: Tue Jan 30, 2018 6:02 pm
by lotsaram
From our testing the new HierarchySubset functions don't work as advertised in PA 2.0.3 (in fact don't work at all)

For example
HierarchySubsetElementGetIndex(sDim, sHier, sSub, sEle, nIdx);
Always returns the value given by the starting index nIdx regardless of the element name passed in.
e.g.
HierarchySubsetElementGetIndex(sDim, sHier, sSub, sEle, 1);
will always return a value of 1 and NOT the index position of the element sEle in the subset sSub.

And this function's twin also has issues
HierarchySubsetGetElementName(Dim, sHier, sSub, nIdx);
Will return an index out of range error rather than the element name when a valid subset index value is passed.

For anyone with a semi- large or sophisticated model in production where there is any evaluation of subsets and iterating subset members this is pretty much a "no go" for upgrading from 10.2.2 to PA.

Can anyone with access to PA 2.0.4 confirm if this bug is fixed in the latest release?

Re: HierarchySubset functions don't work

Posted: Wed Feb 07, 2018 12:02 pm
by Steve Rowe
Did you try the old version of the function but using dimname:hiername for the dimension argument?

Re: HierarchySubset functions don't work

Posted: Wed Feb 07, 2018 3:34 pm
by lotsaram
Steve Rowe wrote: Wed Feb 07, 2018 12:02 pm Did you try the old version of the function but using dimname:hiername for the dimension argument?
Yes. But this isn't accepted and throws a dimension doesn't exist error.