int sds_nentselp (const char *prompt, sds_name entity-name, sds_point point, int userpick, sds_matrix ecs2wcs, struct sds_resbuf **nestblks);
Get information about this nested object.
This function works very much like sds_entsel but has features especially suited to dealing with objects nested within other objects, such as polyline vertices and block components.
Just as in sds_entsel, entity-name is the object selected, and point is the point used to select it. Also, here you have the option of prompting the user with prompt or using a predefined point with userpick, and a way to specify the prompt's wording.
There are two additional outputs with information specific to nested objects:
- A transformation matrix for converting from the entity's Coordinate System to the World Coordinate System;
- A linked list of objects in which the selected object is nested.
The prompt argument is the string that prompts the user for input. This argument may be null. If userpick is 1, this is not needed and is ignored. If userpick is 0, and this prompt is NULL, progeCAD displays the default pick prompt..
The argument entity-name is the name of the object selected.
The argument point variable serves two purposes:
point is used as the selection point.
sds_nentselp sets point to the point used to select the object.
The userpick argument is a toggle indicating whether to prompt the user to pick an object, or to accept the current value of entpoint as the pickpoint. If userpick is set to 0, the user is asked to pick an object. If userpick is 1, point is taken as the selection point.
The argument ecs2wcs is a transformation matrix for converting point from the Entity Coordinate System to the World Coordinate System in the case that the object is nested inside a block or blocks. If not, this is an identity matrix. In sds_nentselp this is a 4x4 transformation matrix, whereas in sds_nentsel it is a 4x3 matrix.
NOTE The 4x4 matrix of sds_nentselp is preferred. The other function, sds_nentsel, is available because some programs written for other CAD systems rely on it; however, you should not use it in a new program.
The nestblks argument is a linked list of nested blocks, in which the chosen object is contained. The first block in the list is the one that directly contains the object; the next contains the first, and so on.
This function returns RTNORM, RTCAN, RTERROR, or RTKWORD.
struct sds_resbuf *nestblks;
sds_nentselp("Pick your favorite object: ",entname, entpoint, userpick,
Tell me about...
Programming Overview of SDS (Solutions Development System)