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.


Comments

7 responses to “Analytical Model IsEnabled Method and Parameter”

  1. Dear Jeremy:
    I want to save a .prj file(this is my file format) as an external reference file when saving revit file(.rvt etc.),I find one class named ExternalFileReference may be useful.But I don’t know how to use it,there is no sample I can find.Could you give me some helps as soon as possible?Thanks very much!!
    Thanks.
    Guming.

  2. Dear Jeremy:
    I have another questin,when I zoom the current view,which parameter is changed,the parameter can help me to know how times the model is zoomed in or zoomed out?Thanks very much!!
    Thanks.
    Guming.

  3. Dear Jeremy:
    I have not solved the questions about the externalfile and zoom yet,another question is coming,please help me!help!The question is that I can’t find mousemove message in Revit api,is there any ideas to use mousemove in Revit.So many questions I can’t solve,please help me as soon as possible.
    Thanks very much!
    Guming.

  4. Dear Guming,
    Sorry that I took so long to get back to you.
    Have you had a look at this blog post?
    http://thebuildingcoder.typepad.com/blog/2011/05/list-linked-files-and-transmissiondata.html
    In addition, Mike Caruso started a thread of comments on that post which includes some sample code on using the WriteTransmissionData method.
    I hope that helps. Please let me know!
    Thank you!
    Cheers, Jeremy.

  5. Dear Guming,
    I wanted to do this anyway, and now your comment prompted me to finally go ahead and promote the comment I pointed to above to a blog post of its own:
    http://thebuildingcoder.typepad.com/blog/2011/10/using-the-writetransmissiondata-method.html
    Thank you!
    Cheers, Jeremy.

  6. Dear Guming,
    The Revit API provides no information at all about mouse movement. You will have to use the native Windows API or the .NET framework libraries for that.
    Cheers, Jeremy.

Leave a Reply to gumingCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading