[SOLVED] How to get current project physical file name by C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-06-08
10:03 AM
- last edited on
‎2023-07-13
03:49 PM
by
Doreena Deng
My goal is to save some information for each physical project.
Is there a way to get current project file name using C++ ?
Thanks in advance.
- Labels:
-
Add-On (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-06-08 09:59 PM
ggiloyan wrote:Take a look at
My goal is to save some information for each physical project.
Is there a way to get current project file name using C++ ?
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-06-09 08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-06-09 01:27 PM
Ralph wrote:Thank you for the help!ggiloyan wrote:Take a look at
My goal is to save some information for each physical project.
Is there a way to get current project file name using C++ ?APIEnv_GetProjectNotesID. The returned data includes the project name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-06-17 04:20 AM
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-25 04:33 PM
I am able to get a project name from Teamwork using the mentioned function:
projectInfo.location_team->GetLastLocalName (&projectName);However the returned string is UTF-8 Coded from UniString, and the result is that special characters (German Umlaut f.e.) are returned like so:
- " " as "%20"
"ä" as "%C3%A4"
"ö" as "%C3%AB"
"ü" as "%C3%A6"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-25 09:13 PM
mar_kq wrote:What do you want to decode it into?
…the returned string is UTF-8 Coded from UniString. What is the recommended way to decode this?
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-26 09:12 AM
Ralph wrote:Hello Ralph,mar_kq wrote:What do you want to decode it into?
…the returned string is UTF-8 Coded from UniString. What is the recommended way to decode this?
I corrected my previous message. What I need is to get a C String with the special characters: ü,... etc. What I get for the moment is %C3%A6 instead.
Is there an API function to do this or do I require other libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-26 10:25 AM
mar_kq wrote:C doesn't define an encoding as such. The old C string libraries only typically assume an 8-bit encoding terminated by a null byte.
What I need is to get a C String with the special characters: ü,... etc. What I get for the moment is %C3%A6 instead.
Is there an API function to do this or do I require other libraries?
Text encoding is actually quite a complex subject. I suspect you're looking for an encoding with a maximum of 8 bits per character, e.g. ASCII. The problem with that approach is that you can have no more than 255 unique characters. Consequently, developers have moved to encodings that can cope with all known characters (and leave space for more), primarily Unicode. The most popular are UTF-16 (which uses a fixed 16 bits per character) and UTF-8. UTF-8 is the most popular for the Web and uses variable length characters, i.e. they might be only 1 byte but could be up to 4 (or 6 from older standards). Parsing UTF-8 is consequently more complex and random access into the nth character is much slower, but it has the distinct advantage of not breaking systems designed for 8-bit characters because it reserves the null byte for marking the end of a string.
Unless you are dealing with a legacy system that
Central Innovation