What is the internal identifier of a parameter, which is also used in formulas

What is the internal identifier of a parameter, which is also used in formulas

fabian_oswaldYVZ4J
Community Visitor Community Visitor
613 Views
4 Replies
Message 1 of 5

What is the internal identifier of a parameter, which is also used in formulas

fabian_oswaldYVZ4J
Community Visitor
Community Visitor

Hello,

I am developing an addin in which I can define my own formulas in the family editor. Similar to the family type dialog.

fabian_oswaldYVZ4J_1-1721393845815.png

 

Let's assume the formula is:
Window {Width} x {Height} {GlassType}

I don't want to save this internally because if I rename a parameter, it will no longer match the formula. Or If I start Revit in another language - for example German - the width and height parameters are no longer found.

I would like to save it as follows instead:
Window {GUID} x {GUID} {GUID}

Now to GUID:
What can I use here? The most obvious is the ID of InternalDefinition.
However, there have been several changes here in the last versions of Revit:


Revit 2020 Id: 4111
Revit 2021 Id: 4111
Revit 2022 GetTypeId: autodesk.parameter.aec.revit.family:4111-1.0.0
Revit 2023 GetTypeId: revit.local.family:5da7dc0b7e9c4288adb7f24b3b6923d80000100f-1.0.0
Revit 2025 GetTypeId: revit.local.family:5da7dc0b7e9c4288adb7f24b3b6923d80000100f-1.0.0

 

I am interested in how the following formulas are saved internally by Revit. I strongly suspect that the parameter names are replaced by a unique identifier. But which one?

fabian_oswaldYVZ4J_0-1721393547841.png

@jeremy_tammik Perhaps you could ask the developers about this? Many thanks in advance.

0 Likes
614 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Ok, I asked the development team for you. 

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

jeremy_tammik
Alumni
Alumni

They say: I think InternalDefinition.Id is the proper stable id:

   

  

The GetTypeId() is the Forge Parameter Schema typeId and it changed in the past few versions. The Id() remained the same.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 4 of 5

jeremy_tammik
Alumni
Alumni

Can you confirm that this works for your requirements, please? Thx!

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

... assuming that it does, I now went ahead and shared it for posterity:

   

https://thebuildingcoder.typepad.com/blog/2024/07/stable-parameter-identifier-and-webview2-plans.htm...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes