<?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: ACAPI_Automate(APIDo_SaveID...) not saving file in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190679#M5672</link>
    <description>Thanks.</description>
    <pubDate>Sat, 08 Sep 2012 10:27:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-08T10:27:47Z</dc:date>
    <item>
      <title>ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190675#M5668</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I'm using AC13 and when I call&lt;BR /&gt;&lt;BR /&gt;err = ACAPI_Automate(APIDo_SaveID, NULL, NULL, NULL);&lt;BR /&gt;from my menu handler with a new plan open from a template and it returns NoError but the file is not saved.&lt;BR /&gt;&lt;BR /&gt;How can I save the current file please?&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Aug 2023 15:01:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190675#M5668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190676#M5669</link>
      <description>&lt;BLOCKQUOTE&gt;GDefina wrote:&lt;BR /&gt;err = ACAPI_Automate(APIDo_SaveID, NULL, NULL, NULL);&lt;BR /&gt;
from my menu handler with a new plan open from a template and it returns NoError but the file is not saved.&lt;/BLOCKQUOTE&gt;
Because the file is constructed from a template, it isn't associated with any existing file (the link with the template file is severed to prevent users from saving over it). If you want to save to a file with a specific name/location, you need to fill in the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_FileSavePars&lt;E&gt;&lt;/E&gt; structure passed to the function.</description>
      <pubDate>Fri, 07 Sep 2012 08:29:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190676#M5669</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2012-09-07T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190677#M5670</link>
      <description>Thanks Ralph.&lt;BR /&gt;
&lt;BR /&gt;
How can I determine the FileTypeId of the current file? &lt;BR /&gt;
It's not part of ProjectInfo.&lt;BR /&gt;
Or can I use APIFType_None?</description>
      <pubDate>Sat, 08 Sep 2012 00:27:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190677#M5670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-08T00:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190678#M5671</link>
      <description>&lt;BLOCKQUOTE&gt;GDefina wrote:&lt;BR /&gt;How can I determine the FileTypeId of the current file? &lt;BR /&gt;
It's not part of ProjectInfo. Or can I use APIFType_None?&lt;/BLOCKQUOTE&gt;
I'm assuming you want to save the project as an ArchiCAD solo project file, in which case you would use &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIFType_PlanFile&lt;E&gt;&lt;/E&gt;.</description>
      <pubDate>Sat, 08 Sep 2012 10:12:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190678#M5671</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2012-09-08T10:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190679#M5672</link>
      <description>Thanks.</description>
      <pubDate>Sat, 08 Sep 2012 10:27:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190679#M5672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-08T10:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190680#M5673</link>
      <description>I have problems saving to a solo project. There's no error when I save using the example in Automate_Functions example. But when I try to add file destination I get APIERR_GENERAL:&lt;BR /&gt;

&lt;PRE&gt;API_FileSavePars fsp;
	API_SavePars_PlanDump pars;
	GSErrCode err;

	BNZeroMemory (&amp;amp;fsp, sizeof (API_FileSavePars));
	
	IO::Location folderLoc;
	API_SpecFolderID specID = API_UserDocumentsFolderID;
	ACAPI_Environment (APIEnv_GetSpecFolderID, &amp;amp;specID, &amp;amp;folderLoc);
	fsp.file = new IO::Location (folderLoc);
	fsp.fileTypeID = APIFType_PlanFile;

	BNZeroMemory (&amp;amp;pars, sizeof (API_SavePars_PlanDump));

	err = ACAPI_Automate (APIDo_SaveID, &amp;amp;fsp, &amp;amp;pars);&lt;/PRE&gt;

Can someone help me?&lt;BR /&gt;
&lt;BR /&gt;
P.S. I also havе troubles with IO::Location::AppendToLocal - what type of argument does it take so I can add the filename to the path?</description>
      <pubDate>Mon, 04 Nov 2019 09:23:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190680#M5673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T09:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190681#M5674</link>
      <description>&lt;BLOCKQUOTE&gt;n.mihaylov wrote:&lt;BR /&gt;
I have problems saving to a solo project. There's no error when I save using the example in Automate_Functions example. But when I try to add file destination I get APIERR_GENERAL:&lt;BR /&gt;

&lt;PRE&gt;API_FileSavePars fsp;
	API_SavePars_PlanDump pars;
	GSErrCode err;

	BNZeroMemory (&amp;amp;fsp, sizeof (API_FileSavePars));
	
	IO::Location folderLoc;
	API_SpecFolderID specID = API_UserDocumentsFolderID;
	ACAPI_Environment (APIEnv_GetSpecFolderID, &amp;amp;specID, &amp;amp;folderLoc);
	fsp.file = new IO::Location (folderLoc);
	fsp.fileTypeID = APIFType_PlanFile;

	BNZeroMemory (&amp;amp;pars, sizeof (API_SavePars_PlanDump));

	err = ACAPI_Automate (APIDo_SaveID, &amp;amp;fsp, &amp;amp;pars);&lt;/PRE&gt;

Can someone help me?&lt;BR /&gt;
&lt;BR /&gt;
P.S. I also havе troubles with IO::Location::AppendToLocal - what type of argument does it take so I can add the filename to the path?
&lt;/BLOCKQUOTE&gt;
Fsp.file should have the file name in it. Make sure the path you put into fsp.file has it (for example: c:\temp\file.pln is a good path)</description>
      <pubDate>Mon, 04 Nov 2019 12:37:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190681#M5674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T12:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate(APIDo_SaveID...) not saving file</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190682#M5675</link>
      <description>Thank you! It works now!</description>
      <pubDate>Mon, 04 Nov 2019 12:58:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-APIDo-SaveID-not-saving-file/m-p/190682#M5675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T12:58:19Z</dc:date>
    </item>
  </channel>
</rss>

