How does Revit create elevation
This article introduces the knowledge of "how to create elevations in Revit". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Create a level.
Level ll = Level.Create (doc,10.00/304.8)
This code means that a 10mm elevation is created in doc, divided by 304.8 because the language and software are invented by foreigners, its units are feet, and 304.8 is the conversion relationship between feet and millimeters.
Using this method, we created the elevation we wanted, and now take a look at the effect:
We can see that revit automatically creates a 10mm elevation, but does not create a view. So we also need to create views.
two。 Create a view.
Level ll = Level.Create (doc,10.00/304.8); / / this is the level created earlier
/ / use the method mentioned earlier to create a collector to get all the files
FilteredElementCollector fil = new FilteredElementCollector (doc)
/ / create a filter to filter out all view types
Fil.OfClass (typeof (ViewFamilyType))
/ / iterate through each view type
Foreach (ViewFamilyType vv in fil)
{
/ / find a view with a view type of floor or ceiling
If (vv.ViewFamily = = ViewFamily.FloorPlan | | vv.ViewFamily = = ViewFamily.CeilingPlan)
{
/ / create this view
ViewPlan View = ViewPlan.Create (doc, vv.Id, ll.Id)
}
}
Using the above pile of code, you can create the view corresponding to the elevation. Let's take a look at the effect:
We created both the floor view and the ceiling view. (in fact, these two views cannot be on the same level, so both are listed here at the same time, and you can use which view type you want to create. )
This is the end of the content of "how to create elevations in Revit". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!