SetSize Function
Updates the width and height of the bounding box of a given object item from an Envision document currently opened in the Canvas Envision Creator app.
Parameters
obj: EvItemAn Object item object, an object item from the Envision document currently opened in the Canvas Envision Creator app whose 2D dimensions should be updated.
width: numberA number, a new width of the given object item's bounding box in the length UoM global for the evCreate API.
height: numberA number, a new height of the given object item's bounding box in the length UoM global for the evCreate API.
transformed?: booleanA Boolean, a switch to indicate whether to update the 2D dimensions of the transformed (
true) or original (false) bounding box of the given object item.The default value is
false.refPoint?: EvRefPointA member of the
EvRefPointenumeration, a reference point on the bounding box of the given object item from which the new dimensions should be set. The Canvas Envision Creator updates the width and height so that the position of the given reference point remains unchanged.The default value is the top left corner:
"top_left".lockAspect?: booleanA Boolean, a switch to indicate whether to keep (
true) or not to keep (false) the existing aspect ratio of the given object item's bounding box when setting the new dimensions.When the aspect ratio is locked, the Canvas Envision Creator does not change the aspect ratio between the new width and height of the given object item's bounding box. It ignores the given height and calculates the new height based on the given width and old aspect ratio.
The default value is
false.scaleOutline?: booleanA Boolean, a switch to indicate whether to scale (
true) or not to scale (false) the thickness of the given object item's outline relatively to the new dimensions.The default value is
false.
Return value
Promise<void>A Promise that, if fulfilled, resolves to
voidif the width and height of the given object item's bounding box have been successfully updated.