Internal Definition Parameter Type Missing in Revit 2023

Internal Definition Parameter Type Missing in Revit 2023

s04049
Enthusiast Enthusiast
3,959 Views
2 Replies
Message 1 of 3

Internal Definition Parameter Type Missing in Revit 2023

s04049
Enthusiast
Enthusiast

Hello

My addin loop through the Family Parameter > Internal Definition and get the Parameter Type for each parameter.

In previous version ParameterType Property is what I going for.

https://www.revitapidocs.com/2022/03ac34fe-36c4-2e0c-721a-4f472907f3cb.htm

 

in 2023 Revit API this Attribute is removed, and I am confused where can found the value in 2023 version, 

I did try to look for GetDataType but the value of the attribute is like [autodesk.spec.aec:length-1.0.0],

that's not I looking for.

 

Thanks for any help

Accepted solutions (1)
3,960 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Yes.

 

The property you were using was deprecated in the Revit 2022 API and has presumably been declared obsolete and removed now:

 

https://thebuildingcoder.typepad.com/blog/2021/04/whats-new-in-the-revit-2022-api.html#4.1.1

 

The migration to the new system has been discussed here in the forum frequently and in great depth.

 

Please refer to previous discussions here in the forum.

  

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

s04049
Enthusiast
Enthusiast
Accepted solution
Thanks for the reply,
I found the following LabelUtils API and solve my problem.

LabelUtils.GetLabelForSpec(definition.GetDataType());
https://www.revitapidocs.com/2022/5f0e82b9-cf62-062d-5136-3c4032cca766.htm
Previous Discussions Reference
https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/1022...