int sds_command (int rtype, ...);
Execute this progeCAD command.
This function allows you to use any progeCAD command in an SDS program. Any following arguments will be used for that command. Each argument has two parts. As in public speaking, you tell the SDS program what you are going to tell it, and then tell it just that.
For example, to use the Line command, you need to tell the SDS program the command name, which is a string (RTSTR), "line". So far we have:
That gets us into the Line command. Now we need to provide the information that the Line command requests, which is (at least) two 3-D points (RT3DPOINT). These are written:
To end the Line command, enter another string, empty this time. To end the sds_command function enter RTNONE or 0 (zero).
To summarize, a complete line command from sds_command would look like this:
For the argument int rtype, any of the result types (RTxxx) are allowed. In each case, they are written as pairs, with the result types followed by the appropriate inputs, or variable names of the matching types, all separated by commas.
This function returns one of the following: RTNORM (the function executed normally), RTCAN (the user canceled the command), RTREJ (the command sequence was rejected by progeCAD), or RTERROR (some other error).
sds_getpoint(NULL,"\nFirst point for a line: ",point1);
sds_getpoint(point1,"\nSecond point: ",point2);
Tell me about...
Programming Overview of SDS (Solutions Development System)