08-06-2015 08:50 AM
Hi,
I have an utility that imports limits from external resources and in that utility (C#) I would need to modify the numeric representation so that what is defined as hexa in the external resource to be displayed as hexa after importing to TS as well.
Can U help me out if this is possible with the API and if so, what is the right methods for it?
Thanks in advance.
Solved! Go to Solution.
08-07-2015 04:05 AM
Hi!
I'm not sure if I understood you correctly, but I think your problem can be solved, without using API functions. Just double click on the name of variable and there you can change the representation - I attached an image.
If you still want to use API, let me know i will try to find something.
Best regards.
08-07-2015 06:24 AM
Hi twardak.m,
I need to do it through the API to ensure that the same representation is used in both end of our data backend. The data is overwritten at each run so the manual modification would be really inconvenient.
I searched the TS API up and down but find no way to do it not even in TS ( I mean through the API, I'm familiar with the Numeric Format properties window).
Anyway, thanks in advance for the help.
08-07-2015 09:16 AM - edited 08-07-2015 09:17 AM
Hi again,
I didn't find straight solution yet, but I think it is good way around:
http://digital.ni.com/public.nsf/allkb/1304B337E03E2E1A86257ACD004BAB06
If you want hexadecimal representation you need to change "%b" to "%x". I'm still keep looking for a better solution...
Best Regards
08-07-2015 09:33 AM
Hi,
Just a few minutes ago we found this solution working:
x.NumericFormat = "%#X"; where x is the PropertyObject pointing to the number. It is just not documented anywher for this method that U can use X for hexa.
08-07-2015 09:41 AM
I'm really happy you found the solution! Thank you for writting it here, maybe someone else will use it in the future 🙂
Best regards
08-07-2015 10:04 AM
Thanks for your effort!