Analytical Model IsEnabled Method and Parameter

I recently mentioned the changes in accessing the analytical model in the Revit Structure 2012 API.

We just discovered a little issue and an effective workaround related to the AnalyticalModel IsEnabled method, which reports whether the analytical model is currently enabled or disabled. Right now, it does not do that, but throws an exception for all members except walls. The Enable and CanDisable methods have similar problems. This will soon be resolved. Meanwhile, here is a simple workaround to avoid the issue by accessing the underlying data directly:

The correct "enable" parameter is on the physical element, not its analytical model, and accessible through the built-in parameter STRUCTURAL_ANALYTICAL_MODEL. To enable the analytical model, e.g. for a wall, simply set STRUCTURAL_ANALYTICAL_MODEL to true on the wall element, not on the analytical wall element.