Results 1 to 2 of 2

Thread: HELP: FloorType in Room with C#

  1. #1
    New Member
    Join Date
    June 12, 2015
    Location
    Lima, Per
    Posts
    2
    Current Local Time
    11:47 AM

    Not allowed! Not allowed!

    HELP: FloorType in Room with C#

    Hello everyone:

    How I can to assign floor type (FloorType) in Room?.

    I'm using "ActiveUIDocument.Selection.PickObjects"

    See image:

    Click image for larger version. 

Name:	floortype_in_room_1.png 
Views:	6 
Size:	38.1 KB 
ID:	22325

    I'm trying the folowing code:

    Code:
    //Selected Rooms
    IList<Reference> eRefList = m_revit.ActiveUIDocument.Selection.PickObjects(Autodesk.Revit.UI.Selection.ObjectType.Element, new RoomSelectionFilter(), "Please pick some element to delete. ESC for Cancel.");
    foreach (Reference eRef in eRefList)
    {                        
    
         if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
                            {
    //Get Id FloorType
    Autodesk.Revit.DB.FloorType mytemp = (from v in new FilteredElementCollector(m_revit.ActiveUIDocument.Document).OfClass(typeof(Autodesk.Revit.DB.FloorType)).Cast<Autodesk.Revit.DB.FloorType>()
    where v.Name == typeFloor
    select v).First();
                               
    TaskDialog.Show("Rooms", eRef.ElementId.ToString() + "TypeFloor :" + mytemp.Name + "Id: " + mytemp);
    
    //This code for to assign FloorType in Room
    
    }
    }



    Thanks for your help.

    Regards,

    David

  2. #2
    New Member
    Join Date
    June 12, 2015
    Location
    Lima, Per
    Posts
    2
    Current Local Time
    11:47 AM

    Not allowed! Not allowed!

    HELP: FloorType in Room with C#

    Hello everyone:

    How I can to assign floor type (FloorType) in Room?.

    I'm using "ActiveUIDocument.Selection.PickObjects"

    See image:




    I'm trying the folowing code:
    Code:
    
    
    Code:
    //Selected Rooms
    IList<Reference> eRefList = m_revit.ActiveUIDocument.Selection.PickObjects(Autodesk.Revit.UI.Selection.ObjectType.Element, new RoomSelectionFilter(), "Please pick some element to delete. ESC for Cancel.");
                        foreach (Reference eRef in eRefList)
                        {                        
    
                            if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
                            {
                                //Get Id FloorType
                                Autodesk.Revit.DB.FloorType mytemp = (from v in new FilteredElementCollector(m_revit.ActiveUIDocument.Document).OfClass(typeof(Autodesk.Revit.DB.FloorType)).Cast<Autodesk.Revit.DB.FloorType>()
                                                                      where v.Name == typeFloor
                                                                      select v).First();
                               
                                TaskDialog.Show("Rooms", eRef.ElementId.ToString() + "TypeFloor :" + mytemp.Name + "Id: " + mytemp);
                            //This code for to assign FloorType in Room 
    
                            }
                        }



    Thanks for your help.

    Regards,

    David

Similar Threads

  1. Room bounding walls & and room separators. Rooms have no boundaries?
    By doni49 in forum Architecture and General Revit Questions
    Replies: 16
    Last Post: September 26th, 2013, 08:53 PM
  2. Find Room Element by Room Number?
    By Charles Karl in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: September 17th, 2013, 06:22 PM
  3. NEW PROJECT File>Create room>Room number is three. Want it to start at 1.
    By doni49 in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: June 29th, 2013, 04:57 AM
  4. Specialty Equipment in Room but not Room Aware
    By GMcDowellJr in forum Architecture and General Revit Questions
    Replies: 6
    Last Post: January 26th, 2012, 08:36 AM
  5. Adding Room / Room Tag too Linked models
    By Raigoki in forum Architecture and General Revit Questions
    Replies: 6
    Last Post: January 9th, 2012, 02:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •