I have a project that is analyzing a bunch of different existing client campus buildings for planning purposes. We were given CAD files for each level of each building, with the net room area boundaries drawn on a layer. In order to create basic colored plans based on multiple data criteria, we created a Revit model for each building, created Revit levels for each existing level, linked in the CAD, then used the below Dynamo script (from the Player) to generate Room Separation lines for each room. I had a separate Dynamo script to create the rooms based on other CAD objects, and further scripts to import data from various csv’s and databases. Everything appeared to go swimmingly.
We are now in the process of further refining the models and creating 3D diagrams, and want to set the levels at their correct locations. When we modify the level elevation in Revit, the created room separation lines stay at their original elevation (see below). I can sometimes get them to stick to the actual level by copying / cutting / pasting aligned in various ways, but they never consistently stick to the levels.
I’m thinking that when I used the Level.Plane then SketchPlane.ByPlane nodes, I created sketchplanes that were in the same location, but not actually associated to the levels, so when I then move the level, the created sketchplane stays behind. In the API, I see there is a method to create a sketch plane directly from an element ID, but I can’t find a way to access that with DesignScript in a code block or in a Python node.
I believe I used an actual level plan as the ActiveView for each level when running the script, but I don’t remember at the moment.