BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

[SOLVED] Convert char and Int32 to UniString

Anonymous
Not applicable
Hi

I need to convert char and Int32 to UniString.

Please advise.
2 REPLIES 2
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
ggiloyan wrote:
I need to convert char and Int32 to UniString.
You can use GS::UniString::Printf function:
int myInt = 12;
char myChar = 'd';

GS::UniString intString = GS::UniString::Printf ("%d", myInt);
GS::UniString charString = GS::UniString::Printf ("%c", myChar);

GS::UniString buffer = GS::UniString::Printf ("int: %d, char: %c, UniString: %T", myInt, myChar, GS::UniString ("my unistring").ToPrintf ());
Anonymous
Not applicable
Thank you. ))))
Learn and get certified!