sds_entmake

int sds_entmake (const struct sds_resbuf *entity-list);


Make a new object with these properties.


This function creates an object in the drawing database, given the entity information for a new object. This is the reciprocal function to sds_entget.

The argument entlist represents a pointer to a linked list of sds_resbuf structures containing the object information for a new object. The following objects cannot be created: viewports, xrefs, xdefs, and xdeps.

The first or second buffer in the list must specify the entity type (a valid DXF entity type). When the first buffer does not specify the type, it must specify the entity name in the same format returned by sds_entget.

Text style names, linetype names, shape names, and block names must be already defined in the drawing before your pass the entity list to sds_entmake; the layer names are the exception. The list must not include the name of a handle.

To create a complex object, such as polyline or block, make more than one call to sds_entmake, with one call for each subentity. The complex entity is not added to the drawing until it is complete.

This function returns RTNORM (when it is successful), RTKWORD (when it creates the endblk of a block), or RTREG (when it cannot update the database) and sets system variable ERRNO to the reason code.

Example

sds_point point1 = {1.0,3.0,0.0};

sds_point point2 = {7.0,3.0,0.0};

entlist=sds_buildlist(RTDXF0, "line", // Entity type

8, "0", // Layer name

62, 70, // Color number

10, point1, // Starting point for the line

11, point2, // Ending point for the line

RTNONE); // List always ends with RTNONE or 0

sds_entmake(entlist);

Tell me about...

Programming Overview of SDS™ (Solutions Development System™)

sds_entget