-2

Within Revit, there is the possibility of locating toilets or handwash, using the option within the system and plumbing fixture. My question is is there the possibility of creating them using the Revit api? The only thing I've seen is the creation of some types of systems as shown by the following line of code:

    public bool createHotWater(Connector baseConector, ConnectorSet set, 
                Document doc)
    {
        try
        {
            using (var trans = new Transaction(doc, "SystemHotWater"))
            {
                trans.Start();
                PipingSystem piping = doc.Create.               
                   NewPipingSystem(baseConector, 
                   set,PipeSystemType.DomesticHotWater);                  

                trans.Commit();
            }
            return true;
        }
        catch (Exception e)
        {
            return false;
        }

    }

I know that the above code only creates a hot water system, but I would like to know if there is an option to create toilets from the Revit api.

j-j suarez
  • 111
  • 3

1 Answers1

0

Yes, certainly this can be achieved programmatically as well as manually through the user interface. For this very purpose, the Family API for Creating Family Definitions was introduced in Revit 2010.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17