Navigating an Object Structure Using Query, Access, and Find

This topic shows you how to navigate an object structure using the dedicated EKL methods.

Most objects in EKL have an external view (attributes, children) which allows navigation through standard methods:
MethodCommentExample
Feature->Query(iType: String, iCondition : String) : ListReturns a list of objects located under the feature it is called on. The objects must match the type and condition given in input.

To retrieve all holes under a PartBody with a diameter superior to 10mm:

PartBody->Query("Hole","x.Diameter>10mm")

Feature->Find(iType: String, iCondition : String) : FeatureSame as Query, but only returns the first object matching the type and condition.-
Feature->Access(iType: String, iPath : String) : FeatureAllows to retrieve an element using a Path. Paths are Strings which can be created using the CreatePathString method.-


In the above data model, starting from Part, if you want to retrieve Point.2 you can use the Access method as follows: Part->Access("Point", "Geometrical Set.1\Geometrical Set.2\Point.2")