Elements in Area api?

Elements in Area api?

Anonymous
Not applicable
953 Views
2 Replies
Message 1 of 3

Elements in Area api?

Anonymous
Not applicable

Hi everyone,

I already faced this problem in Dynamo, but just wanted to check if there's a tidier way to achieve it with API....

Is there a way to make the objects "aware" of the area the're in ?

Selecting the proper area plan type, how can I schedule a set of instances by their bounding area?

I know it's pretty easy for rooms, I don't get why revit has a similar logic with areas as well...

 

Thanks everybody for the help!

0 Likes
Accepted solutions (1)
954 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Carmine,

 

Thank you for your query.

 

I hope you know that Dynamo interacts directly with the Revit API and provides no Revit-related functionality beyond what is provided by the native API.

 

Therefore, everything that can be done in Dynamo can be (is!) done directly via the Revit API.

 

Vice versa, if something is available in the Revit API, it is also available in Dynamo.

 

I suggest you check your Dynamo code and research exactly how the room related functionality that you refer to is implemented.

 

For instance, it may be using the Room.IsPointInRoom method:

 

http://www.revitapidocs.com/2018/96e29ddf-d6dc-0c40-b036-035c5001b996.htm

 

Unfortunately, the Area class does not seem to provide a corresponding method.

 

If you need to determine whether a given element lies in an area, the Revit API provides lots of ways to achieve that.

 

However, you also ask, 'how can I schedule a set of instances by their bounding area?'

 

That seems to be a completely different aspect of the question to me, more UI related, that I cannot really comment on.

 

I hope this helps.

 

Check it out and let us know what you find, please.

 

Thank you!

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

Anonymous
Not applicable

Hi Jeremy,

thank you for the answer, it's been very helpful for my problem.

 

Which of the class commands can help with my task? I'm newbie with API programming and I don't think I understand some of classes what they actually do.

 

Regarding your "schedule" reply.. I know it's not API related, I was only saying that to deal with a problem like this forces me to relate Area with elements' topology to be solved..

I still don't get why Rooms can be content aware and Areas cannot be (given an offset value). Is it so difficult to process for Revit?

0 Likes