Gets the drawing ID of a drawing.
ade_id
ade_dwggetid
char* dwgpathname);
Returns a drawing ID or ADE_NULLID.
| dwg_pathname | The path alias and drawing file name. |
The following sample creates a drive alias using ade_aliasadd() then obtains a drawing id using ade_dwggetid(). Information pertaining to the results of the operation is then displayed. Note, The drawing in question must be attached to the current project.
int resultCode = ade_aliasadd (
"ADSRX_SAMPLE",
"C:\\My Documents\\_MapAPI\\ADSRX\\Drawings");
char* pszDwgPathName = "ADSRX_SAMPLE:\\ForQuery.dwg";
ade_id dwgId = ade_dwggetid(pszDwgPathName);
if (ADE_NULLID != dwgId) {
acutPrintf(
"\nThe specified drawing \"%s\" has a drawing ID of: %.0lf"
, pszDwgPathName, dwgId);
}
else {
acutPrintf(
"\nNo ID could be obtained for the specified drawing.");
}


