Ets_Nt_Subnet_Objview_Coords_Get()
Abstract
Gets the upper left and lower right coordinates of a subnet such that the coordinates enclose all the objects in the subnet view.
Syntax
Ets_Nt_Subnet_Objview_Coords_Get (subnet_hndl, ul_x_ptr, ul_y_ptr, lr_x_ptr, lr_y_ptr)
| Argument | Type | Description |
|---|---|---|
subnet_hndl |
EtsT_Obj_Handle |
Object handle of subnet whose coordinates should be retrieved. |
ul_x_ptr |
double * |
Pointer to x-position of upper left corner. |
ul_y_ptr |
double * |
Pointer to y-position of upper left corner. |
lr_x_ptr |
double * |
Pointer to x-position of lower right corner. |
lr_y_ptr |
double * |
Pointer to y-position of lower right corner. |
Return Type
EtsT_Compcode
EtsC_Compcode_Failure returned if subnet_hndl is not a subnet or subnet_hndl is not installed in a model, EtsC_Compcode_Success otherwise.
Header
ets_api_nt.h
Details
Coordinates are returned through the double pointer arguments. This is similar to Ets_Nt_Subnet_View_Coords_Get(), except that Ets_Nt_Subnet_Objview_Coords_Get() will not return coordinates for the entire subnet bounds, but only those coordinates that are enough to enclose all objects in the subnet view (plus a 15% margin). This makes this function ideal for capturing subnet images for web use. The Export to HTML operation uses this function.