Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
I am aware that I can enter text inside drawing table cell using API ProDwgtableTextEnter().
Manually, One can add text symbol into cell of drawing table by following below steps:
I would like to know how to add text symbol into Drawing table using toolkit.
Thanks in advance!
Regards
Ketan
You enter it as ^A (control-A) then the character code for the symbol in question (for example 'n' for diameter) then ^B (control-B). For example: "Hole is ^An^B20 mm". If you are not sure which character is right, make a note using the text symbol palette, and Save Note on it, and examine the resulting file.
Hello,
Thank you for this suggestion.
I tried with text as "Hole is ^An^B20 mm" through toolkit to write it into table cell. I regenerated drawing sheet also, but it does not change to diameter symbol.
Am I missing something which need to be done?
Thanks and Regards
Ketan
Hi all,
^An^B is for UI assisted input, with Pro/Toolkit note text manipulation this will not work. What one needs to do is to create a number of test notes containing various symbols via UI ( as the previous reply was saying) and while in debug mode to examine wchar_t* data from Pro/Toolkit note text lines - then one could see the correct hex values for symbol codes.
From about Pro/E 14 till Creo 3.0 ^A was 0x001 and ^B was 0x002, but I do not believe it was documented anywhere... For example the diameter symbol would be something like this: wchar_t *dia_txt = { 0x001, 'n', 0x002, 0x0} and to use is I would do something like snwprintf( some_text, PRO_LINE_SIZE-1, L"%ls %1.4f", dia_txt, some_double);
Also you may revert to the old style noteline text '{0:..}'
HIH.
Feliks.
Matthew Ender wrote:
You enter it as ^A (control-A) then the character code for the symbol in question (for example 'n' for diameter) then ^B (control-B). For example: "Hole is ^An^B20 mm". If you are not sure which character is right, make a note using the text symbol palette, and Save Note on it, and examine the resulting file.
Sorry, I was presuming familiarity with the ASCII representation of character codes. I don't mean to say you enter it in your code using the control key, rather that the character codes are 0x1 and 0x2. One representation in C would be
The hole is \001n\002 mm.
I have verified that this works with ProDwgtableTextEnter.
Hello,
Unfortunately, The hole is \001n\002 mm is not working with ProDwgtableTextEnter for me. I am having creo 2.0 M090.
For \001n\002, I am unable to understand this. ASCII value for A , B and control key are 001 , 002 and 0 respectively, it should not be 0001n0002 instead of \001n\002?
I tried with 0001n0002 also, but no success.
Thanks for your patience and answering repeated question of mine.
regards
Ketan
\001n\002 as in printf( "%c%s%c", '\001', "n", '\002); or char *t={'\001', 'n', '\002', '\000'}; or char *t={0x1, 'n', 0x2, 0x0}; or std::cout <<'\001'<<"n"<<'\002';...