We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-09-12 10:19 AM - last edited on 2024-09-17 12:50 PM by Doreena Deng
With this snapshot of code:
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, &storyCmd);
I wonder why it did not change the story name without any error.
Please advise.
Solved! Go to Solution.
2023-09-13 04:21 PM
Not sure what is your intention with this line:
storyCmd.uName[storyInfo.lastStory] = GS::uchar_t("TAS");
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:
GS::UniString newName = "TAS";
GS::ucscpy (storyCmd.uName, newName.ToUStr ());
2023-09-13 04:21 PM
Not sure what is your intention with this line:
storyCmd.uName[storyInfo.lastStory] = GS::uchar_t("TAS");
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:
GS::UniString newName = "TAS";
GS::ucscpy (storyCmd.uName, newName.ToUStr ());