flag = CwGetSelectionRectangle stem ("stem" is the name of a stem variable in which the results are stored. There are 4 fields of the stem that are set.) flag (boolean) True (1) if there is a selection rectangle to get, false otherwise. stem.X (numeric) The horizontal coordinate of the top-left corner of the selection rectangle stem.Y (numeric) The vertical coordinate of the top-left corner of the selection rectangle stem.Width (numeric) The width of the selection rectangle stem.Height (numeric) The height of the selection rectangle
The function CwGetSelectionRectangle gets the current selection rectangle if such a rectangle exists. If there is no selection rectangle, the return value is false (0) and the returned dimensions are invalid. Otherwise, the return value is true (1).
The point stem.X, stem.Y is actually the location of the center of the rectangle in the current unit. Stem.Width and stem.Height are the width and height of the rectangle, also in the current unit. The current unit is stored in the "Unit" property of the application-defined object "Output Settings".
/* Script to zoom to selection rectangle.*/ call CwGetSelectionRectangle rect call CwSetViewZoom rect.x, rect.y, rect.width, rect.height
Functions by NAME |
Index |
Functions by PURPOSE |