Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The nodes for setting reinforcement spacing are not working in Revit 2023 #87

Open
JRiad opened this issue Aug 26, 2022 · 0 comments
Open

Comments

@JRiad
Copy link

JRiad commented Aug 26, 2022

This is due to a change in Revit API where the way units are handled has been changed, see links:

https://help.autodesk.com/view/RVT/2022/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Introduction_Application_and_Document_ForgeTypeId_html

https://forums.autodesk.com/t5/revit-api-forum/forgetypeid-how-to-use/td-p/9439210

I solved the issue by hard coding the length to mm, like below. Not sure if you want to use that solution, I'm sure there is a more general way.

    [IsVisibleInDynamoLibrary(false)]
    public static double ToRvtLength(this double length)
    {
        ForgeTypeId ftID = UnitTypeId.Millimeters;            
        return Autodesk.Revit.DB.UnitUtils.ConvertToInternalUnits(length, ftID);
    }

    [IsVisibleInDynamoLibrary(false)]
    public static double FromRvtLength(this double length)
    {
        ForgeTypeId ftID = UnitTypeId.Millimeters;           
        return Autodesk.Revit.DB.UnitUtils.ConvertFromInternalUnits(length, ftID);  
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant