MEP Space class Room property returns null with linked models

MEP Space class Room property returns null with linked models

grahamcook
Advocate Advocate
1,515 Views
3 Replies
Message 1 of 4

MEP Space class Room property returns null with linked models

grahamcook
Advocate
Advocate

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.

 

0 Likes
1,516 Views
3 Replies
Replies (3)
Message 2 of 4

grahamcook
Advocate
Advocate

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.

0 Likes
Message 3 of 4

Revitalizer
Advisor
Advisor

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
Autodesk
Autodesk

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

0 Likes