- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was recently playing with changing height via Revit API and found out something I think is worth sharing here.
So first of all I had some problems with changing levels of Ramps. Checking it I changed by hand the Ramp's Top Level to "None" which resulted in having a warning pop out with message saying that "ramp is not long enough to match the top constraint plus offset". But the top constraint shouldn't exist in that case (or should eq. to Top Offset)...
I was curious so I made the ramp extremely long - and the pop-out disappeared. It prompted me to do some investigations, which resulted in finding out that the warning disappears when the ramp length achieves the Ramp Max Slope multiplied by 3... Why I don't know 😉
The funny thing is that changing Top Offset is not changing anything in this situation - you can put whatever you like there;)
Now if you compare it to the stair tool. Stairs have a parameter "Desired Stair Height", which you can change after setting Top Level to None. It looks that with ramps, we don't have this option.
The other thing worth keeping in mind is that Revit uses "Maximum Incline Length" only during the ramp creation. After that, you will not get a warning if your ramp is too long.
Using this post I would also like to ask what is the best way of finding if the selected element is a ramp. With stairs, it is super easy if (element is Stairs) but with ramp I used :
#if !(RELEASE2024)
if ((BuiltInCategory)ele.Category.Id.IntegerValue == BuiltInCategory.OST_Ramps)
#endif
#if RELEASE2024
if ((BuiltInCategory)ele.Category.Id.Value == BuiltInCategory.OST_Ramps)
#endif
Solved! Go to Solution.