Controls handling of invalid casts when traversing Vision property paths.
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.10.0.0
| Member name | Value | Description | |
|---|---|---|---|
| Throw | 0 | Throw if we encounter an InvalidCast while traversing a property path. | |
| TrueToPath | 1 | Evaluate the path as defined by the parts of the path (including type cast nodes) | |
| TrueToObject | 2 | Allow ignoring static type information specified in the path in order to support cases where we can still successfully evaluate the path. |
When evaluating a property path, Vision will use information from the static type system that says what properties could be at a particular node and combine this with information from the runtime object instances that currently are found along the path.
Think of a path like "Tool.SearchRegion.(Circle).Radius"
If, when browsing to create this path, we looked strictly at what the type system alone says can be at that path we would lose some valuable context about what properties the user might be interested based on the object instances that are actually found along this path right now. For instance it might be harder for the user to easily select a likely property such as "Radius" because by default we'd just display the properties of IRegion, even though the instance held by SearchRegion is currently a Circle.
If, on the other hand, we are overly strict about evaluating the paths based on the object instances they were originally created with, we might lose the ability to evaluate a perfectly reasonable path because of the type of the object instance when the path was first created.
Think now of a path like "Tool.SearchRegion.(Circle).CenterX"
Imagine the user changes the SearchRegion to a Rectangle, Vision users will reasonably expect this path (and links to/from it) to still be valid (because Rectangle contains a CenterX property).