C++
inline Acad::ErrorStatus saveAs( const ACHAR* fileName, const SecurityParams* pSecParams = 0 );
Description
Runs the save process on the database and writes the drawing information out to fileName. The fileName argument is taken as is. If no file extension is present, .dwg is not appended.
To specify security parameters, set pSecurity to point to a SecurityParams struct that conveys your preferences. If pSecurity is non-NULL, its settings override any previous database security settings. If pSecurity is NULL, any currently enforced security settings remain in effect. If no previous security-related settings were specified, and pSecurity is NULL, no security-related operation is attempted. If the SecurityParams struct passed as the pSecurity argument is not properly initialized, the method fails. See SecurityParams for more information on initializing this struct.
Returns Acad::eOk if the process completes successfully.
Parameters
Parameters | Description |
---|---|
fileName | Input file name or URL to write database out to |
pSecParams | Input pointer to a SecurityParams structure |
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.
Notes
Before calling this function, you must lock the document on the database. Otherwise, failures may occur.