ForgeTypeId to ParameterType

ForgeTypeId to ParameterType

antonio_hipolito
Enthusiast Enthusiast
528 Views
2 Replies
Message 1 of 3

ForgeTypeId to ParameterType

antonio_hipolito
Enthusiast
Enthusiast

Hi, is there a way to convert an ParameterElement.Definition.GetTypeId, that returns a ForgeTypeId into a human readable parameter type, like Text, Area, Length, etc.. ?

Accepted solutions (2)
529 Views
2 Replies
Replies (2)
Message 2 of 3

longt61
Advocate
Advocate
Accepted solution

I think LabelUtils.GetLabelForSpec(ForgeTypeId specTypeId) method is what you looking for. You can also get user friendly (a.k.a label) for other ForgeTypeId or enumerations with this class.

Bonus: if you are working with code, you can take a look at these predefined ForgeTypeIds:

1. SpecTypeId

2. SymbolTypeId

3. UnitTypeId

4. GroupTypeId

5. DisciplineTypeId

 

Message 3 of 3

antonio_hipolito
Enthusiast
Enthusiast
Accepted solution

Thanks. Worked as expected.

Need to implement an additional change from ParameterElement.GetDefinition.GetTypeId to ParameterElement.GetDefinition.GetDataType.