Search:     Advanced search

Function ImageWidth

Article ID: 320
Last updated: 24 Sep, 2010
Views: 902
Posted: 30 Dec, 2008
by Thomas B.
Updated: 24 Sep, 2010
by Murray D.

Description:

Returns the width of the current image.  If the image is a raster or bitmap image such as TIF, then this would be the width of the image in pixels.  If the image is a vector format (such as DXF, or DWG), then this value will vary depending on the default units in that drawing.

Notes:

This does not return the scaled width of the page.  If you would like the overall width of the page in Feet, then you will need to multiply it by the ScaleX variable.

Also, since pages can be scaled both horizontally and vertically to compensate for out-of-proportion scans, you will need to multiply any width or X variables by ScaleX, and any height or Y variables by ScaleY.

Copy and paste code into a New PlanSwift Script.

Pascal Example:

ShowMessage(intToStr(ImageWidth * ScaleX));

Visual Basic Example:

ShowMessage(intToStr(ImageWidth * ScaleX))


Enterprise and Developer editions

This article was:  
Prev  Not what you're looking for? Suggest a topic  Next
Procedure ImageRefresh     Function ImageHeight