Returns a list of attribute tags for the specified block name.
struct resbuf*
ade_dwgattriblist(
ade_id dwg_id,
char* block_name);
Returns a list of attribute tags or NULL.
dwg_id | The drawing ID of the attached drawing containing the "block_name". |
block_name | The name of the block for which to get attribute tags. |
This function returns a list of the attribute tags, given a block name from the specified drawing.
The following sample retrieves the ID of an attached drawing using ade_dwggetid() then parses the resbuf returned by ade_dwgattriblist() and prints a list of block attributes. Then it releases the resbufs, as required.
char* pszDwgPathName = "MYDWGS:\\994049-2blk.dwg"; ade_id dwgId = ade_dwggetid (pszDwgPathName); char* pszBlockName = "1BANK-TR"; struct resbuf* pBlkAttrbRb = ade_dwgattriblist(dwgId, pszBlockName); if(pBlkAttrbRb != NULL) { struct resbuf* rb = pBlkAttrbRb; acutPrintf( "\nA block named %s was found in %s and contains the following attributes: \n\n", pszBlockName, pszDwgPathName); while(rb != NULL) { acutPrintf( "\n%s", rb->resval.rstring); rb = rb->rbnext; } } else{ acutPrintf( "\n %s was not found in %s", pszBlockName, pszDwgPathName); } acutRelRb(pBlkAttrbRb);