Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66666

Rendering issues while Creating a Room

$
0
0

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;
}


Viewing all articles
Browse latest Browse all 66666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>