<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get current project physical file name by C++ in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275465#M5579</link>
    <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;My goal is to save some information for each physical project.&lt;BR /&gt;
Is there a way to get current project file name using C++ ?&lt;/BLOCKQUOTE&gt;
Take a look at &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIEnv_GetProjectNotesID&lt;E&gt;&lt;/E&gt;. The returned data includes the project name.&lt;/BLOCKQUOTE&gt;

Thank you for the help!</description>
    <pubDate>Tue, 09 Jun 2015 11:27:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-09T11:27:41Z</dc:date>
    <item>
      <title>[SOLVED] How to get current project physical file name by C++</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275462#M5576</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;My goal is to save some information for each physical project.&lt;BR /&gt;Is there a way to get current project file name using C++ ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:49:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275462#M5576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T13:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current project physical file name by C++</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275463#M5577</link>
      <description>&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;My goal is to save some information for each physical project.&lt;BR /&gt;
Is there a way to get current project file name using C++ ?&lt;/BLOCKQUOTE&gt;
Take a look at &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIEnv_GetProjectNotesID&lt;E&gt;&lt;/E&gt;. The returned data includes the project name.</description>
      <pubDate>Mon, 08 Jun 2015 19:59:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275463#M5577</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2015-06-08T19:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current project physical file name by C++</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275464#M5578</link>
      <description>APIEnv_ProjectID for the file name</description>
      <pubDate>Tue, 09 Jun 2015 06:51:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275464#M5578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T06:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current project physical file name by C++</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275465#M5579</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;My goal is to save some information for each physical project.&lt;BR /&gt;
Is there a way to get current project file name using C++ ?&lt;/BLOCKQUOTE&gt;
Take a look at &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIEnv_GetProjectNotesID&lt;E&gt;&lt;/E&gt;. The returned data includes the project name.&lt;/BLOCKQUOTE&gt;

Thank you for the help!</description>
      <pubDate>Tue, 09 Jun 2015 11:27:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275465#M5579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T11:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current project physical file name by C++</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275466#M5580</link>
      <description>If you want the file name, you can use &lt;FONT color="#808080"&gt;APIEnv_ProjectID&lt;/FONT&gt;. It will return the file name of the project at either &lt;FONT color="#808080"&gt;location&lt;/FONT&gt; or &lt;FONT color="#808080"&gt;location_team&lt;/FONT&gt;. They are full path, though.</description>
      <pubDate>Wed, 17 Jun 2015 02:20:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275466#M5580</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2015-06-17T02:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] How to get current project physical file name b</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275467#M5581</link>
      <description>I have an Issue connected to this topic.&lt;BR /&gt;
&lt;BR /&gt;
I am able to get a project name from Teamwork using the mentioned function:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;projectInfo.location_team-&amp;gt;GetLastLocalName (&amp;amp;projectName);&lt;/PRE&gt;

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:
&lt;UL&gt;
   &lt;LI&gt;" " as "&lt;B&gt;%20&lt;/B&gt;"&lt;BR /&gt;
	"ä" as "&lt;B&gt;%C3%A4&lt;/B&gt;"&lt;BR /&gt;
	"ö" as "&lt;B&gt;%C3%AB&lt;/B&gt;"&lt;BR /&gt;
	"ü" as "&lt;B&gt;%C3%A6&lt;/B&gt;"&lt;/LI&gt;
&lt;/UL&gt;
What is the recommended way to decode this so I get a readable C String?</description>
      <pubDate>Wed, 25 Jan 2017 15:33:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275467#M5581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T15:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] How to get current project physical file name b</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275468#M5582</link>
      <description>&lt;BLOCKQUOTE&gt;mar_kq wrote:&lt;BR /&gt;…the returned string is UTF-8 Coded from UniString. What is the recommended way to decode this?&lt;/BLOCKQUOTE&gt;
What do you want to decode it into?</description>
      <pubDate>Wed, 25 Jan 2017 20:13:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275468#M5582</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2017-01-25T20:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] How to get current project physical file name b</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275469#M5583</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;mar_kq wrote:&lt;BR /&gt;…the returned string is UTF-8 Coded from UniString. What is the recommended way to decode this?&lt;/BLOCKQUOTE&gt;
What do you want to decode it into?&lt;/BLOCKQUOTE&gt;

Hello Ralph, &lt;BR /&gt;
&lt;BR /&gt;
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. &lt;BR /&gt;
Is there an API function to do this or do I require other libraries?</description>
      <pubDate>Thu, 26 Jan 2017 08:12:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275469#M5583</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-26T08:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] How to get current project physical file name b</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275470#M5584</link>
      <description>&lt;BLOCKQUOTE&gt;mar_kq wrote:&lt;BR /&gt;What I need is to get a C String with the special characters: ü,... etc. What I get for the moment is %C3%A6 instead. &lt;BR /&gt;
Is there an API function to do this or do I require other libraries?&lt;/BLOCKQUOTE&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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 &lt;A href="http://unicode.org" target="_blank"&gt;Unicode&lt;/A&gt;. 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.&lt;BR /&gt;
&lt;BR /&gt;
Unless you are dealing with a legacy system that &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;must&lt;E&gt;&lt;/E&gt; have an ASCII encoding, I'd strongly recommend embracing the encoding provided by ARCHICAD. Take a look at the API documentation for text encoding and string handling, and do a bit of reading on Unicode etc. – it's well worth the effort.</description>
      <pubDate>Thu, 26 Jan 2017 09:25:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-get-current-project-physical-file-name-by-C/m-p/275470#M5584</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2017-01-26T09:25:05Z</dc:date>
    </item>
  </channel>
</rss>

