Purpose
Enlarge or reduce objects with a scaling factor; corresponds to choosing Spatial > Edit > Modify > Scale. This function requires the MapCAD Tool and can be executed via the Exec() command. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Exec("MapCAD.mbx","CreateScaledObject", SourceObj, ScaleFactor, Anchor)
Return Value
Depending on the type of the source object. If no scaled object can be created or the function failed, the return object is a point(0,0).
Description
Use the CreateScaledObject function to scale (larger/smaller) a source object by a multiplication factor. The scaling is in reference to the anchor point.
Parameters | Description |
---|---|
SourceObj | Object value, All types |
ScaleFactor | Float value: specifies the multiplication factor. For example, a factor of 0.5 halves, a factor of 2 doubles. |
Anchor |
X, Y 1 = left, top 2 = center, top 3 = right, top 4 = left, center 5 = center, center 6 = right, center 7 = left, bottom 8 = center, bottom 9 = right, bottom |
Examples
'Create a new scaled object.
Dim NewObj as object
NewObj = Exec("MapCAD.mbx","CreateScaledObject", SourceObj ,0.5,5)