I am using this code to create a Room in Revit. It successfully creates the Room but is invisible and is only visible when I take the mouse over it. Once you remove the mouse the Room disappears. Could somebody let me know what is wrong with the code below.
Document document = commandData.Application.ActiveUIDocument.Document;
using (Transaction trans = new Transaction(document, "CreateRoom"))
{
trans.Start();
double elevation = 1.0;
Level level1 = Level.Create(document, elevation);
UV point2D = new UV(10, 10);
Room room = document.Create.NewRoom(level1, point2D);
if (room == null)
{
return Result.Failed;
}
trans.Commit();
return Result.Succeeded;
}