<?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 close ArchiCAD file? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132746#M6701</link>
    <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;I haven't tried to explicitly close a project. I've used the method for opening a project, which implicitly closes the current project. Why do you want to close a project without opening another?&lt;/BLOCKQUOTE&gt;
Hi, Ralph&lt;BR /&gt;
&lt;BR /&gt;
My Add-On monitors project file folder for changes. When file changed, monitor should make some actions with him and show some message boxes in ArchiCAD too.&lt;BR /&gt;
Typically ArchiCAD not lock project file all time. But I try to close project to guarantee file not locked by ArchiCAD and my monitor works right.&lt;BR /&gt;
&lt;BR /&gt;
I can to open template project for closing current, but it's need some seconds. I will try to find decision, for example ask user to close again.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot</description>
    <pubDate>Thu, 14 May 2009 15:49:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-05-14T15:49:19Z</dc:date>
    <item>
      <title>How to close ArchiCAD file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132742#M6697</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I tried to close file 2 ways.&lt;BR /&gt;1. By Name:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;IO::Location loc(fileName); //fileName has _bstr_t type
IO::File file(loc);
file.Close(); // return NoError
&lt;/PRE&gt;
2. Close current project:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;ACAPI_Automate(APIDo_CloseID); //return APIERR_REFUSEDCMD
&lt;/PRE&gt;
But nothing happens. I have no ideas about closing now.&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 15:15:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132742#M6697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T15:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to close ArchiCAD file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132743#M6698</link>
      <description>I have never tried any of these, but noticed that CloseID says it will not close if another add-on is active.  I wonder if APIDb_CloseWindowID on the plan window would work, although the docs seem to indicate that this function is only for a 'custom window opened from the same add-on'.&lt;BR /&gt;
&lt;BR /&gt;
I would have thought that a goodie or automate function would have been the answer.&lt;BR /&gt;
&lt;BR /&gt;
Ralph? &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
&lt;BR /&gt;
Karl</description>
      <pubDate>Wed, 13 May 2009 15:47:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132743#M6698</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2009-05-13T15:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to close ArchiCAD file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132744#M6699</link>
      <description>Hi, Karl&lt;BR /&gt;
&lt;BR /&gt;
I tried next code:
&lt;PRE&gt;API_WindowInfo windowInfo;
BNZeroMemory (&amp;amp;windowInfo, sizeof (API_WindowInfo));
windowInfo.typeID = APIWind_FloorPlanID; // and try APIWind_WorksheetID typeId also
windowInfo.index = 1;
GSErrCode err = ACAPI_Database (APIDb_CloseWindowID, &amp;amp;windowInfo);
&lt;/PRE&gt;
But APIERR_REFUSEDPAR error code returns.</description>
      <pubDate>Thu, 14 May 2009 07:58:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132744#M6699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-14T07:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to close ArchiCAD file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132745#M6700</link>
      <description>&lt;BLOCKQUOTE&gt;equilibrium wrote:&lt;BR /&gt;I tried to close file 2 ways.&lt;BR /&gt;
1. By Name:&lt;/BLOCKQUOTE&gt;
I haven't tried to explicitly close a project. I've used the method for opening a project, which implicitly closes the current project. Why do you want to close a project without opening another?</description>
      <pubDate>Thu, 14 May 2009 09:53:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132745#M6700</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2009-05-14T09:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to close ArchiCAD file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132746#M6701</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;I haven't tried to explicitly close a project. I've used the method for opening a project, which implicitly closes the current project. Why do you want to close a project without opening another?&lt;/BLOCKQUOTE&gt;
Hi, Ralph&lt;BR /&gt;
&lt;BR /&gt;
My Add-On monitors project file folder for changes. When file changed, monitor should make some actions with him and show some message boxes in ArchiCAD too.&lt;BR /&gt;
Typically ArchiCAD not lock project file all time. But I try to close project to guarantee file not locked by ArchiCAD and my monitor works right.&lt;BR /&gt;
&lt;BR /&gt;
I can to open template project for closing current, but it's need some seconds. I will try to find decision, for example ask user to close again.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot</description>
      <pubDate>Thu, 14 May 2009 15:49:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-close-ArchiCAD-file/m-p/132746#M6701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-14T15:49:19Z</dc:date>
    </item>
  </channel>
</rss>

