0

I'm writing some code to search the AOT for certain objects and just doing an Extended Data Type search isn't working as expected. I created, in the USR layer, an EDT called "Alex" with an EnumType of "SysDimension". It can't find it in the AOT, but it can find others.

static void Job6(Args _args)
{
    #AOT
    TreeNodeIterator    treeNodeIterator;
    TreeNode            treeNode;
    SysDictEnum         sysDictEnum;
    ;

    treeNodeIterator    = TreeNode::findNode(#ExtendedDataTypesPath).AOTiterator();
    treeNode            = treeNodeIterator.next();
    while (treeNode)
    {
        sysDictEnum         = new SysDictEnum(treeNode.applObjectId());

        if (sysDictEnum)
        {
            if (sysDictEnum.name() == "Alex")
                info("Found Alex"); // WHY ISN'T THIS FOUND?

            if (sysDictEnum.name() == "ABCModel")
                info("Found ABCModel"); // THIS IS OUTPUT
        }

        treeNode = treeNodeIterator.next();
    }

    info("Done");
}
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71

1 Answers1

0

Ah I feel stupid. I was iterating over the Extended Data Types but using sysDictEnum instead of sysDictType, which is for EDTs. Explains my confusing results.

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
  • It can happen to the best of us... and I think it just did! ;D – Skaue Jan 18 '13 at 10:28
  • I like how it makes me wait 2 days before accepting an answer so I have to wallow in the shame... – Alex Kwitny Jan 18 '13 at 16:00
  • Hahahaha.... This sorts of chats have nothing to do with stackoverflow, but I can't restrain myself. Thanks for sharing both question, solution and a good laugh! – Skaue Jan 19 '13 at 13:54