The ImportLayerToRegion transaction imports a layer onto a page and fits the layer into the given rectangle.
Type XTYP_EXECUTE or XTYP_REQUEST
Syntax [ImportLayerToRegion(docwinID, pageID, "fileName", "label", location, x1, y1, x2, y2, units, rotation, mode)]
|
Parameter |
Data type |
Values |
Meaning |
|
docwinID |
DWORD |
0 | docwinID |
active | specific |
|
pageID |
DWORD |
0 | pageID |
current | specific |
|
fileName |
file name including path of the layer file to import | ||
|
label |
string |
label, maximum 80 characters. See Remarks. | |
|
location |
WORD |
0 |
file on disk |
|
x1, y1 |
floats |
top-left coordinates. See Remarks. | |
|
x2, y2 |
floats |
bottom-right coordinates. See Remarks. | |
|
units |
WORD |
1 2 4 5 6 |
inches centimeters feet millimeters meters |
|
rotation |
WORD |
0 |
|
|
mode |
WORD |
1 |
place the image at position x1, y1. Ignore x2, y2. Do not scale the image. |
|
|
|
2 |
fit the layer exactly to the specified rectangle, without preserving the aspect. This may distort the image. |
|
|
|
3 |
fit the layer within the specified rectangle, while preserving the aspect |
|
Reply |
Data type |
Meaning | |
|
newLayerID |
WORD |
identifer of the new layer created from the import. See Remarks. | |
Remarks
The label string replaces the label previously assigned to this layer.
The coordinates for this transaction mimic the AutoCAD coordinate system. In this system, the y axis is positive moving in the up direction, and the x axis is positive moving to the right. (In most other transactions, the y axis is positive moving in the down direction.)
Replies are only returned when this transaction is called as an XTYP_REQUEST.
Release information
Added in Release 4.42.
See also