ade_dwgproplist

Land Desktop Development ARX CPP SDK

Up a level
ade_dwgproplist
 
 

Lists all values found in a drawing for a given drawing property.

struct resbuf*

ade_dwgproplist(

ade_id dwg_id,

char* property);

Returns a resbuf list or NULL.

dwg_id Drawing ID.
property Property name. See Property Names below.

You must release the resbuf.

The function searches the given drawing and returns a list of the values it finds for the given drawing property.

Property Names
Name Return Value.
object_type AutoCAD object types.
blockname Block names.
linetype Line type names.
textstyle Text style names.
attrib Attribute tag names.
extents Computed extents. The most lower-left point and the most upper-right point in the drawing
For example: ((2.20286 4.99866) (20.4689 12.3563))
group Group names.
layer Layer names.
lpn Link templates. Note that link path names (LPNs) have been replaced by link templates in AutoCAD Map
objdata Names of object data tables.
mlinestyle Mline style.
feature Feature name.
lineweight Line weight.
plotstyle Plot style.

The following sample gets a drawing ID from an attached drawing using ade_dwggetid then parses the resbuf returned by ade_dwgproplist() and prints a list of object data tables found in the attached drawing. Then it releases the resbuf, as required.

char* pszDwgPathName = "MYDWGS:\\SanFranMarina_BlkGrp_OD.dwg";
ade_id dwgId = ade_dwggetid (pszDwgPathName);
char* pszPropValue = "objdata";
struct resbuf* pDwgPropertyRb = ade_dwgproplist(dwgId, pszPropValue);
if(pDwgPropertyRb != NULL) {
    struct resbuf* rb = pDwgPropertyRb;
    while(rb != NULL) {
        acutPrintf(
                "\nThe current drawing set contains the following %s information: %s"
                ,pszPropValue, rb->resval.rstring);
        rb = rb->rbnext;
    }
}
else{
    acutPrintf(
        "\nNo information could be retrieved.");
}
acutRelRb(pDwgPropertyRb);