ObjectArx view entity information DXF

Using (entget (car (entsel)) ) command to view information in DXF cad entity in
use acdbEntGet view arx function entity information DXF ()
void ZffChap5EntInfo ()
{
// prompts the user to select entity
ads_name entName;
ads_point Pt;
IF (acedEntSel ! (TEXT ( "\ n select entity:"), entName, Pt) = RTNORM)
return;

struct resbuf * rbEnt; // save the results buffer entity data
struct resbuf * rb; // for buffering results of the traverse rbEnt region

// get the data from the entities stored entName result buffer
rbEnt = acdbEntGet (entName);
RB = rbEnt;

the while (RB = NULL!)
{
Switch (RB-> restype)
{
Case -1: // entity name
acutPrintf (TEXT ( "\ n entity name: X%"), RB-> resval.rstring);
BREAK;
Case 0: // entity type
acutPrintf (TEXT ( "\ n element type:% s"), rb -> resval.rstring);
BREAK;
case 8: // layer
acutPrintf (TEXT ( "\ n layer:% S"), RB-> resval.rstring);
BREAK;
Case 10: // center
acutPrintf (TEXT ( "\ n circle: (%. . 2F,% .2f,% .2f) "),
RB-> resval.rpoint [X-],
RB-> resval.rpoint [the Y],
RB-> resval.rpoint [the Z]);
BREAK;
Case 40: / / radius
acutPrintf (TEXT ( ". \ n radius:% 4F"), RB-> resval.rreal);
BREAK;
Case 210: // round normal vector of the plane
acutPrintf (TEXT ( "\ n normal to the plane vector: (.%. 2F,% .2f,% .2f) "),
RB-> resval.rpoint [X-],
RB-> resval.rpoint [the Y],
RB-> resval.rpoint [the Z]);
BREAK ;
default:
BREAK;
} // switch

RB = RB-> rbnext; // switch to the next node
} // the while

IF (rbEnt!= NULL)
{
acutRelRb (rbEnt);
}
}

Original link: https: //blog.csdn.net/phd17621680432/article/details/102607902

Guess you like

Origin www.cnblogs.com/mjgw/p/12348067.html