Hello René,
you can use your approach, if you have an array of the values of those defines. Then you can index the array with the item-number of the define. This way all defines have to use the same data type.
You can also use a global variable for each #define. Then you can use different datatypes for your defines.
Best regards,
GerdW
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019