I have been playing with capturing the analytical models from the objects in Revit that do have Analytical model objects. I know there is a lot of discover about the SDK when it comes to analytical models. Perhaps we can all research that.
Here is another thread about openings: Create Window Family with Opening
Does that help?