3 Replies Latest reply on Sep 19, 2011 7:39 PM by cmanhard

    AFElement.PrimaryPathFromDatabase Property


      When I view an AFElement in dev environment I can see a PrimaryPathFromDatabase property,  but that property and/or method is not exposed in the object model.   Wondering How I can get at that property

        • Re: AFElement.PrimaryPathFromDatabase Property

          myElement.GetPath(myElement.Database) will produce the same result with one notable exception:


          If the element, or any of the elements in the primary path chain are also defined at the database level, but that reference is not the primary, GetPath will short-circuit to this shorter path.


          For example, Consider database with root Element E1, which has child E2 which has child E3.  Adding E2 to the database root, then calling the GetPath method on E3 relative to the database would result in the shortened path "E2\E3", instead of the path "E1\E2\E3".  Both paths are valid paths from the database to the same element.  If this distinction is not important to your app, or not possible to occur within your database, you can use the GetPath method.