Wall from room and Wall from PickObject door.Host

Wall from room and Wall from PickObject door.Host

Anonymous
Not applicable
568 Views
1 Reply
Message 1 of 2

Wall from room and Wall from PickObject door.Host

Anonymous
Not applicable

When I use this method to get all the walls of a room and get wall from PickObject the Door.Host I can not find the corresponding wall.

what to do?
 
 
 
 
 

 

SpatialElementBoundaryOptions optionswallForPoint = new SpatialElementBoundaryOptions();
optionswallForPoint.SpatialElementBoundaryLocation = SpatialElementBoundaryLocation.Finish;
foreach (IList<Autodesk.Revit.DB.BoundarySegment> boundSegList in room.GetBoundarySegments(optionswallForPoint))
{
foreach (Autodesk.Revit.DB.BoundarySegment boundSeg in boundSegList)
{
Element elem = doc.GetElement(boundSeg.ElementId);
Wall wall = elem as Wall;
IntersectionResultArray intersectionResultArray = null;

 

 

Reference myRefdoor = uidoc.Selection.PickObject(ObjectType.Element);
            Element edoor = doc.GetElement(myRefdoor);
            FamilyInstance door = edoor as FamilyInstance;
            var wallOfDoor = (Wall)door.Host     
0 Likes
569 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I am unable to reproduce the issue. could you please describe your problem a bit more?

0 Likes