cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

ProMdlOriginGet return only part of path that contain ASCII symbols.

ptc-570499
2-Guest

ProMdlOriginGet return only part of path that contain ASCII symbols.

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
6 REPLIES 6


@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.


Martin Hanák
JB_87049
15-Moonstone
(To:ptc-570499)

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

JB_87049
15-Moonstone
(To:ptc-570499)

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

RPN
17-Peridot
17-Peridot
(To:ptc-570499)

Hi, when you write that you don’t see the Russian characters, where does this happen, message line, debug out, … ?

zemanekp
13-Aquamarine
(To:ptc-570499)

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):

PetrZemanek_0-1621422256386.png

PZ

Top Tags