Extract Display Name property from custom type

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Hi,

I am trying to find a way to extract the Display Name property from custom-declared component type:

myType_01a.png

myType_01a_B.png

Here is "my_type" is a custom-declared type holding enumerated elements: Name: t1 (t2); Value: 1 (2), and Display Name: "AAA" ("BBB") accordingly. Parameter "my_Label" is assigned a Type of "my_type" and default Value of 1 (Display Name = "AAA").

Now in the header file I can access the parameter my_Label Value using evaluator `$my_Label` (=1) , and extract the element Name ("t1") using API function:

GetNameForEnum("my_Label", 1).

Q. How can I extract the property Display Name ("AAA") from parameter my_Label?

/odissey1 

...

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

odissey1

You can try using the ResolveEnumIdToDislay() API to extract the Display Name. The details about this are given in the PSoC Creator Customization API Reference Guide (In PSoC Creator goto, Help > Documentation > Customizer API Reference guide)

pastedImage_0.png

Best Regards

Ekta

View solution in original post

0 Likes
5 Replies