2009-05-13 04:26 PM - last edited on 2023-08-03 05:15 PM by Doreena Deng
IO::Location loc(fileName); //fileName has _bstr_t type IO::File file(loc); file.Close(); // return NoError2. Close current project:
ACAPI_Automate(APIDo_CloseID); //return APIERR_REFUSEDCMDBut nothing happens. I have no ideas about closing now.
2009-05-13 05:47 PM
2009-05-14 09:58 AM
API_WindowInfo windowInfo; BNZeroMemory (&windowInfo, sizeof (API_WindowInfo)); windowInfo.typeID = APIWind_FloorPlanID; // and try APIWind_WorksheetID typeId also windowInfo.index = 1; GSErrCode err = ACAPI_Database (APIDb_CloseWindowID, &windowInfo);But APIERR_REFUSEDPAR error code returns.
2009-05-14 11:53 AM
equilibrium wrote: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?
I tried to close file 2 ways.
1. By Name:
2009-05-14 05:49 PM
Ralph wrote:Hi, Ralph
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?