<?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: Why this code cannot change story name? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-this-code-cannot-change-story-name/m-p/398141#M8583</link>
    <description>&lt;P&gt;Not sure what is your intention with this line:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;storyCmd.uName[storyInfo.lastStory] = GS::uchar_t("TAS");&lt;/LI-CODE&gt;
&lt;P&gt;This code modifies one character in the name at the index of lastStory. That character will probably be a "T" since you convert a string to one character. Probably you would like to write something like this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::UniString newName = "TAS";
GS::ucscpy (storyCmd.uName, newName.ToUStr ());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 14:21:05 GMT</pubDate>
    <dc:creator>Viktor Kovacs</dc:creator>
    <dc:date>2023-09-13T14:21:05Z</dc:date>
    <item>
      <title>Why this code cannot change story name?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-this-code-cannot-change-story-name/m-p/397945#M8578</link>
      <description>&lt;P&gt;With this snapshot of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;API_StoryCmdType storyCmd;
storyCmd.action = APIStory_Rename;
storyCmd.index = storyInfo.lastStory;
storyCmd.uName[storyInfo.lastStory] = GS::uchar_t("TAS");
GSErrCode err = ACAPI_Environment(APIEnv_ChangeStorySettingsID, &amp;amp;storyCmd); &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder why it did not change the story name without any error.&lt;/P&gt;
&lt;P&gt;Please advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 10:50:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-this-code-cannot-change-story-name/m-p/397945#M8578</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2024-09-17T10:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code cannot change story name?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-this-code-cannot-change-story-name/m-p/398141#M8583</link>
      <description>&lt;P&gt;Not sure what is your intention with this line:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;storyCmd.uName[storyInfo.lastStory] = GS::uchar_t("TAS");&lt;/LI-CODE&gt;
&lt;P&gt;This code modifies one character in the name at the index of lastStory. That character will probably be a "T" since you convert a string to one character. Probably you would like to write something like this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::UniString newName = "TAS";
GS::ucscpy (storyCmd.uName, newName.ToUStr ());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 14:21:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-this-code-cannot-change-story-name/m-p/398141#M8583</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2023-09-13T14:21:05Z</dc:date>
    </item>
  </channel>
</rss>

