C++
ACDBCORE2D_PORT Acad::ErrorStatus saveAs( AcDwgFileHandle * pOutputFiler, const SecurityParams* pSecParams = 0, bool crashing = false );
Description
Runs the save process on the database and writes the drawing information out to pOutputFiler. If the database executing the saveAs() function is not the current database in the AutoCAD editor, then the thumbnail preview image is not saved.
To specify security parameters, set pSecParams to point to a SecurityParams struct that conveys your preferences. If pSecParams is non-NULL, its settings override any previous database security settings. If pSecParams is NULL, any currently enforced security settings remain in effect. If no previous security-related settings were specified, and pSecParams is NULL, no security-related operation is attempted. If the SecurityParams struct passed as the pSecParams argument is not properly initialized, the method fails. See SecurityParams for more information on initializing this struct.
If crashing is false, then no .bak file is created, a full save is always done, and if the AcDbDatabase being saved is the main database for a document in AutoCAD, then the document's filename will NOT change to the saved name.
Parameters
Parameters | Description |
---|---|
pOutputFiler | Input file pointer to write database out to |
pSecParams | Input pointer to a SecurityParams structure |
crashing | Input bool indicating whether or not to create a .bak file and change document name in AutoCAD |
Returns
Returns Acad::eOk if process completes successfully.
Remarks
DWG files can no longer be saved with passwords. The password will be ignored and returns an error if password information is passed in the pSecParams parameter.