Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to determine the Project Discipline?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
CoderBoy
744 Views, 5 Replies

How to determine the Project Discipline?

Is there a reasonably consistent way for a publicly purchaseable app (not just one for internal use), using the Revit API, to determine the discipline (e.g. Architecture, MEP, Structural) of a project?

 

I don't mean to determine whether or not these software features are avaialable to the user in the software (e.g. MEP buttons are available to the user), but rather that "this project is a structural project," for example.

 

Thanks for any thoughts.

 

 

5 REPLIES 5
Message 2 of 6
R.van.den.Bor
in reply to: CoderBoy

I don't think you can since the discipline is a view property. SO what you can do is ask a view to which discipline it belongs (but it doesn;t say anything about the project).
Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
Message 3 of 6
CoderBoy
in reply to: CoderBoy

Well, given the lack of any more ideas, I guess I'll have to write this off as yet another "Unfortunately, the Revit API can't do that."

 

Bummer.

 

 

 

 

Message 4 of 6
arnostlobel
in reply to: CoderBoy

Well, well, well 😉

 

There is no API, for there is no inherent approach in Revit to do so either. A “Discipline” is not a property of a project (model), because a project of any discipline can be in theory created in Revit of any other discipline. It is not uncommon to take a model that was originally created in Revit Architecture, open in in Revit Structure to perform analysis and modify structural properties as needed, and after saving the model then open it again in Revit MEP to add ducks and pipes and such. Now, what should the model say its Discipline is?

 

A Discipline of a model really is nothing else than the template the model started with. It does not even have to be one of the template Revit is installed with. It’s perfectly reasonable for users to create their own templates which may be any combination of families and elements from any Revit discipline.

 

As there is no clear and perfectly accurate way to determine a project’s discipline, it can still be guessed and that can be done via the API, I suppose. I assume one may iterate through families currently present in a model and based on what kinds of families are find then take an educated guess on what the dominant discipline of the model may be. However, such an application should be written to also determine a model as “multi-discipline.”

 

Thank you

 

Arnošt Löbel

Sr. Principal Engineer

Autodesk, Revit R&D

Arnošt Löbel
Message 5 of 6
CoderBoy
in reply to: arnostlobel

Hi Arnošt.

 

Thank you very much for helping us understand how this works.  As developers, we're not always aware of the ins and outs of how users use Revit and how they can change what an original intent was.

 

When a customer says to us "Report whether this is an Architectural, Stuctural or MEP project" and we see there are templates available for these types of projects, it was only natural for us to presume there was a way to tell what template was used to start a project, which may have been enough in this case.  But even if that could be detected, if someone started with a different template than what the project turned into, we'd actually wind up reporting bad information, which is not good either.

 

Thanks again for clearing this up.  

 

 

Message 6 of 6
arnostlobel
in reply to: CoderBoy


@CoderBoy wrote:

...As developers, we're not always aware of the ins and outs of how users use Revit ... 


You can say that again, CoderBoy. Welcome to my world! 🙂

 

I am glad I coudl shade some light on the problem. We prefectly well understand that not everything can be comprehended from documentation alone (assuming documentation is even available for a topic), particularly in such a complex software like Revit. That is why we have forums like this one.

 

Good luck with your applications

Arnošt Löbel

Arnošt Löbel

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community