0 Replies Latest reply on Jun 3, 2016 1:41 PM by John Alexander

    What is the deal with Entity::FindAttribute?

    John Alexander

      I'm starting to explore methods of assigning and reading attributes in entities for marking surface finishes during the design phase.

      In my exploration, I came across the FindAttributes method which takes the target AttributeDef as an argument along with some ambiguous integer. At first glance, I thought maybe this would work like getters to other list-type data where you can specify which instance you want and (somewhere in the API) there is a way of figuring out the total count to iterate over.

      Then I took a peek at the VBA example for finding attributes:

          While swAtt Is Nothing And i < 300

              Set swAtt = swEnt.FindAttribute(swAttDef, i)

              i = i + 1



      What the junk is the meaning of that iterator? Are there any guarantees that the "correct" value is less than 300?