Message 1 of 3
Not applicable
09-22-2016
06:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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;
}
Solved! Go to Solution.
