Message 1 of 3
Incorrect/unexpected isValid results from certain API classes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I see this behavior both with the C++ and Python API; certain objects will return false for isValid immediately after creation, e.g. the camera returned from Viewport (app.activeViewport.camera.isValid == False), the ParameterList returned from a design (app.activeProduct.allParameters.isValid == False, when a design is loaded). These objects are perfectly fine to use, except calling isValid will return false.
Is this expected, and there are only certain objects for which we should rely on isValid? Or is this a bug, and the expectation is that isValid will return true for all valid objects that extend Base?