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
    02:04 AM

    Not allowed! Not allowed!

    HELP: FloorType in Room with C#

    [FONT=arial]Hello everyone:

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

    I'm using "ActiveUIDocument.Selection.PickObjects"

    [/FONT][FONT=FrutigerNextW04-Regular][FONT=arial]See image:
    [/FONT]
    Click image for larger version. 

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

    [FONT=arial]I'm trying the folowing code:[/FONT]

    [/FONT]
    Code:
    [FONT=Verdana]//Selected Rooms[/FONT]
    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
    
    }
    [FONT=FrutigerNextW04-Regular][FONT=Verdana]}[/FONT][/FONT]
    [FONT=FrutigerNextW04-Regular]

    [/FONT]
    [FONT=arial]
    Thanks for your help.

    Regards,

    David[/FONT]

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

    Not allowed! Not allowed!

    HELP: FloorType in Room with C#

    [FONT=FrutigerNextW04-Regular]Hello everyone:[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]How I can to assign floor type (FloorType) in Room?.[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]I'm using "ActiveUIDocument.Selection.PickObjects"[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]See image:[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular][/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]I'm trying the folowing code:[/FONT]
    [FONT=FrutigerNextW04-Regular]
    Code:
    [/FONT]
    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 
    
                            }
                        }[FONT=FrutigerNextW04-Regular]


    [/FONT]

    [FONT=FrutigerNextW04-Regular]Thanks for your help.[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]Regards,[/FONT]
    [FONT=FrutigerNextW04-Regular] [/FONT]
    [FONT=FrutigerNextW04-Regular]David[/FONT]

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, 07: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, 05: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, 03: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, 07: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, 01: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
  •