Placing Elevation Tags Automatically

Hi Guys,

I was trying to use this code that was posted on Jeremy Graham’s website Module 11 where you can put the elevations tags automatically regardless of the shape of the room at the link below:

which is amazing…

However, It gives me an error as following:

“ **Warning: View.ElevationByCurve expects argument type(s) (Autodesk.DesignScript.Geometry.Curve, Revit.Elements.Element, Revit.Elements.Element, bool), but was called with (Autodesk.DesignScript.Geometry.Line, Revit.Elements.ElementType, string, bool).

and I do not know what cause this issue. Any help would be very appreciated.

If anyone has already downloaded the rvt and dyn files from Jeremy’s website, can you please share it as well. On his website the links are no longer active. Therefore, I can’t download those rvt and dyn files.

It would help of you could share an image of your graph, but the error is starting that your giving the node wrong inputs. It’s looking for a curve, but your feeding it a lost of lines. This probably means your lost management needs to be resolved. Also, the String reference probably means your giving it a name,. It not the actual element reference (Green bubble) and therefore it’s breaking.

Above is the Python code.

Are you working in Revit 2022?

Yes I am.

Hi Sean,

This is the dynamo file if you need to look at.

Interior Elevations.dyn (62.7 KB)

That is why it is t working. Revit 2022 no longer utilizes UnitType, but rather ForgeTypeId and SpecTypeId.

So it is deprecated.

" Autodesk.Revit.DB.Units:

  • Deprecated → Replacement
  • FormatOptions GetFormatOptions(UnitType) → FormatOptions GetFormatOptions(ForgeTypeId specTypeId)"

I will match to the code you posted. Let me try.

Thank you so much Sean!! very appreciated!!

1 Like

Hi Sean,

All good right now. Thank you so much for your help!! very appreciated…

However, just a side note, I came a cross some warning messages while I was trying to address those issues. As soon as I uninstalled the add-in called “BIM track” all the warning messages are going away. It seems like it is related to Revit API and I am not sure why.

Anyway, if anyone has that kind of issues this was one of the reason for me.

Thanks again!

1 Like