Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
@ptc-570499 wrote:
I am using Creo Parametric - Release 7.0 (connected) 7.0 7.0.2.0
ProMdlOriginGet return only part of path that contain ASCII symbols. If model is stored in D:\QAD\цццццц then ProMdlOriginGet will return only D:\QAD
Hi,
please ask PTC Support.
I haven't tried it myself yet but what type of parameters do you use?
In the manual it says
ProMdlOriginGet ( ProMdl handle, ProPath origin )
ProPath is defined as
typedef wchar_t ProPath[PRO_PATH_SIZE];
Do you handle the contents of ProPath as wchar_t (double byte character) or do you convert it to a single byte character?
Best regards,
John Bijnens
ProPath origin returned by ProMdlOriginGet do not contain russian symbols in my case, only english
Perhaps you can find the information you need in the pdf file "tkuse.pdf" which can be found in the toolkit installation folder.
There is a chapter in it "Introduction to Unicode Encoding".
Have you already tried to look in detail at the contents of the ProPath variable with a debugger?
If this doesn't help you further it is probably best to contact PTC support.
Best regards,
John
Hi, when you write that you don’t see the Russian characters, where does this happen, message line, debug out, … ?
I'm guess, you're trying to convert wchar_t
to char
directly somewhere, like using ProWstringToString
. You cannot convert encoding this way. Use WideCharToMultiByte
function (or similar) before applying this wide string value (of ProPath) to other Toolkit function wich consume narrow char (multibyte).
But there may be many aother reasons, e.g. depending on the Character Set of the project, even the encoding of the source files (such as text files and %s vs %w formatting). Hard to guess, if you don't share any information (piece of code e.g.).
ProMdlOriginGet
itself work correctly (example):
PZ