How to tell (thru API) if an object is messed up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I recently posted a question about an object that wouldn't allow for a shared parameter.
To follow up that question, I have a bigger question: How can I tell (with the API) if an object in Revit is messed up. I have this wall, that a client made, and it has everything greyed out. See the image:
I should add, not all the parameters are read-only. Two survive (Structural and Room Bounding) and are writable. This is confounding, because I was trying to make a simple subroutine that checks if the parameters are all read-only, which would assume that no new parameters could be added. Since these 2 parameters are not read only, then there must be some writable functionality to this wall. In 3D, the wall is invisible. The only way I can find it, is by using the Select by ID functionality in the UI, and when I select it, there isn't any object there (or at least is visible, maybe it's there, but in a different modality).
But while trying to do all this, I looked to see that even the "Basic Wall" Property was greyed out, which is really odd. I would assume that ANY wall constructed in Revit would be writable/changeable. Maybe I'm wrong. I'm more an API person than a UI person, so I don't know the nuances of these exceptions in Revit. Regardless, here is the major question: Is there an API way to check if an object is corrupted like this, or is there a way to tell if the default property (like Basic Wall) is locked to read-only?
I can't use try-catch. Too slow. Any ideas?