<?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: IMPORTANT! ACAPI_KeepInMemory problem in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256283#M5512</link>
    <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Everything goes correct and dialod closes withouth any errors but when I want to change something in my add-on code and rebuild again I'm getting the following error&lt;BR /&gt;
&lt;BR /&gt;
warning : Access to the path 'BuildingCloud.apx'  is denied&lt;BR /&gt;
error LNK1104: cannot open file 'BuildingCloud.apx'&lt;/BLOCKQUOTE&gt;
That's a build problem rather than a runtime error. Do you quit from ArchiCAD when you want to make changes and rebuild?&lt;/BLOCKQUOTE&gt;

No I don't quit ArchiCad when I do rebuild. When I don't use ACAPI_KeepInMemory without closing ArchiCad rebuild works fine . So it's related with ACAPI_KeepInMemory. I think something is not removed from memory.</description>
    <pubDate>Tue, 24 Mar 2015 04:53:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-24T04:53:24Z</dc:date>
    <item>
      <title>[SOLVED] ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256281#M5510</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I have a dialog which inherits from DG::Palette class.&lt;BR /&gt;&lt;BR /&gt;Here is my dialog's header class&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;class IssuesDialog : public DG::Palette, public DG::ButtonItemObserver, public DG::ListViewObserver	
{

private:
	DG::LeftText			m_textViewGuid;
	DG::LeftText			m_textViewId;
	DG::TextEdit			m_textEditTitle;
	DG::TextEdit			m_textEditDesc;
	DG::PopUp				m_cbStatus;
	DG::Button				m_btnFindObject;
	DG::Button				m_btnSaveData;
	DG::SingleSelListView	m_listIssues;
	DG::Button				m_btnClose;

public:
	IssuesDialog();
	~IssuesDialog();
	void setInstance(IssuesDialog *instance);
private:
	bool	validate();	
	void	fillListView();
protected:
	void	ButtonClicked (const DG::ButtonClickEvent&amp;amp; e);
	void	ListViewSelectionChanged ( const DG::ListViewSelectionEvent&amp;amp; ev);
private:
	IssuesDialog(const IssuesDialog&amp;amp;);
	const	IssuesDialog&amp;amp; operator=(const IssuesDialog&amp;amp;); //Disabled
private:
	IssuesDialog *current_dialog;
	IssueDataObject *issueDataObject;
	
};&lt;/PRE&gt;
&lt;BR /&gt;And here is the code when I open the dialog from other .cpp file&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;IssuesDialog *issuesDialog = new IssuesDialog();
issuesDialog-&amp;gt;setInstance(issuesDialog);
issuesDialog-&amp;gt;Activate();
issuesDialog-&amp;gt;BeginEventProcessing();
issuesDialog-&amp;gt;BringToFront();
issuesDialog-&amp;gt;Show();
ACAPI_KeepInMemory(true);
&lt;/PRE&gt;
When I close the dialog I call the following code&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;SendCloseRequest();
this-&amp;gt;current_dialog-&amp;gt;EndEventProcessing();
delete this-&amp;gt;current_dialog;
ACAPI_KeepInMemory(false);&lt;/PRE&gt;
Everything goes correct and dialod closes withouth any errors but when I want to change something in my add-on code and rebuild again I'm getting the following error&lt;BR /&gt;&lt;BR /&gt;warning : Access to the path 'BuildingCloud.apx' is denied&lt;BR /&gt;error LNK1104: cannot open file 'BuildingCloud.apx'&lt;BR /&gt;&lt;BR /&gt;I believe above error mean there is a something which not removed from memory.&lt;BR /&gt;&lt;BR /&gt;By the way this error also appears in archicad add-on examples which provided in ApiDevKit Examples folder.&lt;BR /&gt;&lt;BR /&gt;Is there a way to solve this issue ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advace.&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:29:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256281#M5510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256282#M5511</link>
      <description>&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Everything goes correct and dialod closes withouth any errors but when I want to change something in my add-on code and rebuild again I'm getting the following error&lt;BR /&gt;
&lt;BR /&gt;
warning : Access to the path 'BuildingCloud.apx'  is denied&lt;BR /&gt;
error LNK1104: cannot open file 'BuildingCloud.apx'&lt;/BLOCKQUOTE&gt;
That's a build problem rather than a runtime error. Do you quit from ArchiCAD when you want to make changes and rebuild?</description>
      <pubDate>Mon, 23 Mar 2015 19:42:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256282#M5511</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2015-03-23T19:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256283#M5512</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Everything goes correct and dialod closes withouth any errors but when I want to change something in my add-on code and rebuild again I'm getting the following error&lt;BR /&gt;
&lt;BR /&gt;
warning : Access to the path 'BuildingCloud.apx'  is denied&lt;BR /&gt;
error LNK1104: cannot open file 'BuildingCloud.apx'&lt;/BLOCKQUOTE&gt;
That's a build problem rather than a runtime error. Do you quit from ArchiCAD when you want to make changes and rebuild?&lt;/BLOCKQUOTE&gt;

No I don't quit ArchiCad when I do rebuild. When I don't use ACAPI_KeepInMemory without closing ArchiCad rebuild works fine . So it's related with ACAPI_KeepInMemory. I think something is not removed from memory.</description>
      <pubDate>Tue, 24 Mar 2015 04:53:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256283#M5512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-24T04:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256284#M5513</link>
      <description>&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;No I don't quit ArchiCad when I do rebuild. When I don't use ACAPI_KeepInMemory without closing ArchiCad rebuild works fine . So it's related with ACAPI_KeepInMemory. I think something is not removed from memory.&lt;/BLOCKQUOTE&gt;
Yes, you're right in saying that something is not removed from memory; it's the add-on itself. The documentation states that the following about ACAPI_KeepInMemory: &lt;BLOCKQUOTE&gt;Instructs the host application to keep the add-on in the memory&lt;/BLOCKQUOTE&gt;
But when you rebuild, you are effectively attempting to unload and reload the add-on. Those actions aren't compatible, and I wouldn't do it even if no errors were reported. I highly recommend always quitting from ArchiCAD whenever you want to rebuild.</description>
      <pubDate>Tue, 24 Mar 2015 10:02:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256284#M5513</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2015-03-24T10:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256285#M5514</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;No I don't quit ArchiCad when I do rebuild. When I don't use ACAPI_KeepInMemory without closing ArchiCad rebuild works fine . So it's related with ACAPI_KeepInMemory. I think something is not removed from memory.&lt;/BLOCKQUOTE&gt;
Yes, you're right in saying that something is not removed from memory; it's the add-on itself. The documentation states that the following about ACAPI_KeepInMemory: &lt;BLOCKQUOTE&gt;Instructs the host application to keep the add-on in the memory&lt;/BLOCKQUOTE&gt;
But when you rebuild, you are effectively attempting to unload and reload the add-on. Those actions aren't compatible, and I wouldn't do it even if no errors were reported. I highly recommend always quitting from ArchiCAD whenever you want to rebuild.&lt;/BLOCKQUOTE&gt;

Ok. But it's take time to close ArchiCad and open. We can pass false to ACAPI_KeepInMemory function but it doesn't work even in that case.</description>
      <pubDate>Tue, 24 Mar 2015 12:33:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256285#M5514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-24T12:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256286#M5515</link>
      <description>&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Ok. But it's take time to close ArchiCad and open.&lt;/BLOCKQUOTE&gt;
You have to accept some unique constraints for plugin development. It isn't the same as developing a stand-alone application.</description>
      <pubDate>Tue, 24 Mar 2015 12:39:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256286#M5515</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2015-03-24T12:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! ACAPI_KeepInMemory problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256287#M5516</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Ok. But it's take time to close ArchiCad and open.&lt;/BLOCKQUOTE&gt;
You have to accept some unique constraints for plugin development. It isn't the same as developing a stand-alone application.&lt;/BLOCKQUOTE&gt;

Thanks for reply!</description>
      <pubDate>Tue, 24 Mar 2015 13:42:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-ACAPI-KeepInMemory-problem/m-p/256287#M5516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-24T13:42:09Z</dc:date>
    </item>
  </channel>
</rss>

