We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2015-03-23 08:13 AM - last edited on 2023-08-01 01:29 PM by Doreena Deng
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& e); void ListViewSelectionChanged ( const DG::ListViewSelectionEvent& ev); private: IssuesDialog(const IssuesDialog&); const IssuesDialog& operator=(const IssuesDialog&); //Disabled private: IssuesDialog *current_dialog; IssueDataObject *issueDataObject; };
IssuesDialog *issuesDialog = new IssuesDialog(); issuesDialog->setInstance(issuesDialog); issuesDialog->Activate(); issuesDialog->BeginEventProcessing(); issuesDialog->BringToFront(); issuesDialog->Show(); ACAPI_KeepInMemory(true);When I close the dialog I call the following code
SendCloseRequest(); this->current_dialog->EndEventProcessing(); delete this->current_dialog; ACAPI_KeepInMemory(false);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
2015-03-23 08:42 PM
ggiloyan wrote:That's a build problem rather than a runtime error. Do you quit from ArchiCAD when you want to make changes and rebuild?
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
warning : Access to the path 'BuildingCloud.apx' is denied
error LNK1104: cannot open file 'BuildingCloud.apx'
2015-03-24 05:53 AM
Ralph wrote: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.ggiloyan wrote:That's a build problem rather than a runtime error. Do you quit from ArchiCAD when you want to make changes and rebuild?
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
warning : Access to the path 'BuildingCloud.apx' is denied
error LNK1104: cannot open file 'BuildingCloud.apx'
2015-03-24 11:02 AM
ggiloyan wrote: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:
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.
Instructs the host application to keep the add-on in the memoryBut 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.
2015-03-24 01:33 PM
Ralph wrote: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.ggiloyan wrote: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:
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.Instructs the host application to keep the add-on in the memoryBut 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.
2015-03-24 01:39 PM
ggiloyan wrote:You have to accept some unique constraints for plugin development. It isn't the same as developing a stand-alone application.
Ok. But it's take time to close ArchiCad and open.
2015-03-24 02:42 PM
Ralph wrote:Thanks for reply!ggiloyan wrote:You have to accept some unique constraints for plugin development. It isn't the same as developing a stand-alone application.
Ok. But it's take time to close ArchiCad and open.