How to Get Default Drawing Format

By Madhukar Moogala

I have recently received a query from an ADN partner whether it is possible to get default Save As format details from an API or Command, I’m not sure if we have command to get, but we do have a simple API to get the details.

 

SaveAS

Following tiny code snippet will give details of

 
void testDWGFormatDefault()
{
/*The format mentioned in Options/ Open and Save*/
AcApDocument ::SaveFormat saveFormat =
acDocManagerPtr()->defaultFormatForSave();
AcDb::AcDbDwgVersion dwgVersion;
AcDb::MaintenanceReleaseVersion maintainRelVersion;
AcApDocument* pCurDoc = acDocManagerPtr()->curDocument();
/*To get relevant dwg and mReleaseVersions*/
if( !eOkVerify(pCurDoc->getDwgVersionFromSaveFormat(saveFormat,
dwgVersion,
maintainRelVersion)))
return;
}

Comments

One response to “How to Get Default Drawing Format”

  1. Only ObjectARX 2015 and 2016 have method AcApDocument::getDwgVersionFromSaveFormat

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading