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: 

MEP Space class Room property returns null with linked models

3 REPLIES 3
Reply
Message 1 of 4
grahamcook
1044 Views, 3 Replies

MEP Space class Room property returns null with linked models

All of our projects use a separate MEP model that has the Architectural model linked.  We need to copy through and manage some of the custom room parameters stored in the Architectural model for which I'm writing an Addin.

The first task would be to establish what room a space is associated with for which the Space class has a Room property.  This however returns null if the room is located in a linked model.  So I need to establish another more cumbersome method of matching up a Space with a Room, maybe comparing their geometry's?  Any suggestions would be greatly appreciated.

 

3 REPLIES 3
Message 2 of 4
grahamcook
in reply to: grahamcook

Forgot to mention that the company i'm working with don't use the built in room number parameter, they use their own.  So i wouldn't be able to match the room numbers.

Message 3 of 4
Revitalizer
in reply to: grahamcook

Hi grahamcook,

 

What about Document.GetRoomAtPoint((space.location as LocationPoint).Point) ?

Or Document.GetSpaceAtPoint((room.location as LocationPoint).Point) ?

Hope it helps with linked files...

 

 

Cheers,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 4
jeremytammik
in reply to: Revitalizer

Yes, I would suggest using the methods mentioned by Revitalizer, *in the linked document*.

 

So you may have to translate the coordinate values from the container project to the linked project.



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

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