I ran into this weird behavior where if I expand a Revit MEP model into memory using:
mepDoc = activeDoc.Application.OpenDocumentFile(modelPath, openOptions);
and then try to query its Spaces for corresponding room properties like so:
foreach(Space s in allSpaces) { string sName = s.get_Parameter(BuiltInParameter.SPACE_ASSOC_ROOM_NAME).AsString(); string sNumber = s.get_Parameter(BuiltInParameter.SPACE_ASSOC_ROOM_NUMBER).AsString();
it will always return "Unoccupied" for both values. However, when I query model elements using Revit Lookup Tool i am clearly seeing a proper room name and number displayed there.
Is there a limitation to using OpenDocumentFile() method that prevents this type of query? Does anyone has better idea for doing this?
Thank you,
Konrad
I ran into this weird behavior where if I expand a Revit MEP model into memory using:
mepDoc = activeDoc.Application.OpenDocumentFile(modelPath, openOptions);
and then try to query its Spaces for corresponding room properties like so:
foreach(Space s in allSpaces) { string sName = s.get_Parameter(BuiltInParameter.SPACE_ASSOC_ROOM_NAME).AsString(); string sNumber = s.get_Parameter(BuiltInParameter.SPACE_ASSOC_ROOM_NUMBER).AsString();
it will always return "Unoccupied" for both values. However, when I query model elements using Revit Lookup Tool i am clearly seeing a proper room name and number displayed there.
Is there a limitation to using OpenDocumentFile() method that prevents this type of query? Does anyone has better idea for doing this?
Thank you,
Konrad
Hi,
what about doc.GetRoomAtPoint(space.Location) ?
Revitalizer
Hi,
what about doc.GetRoomAtPoint(space.Location) ?
Revitalizer
Revitalizer,
I saw your previous post on a similar issue. Yes, that's what i used in the meantime, but i wanted to raise the issue here for the Dev team. It would be nice if they could enable this feature (if that's even the issue). Thank you for the suggestion.
Revitalizer,
I saw your previous post on a similar issue. Yes, that's what i used in the meantime, but i wanted to raise the issue here for the Dev team. It would be nice if they could enable this feature (if that's even the issue). Thank you for the suggestion.
Remy,
Phases are not an issue here. Thank you for the suggestion though.
Remy,
Phases are not an issue here. Thank you for the suggestion though.
Hi Konrad,
yes, it's better to report it to the Autodesk people than just live with a bug.
On the other side, it may be that you wait for years before a bug has been fixed.
By the way, I'm just diving into Dynamo, and I really like your contributions.
Thank you this way.
Revitalizer
Hi Konrad,
yes, it's better to report it to the Autodesk people than just live with a bug.
On the other side, it may be that you wait for years before a bug has been fixed.
By the way, I'm just diving into Dynamo, and I really like your contributions.
Thank you this way.
Revitalizer
Here are the two files that I was briefly testing this on.
Here are the two files that I was briefly testing this on.
Aaron,
I wanted to get the Space's Associated Room Name and Number. What you are suggesting would give me a Name and Number of the Space itself. I didn't want that.
Can you please log this is a bug, if indeed you can confirm that for some unexplained reason those two return invalid values?
Thank you!
Aaron,
I wanted to get the Space's Associated Room Name and Number. What you are suggesting would give me a Name and Number of the Space itself. I didn't want that.
Can you please log this is a bug, if indeed you can confirm that for some unexplained reason those two return invalid values?
Thank you!
There are some extra rooms that are not placed and those will return Unoccupied. I was referring to the ones that are properly placed and bounded, yet still return Null or Unoccupied. Can you see that?
There are some extra rooms that are not placed and those will return Unoccupied. I was referring to the ones that are properly placed and bounded, yet still return Null or Unoccupied. Can you see that?
Dear konrad,
the problem does not appear in Revit 2015 and 2016, if you are using thoese versions, the problem should be got fixed.
Dear konrad,
the problem does not appear in Revit 2015 and 2016, if you are using thoese versions, the problem should be got fixed.
Can't find what you're looking for? Ask the community or share your knowledge.