Copyright: Copyright © 1997 Intergraph Corporation.


ImageScape LT Programming Help

This Help file describes the automation interfaces for ImageScape LT.

ImageDocument

ContrastBrightness

Fill

ImageAttributes

Invert

Position

SaveImage

SelectArea

Undo


ImageDocument

Description

The ImageDocument object is an OLE document that contains one image.  The file type of an image must be registered as an ImageScape document before it can be linked into an OLE container and accessed through the ImageScape LT automation interfaces.  For example, to insert and manipulate an Intergraph grayscale image named example.cot, the key in this example must exist in the Windows system registry database.

ContrastBrightness Property

Fill Property

Invert Property

ImageAttributes Property

Position Property

SaveImage Property

SelectArea Property

TransformFromSmartFramePoint Method

TransformToSmartFramePoint Method

Undo Property

UpdateImage Method


Invert Property

Purpose

The Invert property of the ImageDocument OLE object.

Syntax

object.Invert

Elements

object

Required.  The ImageDocument object.

Example

Dim objInvert as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objInvert = ImageDocument.Invert


Fill Property

Purpose

The Fill property of the ImageDocument OLE object.

Syntax

object.Fill

Elements

object

Required.  The ImageDocument object.

Example

Dim objFill as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objFill = ImageDocument.Fill


ContrastBrightness Property

Purpose

The ContrastBrightness property of the ImageDocument OLE object.

Syntax

object.ContrastBrightness

Elements

object

Required.  The ImageDocument object.

Example

Dim objCB as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objCB = ImageDocument.ContrastBrightness


SaveImage Property

Purpose

The SaveImage property of the ImageDocument OLE object.

Syntax

object.SaveImage

Elements

object

Required.  The ImageDocument object.

Example

Dim objSave as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objSave = ImageDocument.SaveImage


ImageAttributes Property

Purpose

The ImageAttributes property of the ImageDocument OLE object.

Syntax

object.ImageAttributes

Elements

object

Required.  The ImageDocument object.

Example

Dim objAttr as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objAttr = ImageDocument.ImageAttributes


Position Property

Purpose

The Position property of the ImageDocument OLE object.

Syntax

object.Position

Elements

object

Required.  The ImageDocument object.

Example

Dim objPos as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objPos = ImageDocument.Position


SelectArea Property

Purpose

The SelectArea property of the ImageDocument OLE object.

Syntax

object.SelectArea

Elements

object

Required.  The ImageDocument object.

Example

Dim objSA as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objSA = ImageDocument.SelectArea


TransformFromSmartFramePoint Method

Purpose

The TransformFromSmartFramePoint method of the ImageDocument object.  It is used to convert a point expressed in SmartFrame coordinates to its equivalent in Imagineer coordinates.  SmartFrame can have scale, rotation, and origin different from those of the Imagineer design space.  This method can be used to convert between the systems.  Note that even though this method performs exactly the opposite of the TransformToSmartFramePoint method, the parameters for the two methods are exactly the same.

Syntax

object.TransformFromSmartFramePoint InPointX, InPointY, OutPointX, OutPointY, Scale, Rotation, OriginX, OriginY

Elements

object

Required.  The command helper object.

InPointX

Required.  The X coordinate of the input point.

InPointY

Required.  The Y coordinate of the input point.

OutPointX

Required.  The X coordinate of the output point.

OutPointY

Required.  The Y coordinate of the output point.

Scale

Required.  The scale of the SmartFrame.

Rotation

Required.  The rotation of the SmartFrame.

OriginX

Required.  The X coordinate of the origin point of the SmartFrame.

OriginY

Required.  The Y coordinate of the origin point of the SmartFrame.

Example

Dim app As Object

Dim objFrames As Object

Dim objFrame As Object

Dim objSelectSet As Object

Dim objPoly As Object

Dim ImageDocument As Object

Dim objPosition As Object

Dim objSelectArea As Object

Dim SF_scale As Double, SF_rotation As Double

Dim SF_OriginX As Double, SF_OriginY As Double

Dim OutX As Double, OutY As Double

Dim xy() As Double

Dim xx() As Double, yy() As Double

Dim xx2() As Double, yy2() As Double, NumOfPointsPerOutlineArray() As Double

Dim n As Long

Set app = GetObject(, "Imagineer.Application")

Set objSFrames = app.ActiveDocument.ActiveSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objSelectSet = app.ActiveSelectSet

Call objSelectSet.Add(objSmartFrame)

Set ImageDocument = objSFrame.object

Set objPosition = ImageDocument.Position

Call objPosition.PositionByHeaderMatrix(100#, 1#, 59, 0#, 0#)

Dim x As Double, y As Double, s As Double, r As Double

x = objPosition.CurrentOriginX

y = objPosition.CurrentOriginY

s = objPosition.CurrentScale

r = objPosition.CurrentRotation

Dim tmpFrame As Imagineer.SmartFrame2d

Set tmpFrame = objSmartFrame

Call tmpFrame.[Scale](s)

Call objSmartFrame.Rotate(r, 0#, 0#)

Call objSmartFrame.SetOrigin(x, y)

ImageDocument.UpdateImage

objSmartFrame.SendToBack

n = 5

ReDim xy(n * 2)

ReDim xx(n)

ReDim yy(n)

ReDim xx2(n)

ReDim yy2(n)

ReDim NumOfPointsPerOutlineArray(1)

yy(0) = 20#

yy(1) = 50#

yy(2) = 50#

yy(3) = 20#

yy(4) = 20#

xx(0) = 30#

xx(1) = 30#

xx(2) = 40#

xx(3) = 40#

xx(4) = 30#

Set objSelectArea = ImageDocument.SelectArea

objSelectArea.PutPoints n, yy, xx

objSelectArea.CreateNew

NumOfPointsPerOutlineArray(0) = 5

objSelectArea.GetPoints n, 1, NumOfPointsPerOutlineArray, yy2, xx2

SF_rotation = objSmartFrame.RotationAngle

SF_scale = objSmartFrame.ScaleFactor

Call objSmartFrame.GetOrigin (SF_OriginX, SF_OriginY)

j = 0

For i = 0 To (n - 1)

j = i * 2

objImage.TransformFromSmartFramePoint xx2(i), yy2(i), OutX, OutY, SF_scale, SF_rotation, SF_OriginX, SF_OriginY

xy(j) = OutX

xy(j+1) = OutY

Next i

Set objPoly = app.ActiveDocument.ActiveSheet.LineStrings2d.AddByPoints(n, xy)


TransformToSmartFramePoint Method

Purpose

The TransformToSmartFramePoint method of the ImageDocument object.  It is used to convert a point expressed in Imagineer's coordinates to its equivalent in SmartFrame coordinates.  ImageScape LT always works with SmartFrame when it comes to XY coordinates of a point in an Imagineer file.  However, SmartFrame can have scale, rotation, and origin different from those in the Imagineer design space.  This method is useful if the point collected from the mouse needs to be inputted into one of ImageScape LT's methods or properties.

Syntax

object.TransformToSmartFramePoint InPointX, InPointY, OutPointX, OutPointY, Scale, Rotation, OriginX, OriginY

Elements

object

Required.  The command helper object.

InPointX

Required.  The X coordinate of the input point.

InPointY

Required.  The Y coordinate of the input point.

OutPointX

Required.  The X coordinate of the output point.

OutPointY

Required.  The Y coordinate of the output point.

Scale

Required.  The scale of the SmartFrame.

Rotation

Required.  The rotation of the SmartFrame.

OriginX

Required.  The X coordinate of the origin point of the SmartFrame.

OriginY

Required.  The Y coordinate of the origin point of the SmartFrame.

Example

Dim app As Object

Dim objFrames As Object

Dim objFrame As Object

Dim objSelectSet As Object

Dim objPoly As Object

Dim ImageDocument As Object

Dim objPosition As Object

Dim objSelectArea As Object

Dim SF_scale As Double, SF_rotation As Double

Dim SF_OriginX As Double, SF_OriginY As Double

Dim OutX As Double, OutY As Double

Dim xy() As Double, xy2() As Double

Dim xx() As Double, yy() As Double

Dim n As Long

Set app = GetObject(, "Imagineer.Application")

Set objSFrames = app.ActiveDocument.ActiveSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objSelectSet = app.ActiveSelectSet

Call objSelectSet.Add(objSmartFrame)

Set ImageDocument = objSFrame.object

Set objPosition = ImageDocument.Position

Call objPosition.PositionByHeaderMatrix(100#, 1#, 59, 0#, 0#)

Dim x As Double, y As Double, s As Double, r As Double

x = objPosition.CurrentOriginX

y = objPosition.CurrentOriginY

s = objPosition.CurrentScale

r = objPosition.CurrentRotation

Dim tmpFrame As Imagineer.SmartFrame2d

Set tmpFrame = objSmartFrame

Call tmpFrame.[Scale](s)

Call objSmartFrame.Rotate(r, 0#, 0#)

Call objSmartFrame.SetOrigin(x, y)

ImageDocument.UpdateImage

objSmartFrame.SendToBack

SF_rotation = objSmartFrame.RotationAngle

SF_scale = objSmartFrame.ScaleFactor

Call objSmartFrame.GetOrigin (SF_OriginX, SF_OriginY)

n = 5

ReDim xy(n * 2)

ReDim xy2(n * 2)

ReDim xx(n)

ReDim yy(n)

xy(0) = 3#

xy(1) = -2#

xy(2) = 3#

xy(3) = -5#

xy(4) = 4#

xy(5) = -5#

xy(6) = 4#

xy(7) = -2#

xy(8) = 3#

xy(9) = -2#

Set objPoly = app.ActiveDocument.ActiveSheet.LineStrings2d.AddByPoints(n, xy)

objPoly.GetVertices n, xy2

j = 0

For i = 0 To (n - 1)

j = i * 2

objImage.TransformToSmartFramePoint xy2(j), xy2(j + 1), OutX, OutY, SF_scale, SF_rotation, SF_OriginX, SF_OriginY

xx(i) = OutX

yy(i) = OutY

Next i

Set objSelectArea = ImageDocument.SelectArea

objSelectArea.PutPoints n, yy, xx

objSelectArea.CreateNew

Set tmpFrame = objSmartFrame

Call tmpFrame.[Scale](s)

Call objSmartFrame.Rotate(r, 0#, 0#)

Call objSmartFrame.SetOrigin(x, y)

objImage.UpdateImage

objSmartFrame.SendToBack

n = 5

ReDim xy(n * 2)

ReDim xy2(n * 2)

ReDim xx(n)

ReDim yy(n)

xy(0) = 3#

xy(1) = -2#

xy(2) = 3#

xy(3) = -5#

xy(4) = 4#

xy(5) = -5#

xy(6) = 4#

xy(7) = -2#

xy(8) = 3#

xy(9) = -2#

Set objPoly = app.ActiveDocument.ActiveSheet.LineStrings2d.AddByPoints(n, xy)

objPoly.GetVertices n, xy2

SF_rotation = objSmartFrame.RotationAngle

SF_scale = objSmartFrame.ScaleFactor

Call objSmartFrame.GetOrigin (SF_OriginX, SF_OriginY)

j = 0

For i = 0 To (n - 1)

j = i * 2

objImage.TransformToSmartFramePoint xy2(j), xy2(j + 1), OutX, OutY, SF_scale, SF_rotation, SF_OriginX, SF_OriginY

xx(i) = tempX

yy(i) = tempY

Next i

Set objSelectArea = ImageDocument.SelectArea

objSelectArea.PutPoints n, yy, xx

objSelectArea.CreateNew


Undo Property

Purpose

The Undo property of the ImageDocument OLE object.

Syntax

object.Undo

Elements

object

Required.  The ImageDocument object.

Example

Dim objUndo as Object

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

Set objUndo = ImageDocument.Undo


UpdateImage Method

Purpose

The UpdateImage method of the ImageDocument OLE object.  It is used to force a refresh of the data displayed in the OLE container object.

Syntax

object.UpdateImage

Elements

object

Required.  The ImageDocument object.

Example

Dim app As Object

Dim objSheet As Object

Dim objFrame As Object

Dim objFrames As Object

Dim ImageDocument As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set ImageDocument = objSFrame.object

ImageDocument.UpdateImage


Registry key for image registration

[HKEY_CLASSES_ROOT\.cot] = "ImageScape.Document"


ContrastBrightness

Description

The ContrastBrightness object has methods for setting parameters that adjust the contrast or brightness of an image.

AbortPreview Method

ActivePreviewBuffer Property

Brightness Property

Contrast Property

CopyActiveParameters Method

Description Property

DisplayPreview Method

DisplayRawDataForPreview Method

Edit Method

EndPreview Method

GetLastDisplayedPreview Method

IsValid Property

LoadPreferences Method

StartPreview Method


AbortPreview Method

Purpose

The AbortPreview method aborts a preview without finishing the current preview display.  This will also end your preview session.

Syntax

object.AbortPreview

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Op.AbortPreview


ActivePreviewBuffer Property

Purpose

The ActivePreviewBuffer property determines which buffer to use for calculating and displaying preview data.  The available options are igBuffer1, igBuffer2, and igBuffer3.  The ActivePreviewBuffer property is a read-write enumerator of type ImagePreviewBuffer.

Syntax

object.ActivePreviewBuffer

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description = "ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Op.ActivePreviewBuffer = igBuffer3

Op.Contrast = 50

Call Op.DisplayPreview(igBuffer3)

Call Op.DisplayPreview(igBuffer2)

Call Op.DisplayPreview(igBuffer3)

Call Op.DisplayPreview(igBuffer2)

Mode = Op.LastDisplayedPreview

Op.ActivePreviewBuffer = Mode

Op.EndPreview

Op.Edit


Brightness Property

Purpose

The Brightness property enables you to slide the line used to adjust the image pixel values to the left (darker; negative values) or right (lighter; positive values).

Syntax

object.Brightness

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim Val as Integer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Val = Op.Brightness

Op.Brightness = Val + 10

Op.Edit


Contrast Property

Purpose

The Contrast property represents the slope of the line used to adjust the image pixel values.  The Contrast property is a read-write short between -100 and 100.

Syntax

object.Contrast

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim Val as Integer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Val = Op.Contrast

Op.Contrast = Val + 10

Op.Edit


CopyActiveParameters Method

Purpose

The CopyActiveParameters method copies the values of the parameters associated with the active preview mode to the parameters of the specified mode.  The available options are igBuffer1, igBuffer2, or igBuffer3.

Syntax

object.CopyActiveParameters(To Mode)

Elements

object

Required.  The ContrastBrightness object.

ToMode

The preview mode to copy whose parameters are to be changed.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Op.ActivePreviewBuffer = igBuffer1

Call Op.DisplayPreview(igBuffer1)

Call Op.CopyActiveParameters(igBuffer2)

Op.EndPreview


Description Property

Purpose

The Description property sets or gets the description of the command.  The Description property is a read-write string.

Syntax

object.Description = ("text")

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Op.Edit


DisplayPreview Method

Purpose

The DisplayPreview method is called to calculate (if necessary) and display the current preview data for the specified preview buffer.  The available options are igBuffer1, igBuffer2, or igBuffer3.

Syntax

object.DisplayPreview(PreviewMode)

Elements

object

Required.  The ContrastBrightness object.

PreviewMode

The preview mode that determines the preview data to display.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Op.EndPreview


DisplayRawDataForPreview Method

Purpose

The DisplayRawDataForPreview method is called to display raw pixel data (original).  The available options are igBuffer1, igBuffer2, or igBuffer3.

Syntax

object.DisplayRawDataForPreview (PreviewMode)

Elements

object

Required.  The ContrastBrightness object.

PreviewMode

The preview mode which determines the preview data to display.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Call Op.DisplayRawDataForPreview(Mode)

Op.EndPreview


Edit Method

Purpose

The Edit method edits the image, or creates and/or modifies the lookup table on the image.

Syntax

object.Edit

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then

Op.Edit

Endif


EndPreview Method

Purpose

The EndPreview method is called to end preview after the current preview display finishes.

Syntax

object.EndPreview

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Op.EndPreview


GetLastDisplayedPreview Method

Purpose

The GetLastDisplayedPreview method is used to determine which preview mode was used during the last call to DisplayPreview.  The available options are igBuffer1, igBuffer2, or igBuffer3.

Syntax

object.GetLastDisplayedPreview(LastMode)

Elements

object

Required.  The ContrastBrightness object.

LastMode

The returned preview mode.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Call Op.GetLastDisplayedPreview(Mode)

Call Op.DisplayPreview(Mode)

Op.EndPreview


IsValid Property

Purpose

The IsValid property indicates whether the operation is valid for the current image.  The values returned are igValid, igInvalid, and igValidNoPreview.

Syntax

object.IsValid

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim dVal as Double

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then

Op.Edit

Endif


LoadPreferences Method

Purpose

The LoadPreferences method loads the preference packet into memory.  If no preference packet exists, it creates one with default values.

Syntax

object.LoadPreferences

Elements

object

Required.  The ContrastBrightness object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim dVal as Double

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


StartPreview Method

Purpose

The StartPreview method is called to initialize a preview using the specified view as a reference.

Syntax

object.StartPreview(pView)

Elements

object

Required.  The ContrastBrightness object.

pView

The IDispatch interface of the view to use for setting up preview.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim dVal as Double

Dim View As Object

Dim Mode As ImagePreviewBuffer

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif

Set Op = image.ContrastBrightness

Op.LoadPreferences

Op.Description ="ContrastBrightness"

Set View = app.ActiveWindow

Call Op.StartPreview(View)

Mode = Op.ActivePreviewBuffer

Call Op.DisplayPreview(Mode)

Op.EndPreview


Fill

Description

The Fill object contains methods and properties to fill the select area of an image with the Paint or Erase color.

ColorMode Property

DataType Property

Description Property

Edit Method

IsGrayScale Property

IsValid Property

LoadPreferences Method

Opacity Property


ColorMode Property

Purpose

The ColorMode property sets or gets the color mode.  The ColorMode property is an integer.  0 (the default) indicates Paint color, and 1 indicates Erase color.

Syntax

object.ColorMode

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

Op.ColorMode = 0

Op.Opacity = 55

If (Op.IsValid = igValid or Op.IsValid = igInvalid) Then Op.Edit

Endif


DataType Property

Purpose

The DataType property returns the data type of the current image.  The returned value is an enumerator of type ImageDataType.

Syntax

object.DataType

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim dataType

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

dataType = Op.DataType


Description Property

Purpose

The Description property sets or gets the description of the command.  The Description property is a read-write string.

Syntax

object.Description = ("text")

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

Op.Edit


Edit Method

Purpose

The Edit method edits the image, or creates and/or modifies the lookup table on the image.

Syntax

object.Edit

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


IsGrayScale Property

Purpose

The IsGrayScale property returns whether or not the image is a grayscale image.  The returned value is an enumerator of type ImageBooleanType.

Syntax

object.IsGrayScale

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Dim isGray

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

isGray = Op.IsGrayScale


IsValid Property

Purpose

The IsValid property indicates whether the operation is valid for the current image.  The values returned are igValid, igInvalid, and IgValidNoPreview.

Syntax

object.IsValid

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


LoadPreferences Method

Purpose

The LoadPreferences method loads the preference packet into memory.  If no preference packet exists, one with default values is created.

Syntax

object.LoadPreferences

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


Opacity Property

Purpose

The Opacity property sets or gets the Opacity.  The Opacity is a percentage integer.  The minimum value is 0, and the maximum value is 100 (the default).  This property is not used for binary or color-indexed images.

Syntax

object.Opacity

Elements

object

Required.  The Fill object.

Example

Dim dVal as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Fill

Op.LoadPreferences

Op.Description = "Fill"

Op.ColorMode = 0

Op.Opacity = 55

If (Op.IsValid = igValid or Op.IsValid = igInvalid) Then Op.Edit

Endif


ImageAttributes

Description

ImageAttributes obtains several properties of the selected image.  Any raster data valid to the application is valid to this command, except for the color-related properties.  Some of the attributes can be set.  It is possible to convert multiple images at once, as long as all of the images are of the same data type.

DataFormat Property

DataType Property

FileType Property

Height Property

ImageFileName Property

ImageFileSize Property

LoadPreferences Method

NumberOfLines Property

Orientation Property

PixelsPerLine Property

ResolutionInMicron Property

ResolutionInUnit Property

UnitInMetric Property

Width Property


DataFormat Property

Purpose

The DataFormat property returns the compression type of the selected image(s) as an ImageFormatType enumerator.

Syntax

object.DataFormat

Elements

object

Required.  The ImageAttributes object.

Example

Dim val As Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.DataFormat


DataType Property

Purpose

The DataType property returns the actual data type of the selected image as an ImageDataType enumerator.

Syntax

object.DataType

Elements

object

Required.  The ImageAttributes object.

Example

Dim val

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.DataType


FileType Property

Purpose

The FileType property returns the file type of the selected image(s) as an ImageFileType enumerator.

Syntax

object.FileType

Elements

object

Required.  The ImageAttributes object.

Example

Dim val

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.FileType


Height Property

Purpose

The Height property returns the actual height of the image stored in the header.

Syntax

object.Height

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

Op.LoadPreferences

val = Op.Height


ImageFileName Property

Purpose

The ImageFileName property is a static display of the selected image file name.

Syntax

object.ImageFileName

Elements

object

Required.  The ImageAttributes object.

Example

Dim str1 as String

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

str1 = Op.ImageFileName


ImageFileSize Property

Purpose

The ImageFileSize property returns the size of the current file.

Syntax

object.ImageFileSize

Elements

object

Required.  The ImageAttributes object.

Example

Dim str1 as Date

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

str1 = Op.ImageFileSize


LoadPreferences Method

Purpose

The LoadPreferences method loads user preferences related to ImageAttributes.  If no preference has yet been created, this method creates a mechanism to save preferences, and sets the values to the default values.  This method must be called prior to using any properties of the ImageAttributes object which are related to units, or which are saved between sessions.  Currently, the only saved preference is the UnitInMetric property.  Note that the ResolutionInUnit property internally accesses the UnitInMetric property, and thus requires that LoadPreferences be called first.

Syntax

object.LoadPreferences

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

Op.LoadPreferences

val = Op.UnitInMetric


NumberOfLines Property

Purpose

The NumberOfLines property returns the number of lines in the current image.

Syntax

object.NumberOfLines

Elements

object

Required.  The ImageAttributes object.

Example

Dim val As Long

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.NumberOfLines


Orientation Property

Purpose

The Orientation property returns the scanline orientation of the current image as an ImageOrientationType enumerator.

Syntax

object.Orientation

Elements

object

Required.  The ImageAttributes object.

Example

Dim val

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.Orientation


PixelsPerLine Property

Purpose

The PixelsPerLine property returns the number of pixels per line in the current image.

Syntax

object.PixelsPerLine

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Long

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.PixelsPerLine


ResolutionInMicron Property

Purpose

The ResolutionInMicron property returns the resolution of the current image in microns.

Syntax

object.ResolutionInMicron

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

val = Op.ResolutionInMicron


ResolutionInUnit Property

Purpose

The ResolutionInUnit property returns the resolution of the selected image in pixels per inch or pixels per centimeter.

Syntax

object.ResolutionInUnit

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

Op.LoadPreferences

val = Op.ResolutionInUnit


UnitInMetric Property

Purpose

The UnitInMetric property shows the user if the units on the selected image are metric units.  It returns an ImageBooleanType enumerator.

Syntax

object.UnitInMetric

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

Op.LoadPreferences

val = Op.UnitInMetric


Width Property

Purpose

The Width property returns the actual width of the image stored in the header.

Syntax

object.Width

Elements

object

Required.  The ImageAttributes object.

Example

Dim val as Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.ImageAttributes

Op.LoadPreferences

val = Op.Width


Invert

Description

The Invert object contains properties to invert an image.

Description Property

Edit Method

IsValid Property

LoadPreferences Method


Description Property

Purpose

The Description property sets or gets the description of the command.  The Description property is a read-write string.

Syntax

object.Description

Elements

object

Required.  The Invert object.

Example

Dim image As Object

Dim Op As Object

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set Op = image.Invert

Op.LoadPreferences

Op.Description = "Invert"

Op.Edit


Edit Method

Purpose

The Edit method edits the image, or creates and/or modifies the lookup table on the image.

Syntax

object.Edit

Elements

object

Required.  The Invert object.

Example

Dim image As Object

Dim App As Object

Dim Op As Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set Image = objSFrame.object

Op.LoadPreferences

Op.Description = "Invert"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


IsValid Property

Purpose

The IsValid property indicates whether the operation is valid for the current image.  The values returned are igValid, igInvalid, and igValidNoPreview.

Syntax

object.IsValid

Elements

object

Required.  The Invert object.

Example

Dim dVal as Double

Dim image As Object

Dim Op As Object

Dim App As Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set Image = objSFrame.object

Op.LoadPreferences

Op.Description = "Invert"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


LoadPreferences Method

Purpose

The LoadPreferences method loads the preference packet into memory.  If no preference packet exists, one with default values is created.

Syntax

object.LoadPreferences

Elements

object

Required.  The Invert object.

Example

Dim dVal as Double

Dim image As Object

Dim Op As Object

Dim App As Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set Image = objSFrame.object

Op.LoadPreferences

Op.Description = "Invert"

If (Op.IsValid = igValid or Op.IsValid = igValidNoPreview) Then Op.Edit

Endif


Position

Description

The Position object enables you to move, scale and rotate a source image (to match a target image or vector frame, for example).

CurrentOriginX Property

CurrentOriginY Property

CurrentOriginZ Property

CurrentRotation Property

CurrentScale Property

GetLowerLeftCorner Method

GetLowerRightCorner Method

GetUpperLeftCorner Method

GetUpperRightCorner Method

IsImageRowMajor Property

IsPointWithinImage Method

Move Method

PositionBy2Pts Method

PositionByHeaderMatrix Method

PutSourcePoint Method

PutTargetPoint Method

ReleaseSmartFrameObject Method

RestrictionAngle Property

Rotate Method

RotateAndScale Method

Scale Method

SmartFrameObject Property

TransformUsingPoints Method


CurrentOriginX Property

Purpose

The CurrentOriginX property enables you to read the value of the current x coordinate of the image's origin.

Syntax

x = Op.CurrentOriginX, where x is of type double.

Elements

Op

Required.  The Position object.

Example

x = Op.CurrentOriginX


CurrentOriginY Property

Purpose

The CurrentOriginY property enables you to read the value of the current y coordinate of the image's origin.

Syntax

y = Op.CurrentOriginY, where y is of type double.

Elements

Op

Required.  The Position object.

Example

y = Op.CurrentOriginY


CurrentOriginZ Property

Purpose

The CurrentOriginZ property enables you to read the value of the current z coordinate of the image's origin.

Syntax

z = Op.CurrentOriginZ, where z is of type double.

Elements

Op

Required.  The Position object.

Example

z = Op.CurrentOriginZ


CurrentRotation Property

Purpose

The CurrentRotation property enables you to read the value of the current image's rotation.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

x = Op.CurrentRotation, where x is of type double.

Elements

Op

Required.  The Position object.

Example

x = Op.CurrentRotation


CurrentScale Property

Purpose

The CurrentScale property enables you to read the value of the current image's scale.  You must first set the SmartFrameObject property before calling this property.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

x = Op.CurrentScale, where x is of type double.

Elements

Op

Required.  The Position object.

Example

x = Op.CurrentScale


GetLowerLeftCorner Method

Purpose

The GetLowerLeftCorner method reads the x and y coordinates of the lower left corner of the image.

Syntax

Op.GetLowerLeftCorner(x,y)

Elements

Op

Required.  The Position object.

x

Required.  Type double.  On return from call, will hold x coordinate.

y

Required.  Type double.  On return from call, will hold y coordinate.

Example

Call Op.GetLowerLeftCorner(x,y)


GetLowerRightCorner Method

Purpose

The GetLowerRightCorner method reads the x and y coordinates of the lower right corner of the image.

Syntax

Op.GetLowerRightCorner(x,y)

Elements

Op

Required.  The Position object.

x

Required.  Type double.  On return from call, will hold x coordinate.

y

Required.  Type double.  On return from call, will hold y coordinate.

Example

Call Op.GetLowerRightCorner(x,y)


GetUpperLeftCorner Method

Purpose

The GetUpperLeftCorner method reads the x and y coordinates of the upper left corner of the image.

Syntax

Op.GetUpperLeftCorner(x,y)

Elements

Op

Required.  The Position object.

x

Required.  Type double.  On return from call, will hold x coordinate.

y

Required.  Type double.  On return from call, will hold y coordinate.

Example

Call Op.GetUpperLeftCorner(x,y)


GetUpperRightCorner Method

Purpose

The GetUpperRightCorner method reads the x and y coordinates of the upper right corner of the image.

Syntax

Op.GetUpperRightCorner(x,y)

Elements

Op

Required.  The Position object.

x

Required.  Type double.  On return from call, will hold x coordinate.

Op

Required.  Type double.  On return from call, will hold y coordinate.

Example

Call Op.GetUpperRightCorner(x,y)


IsImageRowMajor Property

Purpose

The IsImageRowMajor property indicates whether the image is row major.  The return value is an ImageBooleanType enumerator.

Syntax

Op.IsImageRowMajor()

Elements

Op

Required.  The Position object.

Example

Dim flag

flag = Op.IsImageRowMajor


IsPointWithinImage Method

Purpose

The IsPointWithinImage method indicates whether the specified point lies within the image.  The return value is an ImageBooleanType enumerator.

Syntax

Op.IsPointWithinImage(x,y)

Elements

Op

Required.  The Position object.

x

Required.  Type double.  X coordinate of the point to be evaluated.

y

Required.  Type double.  Y coordinate of the point to be evaluated.

Example

Dim flag

flag=Op.IsPointWithinImage x, y


Move Method

Purpose

The Move method moves the image from a source to a destination.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

Op.Move(FromX, FromY, ToX, ToY)

Elements

Op

Required.  The Position object.

FromX

Required.  Type double.  The x coordinate of the source point.

FromY

Required.  Type double.  The y coordinate of the source point.

ToX

Required.  Type double.  The x coordinate of the destination point.

ToY

Required.  Type double.  The y coordinate of the destination point.

Example

Call Op.Move(FromX, FromY, ToX, ToY)


PositionBy2Pts Method

Purpose

The PositionBy2Pts method positions the image with two points that define the range of the image.

Syntax

Op.PositionBy2Pts(MinX, MinY, MaxX, MaxY)

Elements

Op

Required.  The Position object.

MinX

Required.  Type double.  The x coordinate of the lower left corner of the image.

MinY

Required.  Type double.  The y coordinate of the lower left corner of the image.

MaxX

Required.  Type double.  The x coordinate of the upper right corner of the image.

MaxY

Required.  Type double.  The y coordinate of the upper right corner of the image.

Example

Call Op.PositionBy2Pts(MinX, MinY, MaxX, MaxY)


PositionByHeaderMatrix Method

Purpose

The PositionByHeaderMatrix method positions the image as specified by the transformation matrix in the raster file header.

Syntax

Op.PositionByHeaderMatrix(SUperMU, PUperSU, UnitsType, xShift, yShift)

Elements

Op

Required.  The Position object.

SUperMU

Required.  Type double.  Subunits per master unit as defined in the design file.

PUperSU

Required. Type double.  Positional units per subunit as defined in the design file.

UnitsType

Required.  Type double.  Possible values are as follows:

•	Meters—59

•	Millimeters—61

•	Centimeters—62

•	Kilometers—63

•	Inches—64

•	Feet—65

•	Yards—66

•	Miles—67

xShift

Required.  Type double.  For future use.  Must be 0.0.

yShift

Required.  Type double.  For future use.  Must be 0.0.

Example

Call Op.PositionByHeaderMatrix(12.0, 100.0, 65, 0.0, 0.0)


PutSourcePoint Method

Purpose

The PutSourcePoint method sets the source points used by TransformUsingPoints.

Syntax

Op.PutSourcePoint(SourcePointNum, SourcePointX, SourcePointY)

Elements

Op

Required.  The Position object.

SourcePointNum

Required.  Type integer.  The number of the source point to be set.  Valid values are 1 and 2.

SourcePointX

Required.  Type double.  The x coordinate of the source point.

SourcePointY

Required.  Type double.  The y coordinate of the source point.

Example

Call Op.PutSourcePoint(1,SourcePointX,SourcePointY)


PutTargetPoint Method

Purpose

The PutTargetPoint method sets the target points used by TransformUsingPoints.

Syntax

Op.PutTargetPoint(TargetPointNum, TargetPointX, TargetPointY)

Elements

Op

Required.  The Position object.

TargetPointNum

Required.  Type integer.  The number of the target point to be set.  Valid values are 1 and 2.

TargetPointX

Required.  Type double.  The x coordinate of the target point.

TargetPointY

Required.  Type double.  The y coordinate of the target point.

Example

Call Op.PutTargetPoint(2,TargetPointX,TargetPointY)


ReleaseSmartFrameObject Method

Purpose

The ReleaseSmartFrameObject method releases the SmartFrame object.

Syntax

Op.ReleaseSmartFrameObject()

Elements

Op

Required.  The Position object.

Example

Call Op.ReleaseSmartFrameObject()


RestrictionAngle Property

Purpose

The RestrictionAngle property enables you to get or put the restriction angle, which is used to restrict rotation by either 30 degrees or 45 degrees.  The restriction angle should be set to zero (the default) when you do not want to restrict rotation to certain increments.

Syntax

Angle = Op.RestrictionAngle

Op.Restriction.Angle = Angle

Elements

Op

Required.  The Position object.

Angle

Required.  The angle, in degrees, to which the image movement will be restricted.  Type integer.

Example

Angle = Op.RestrictionAngle

Op.RestrictionAngle = Angle


Rotate Method

Purpose

The Rotate method rotates the image by a given angle about the specified rotation point.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

Op.Rotate(Angle, AboutX, AboutY)

Elements

Op

Required.  The Position object.

Angle

Required.  Type double.  The angle, in degrees, by which the image will be rotated.

AboutX

Required.  Type double.  The x coordinate of the rotation point.

AboutY

Required.  Type double.  The y coordinate of the rotation point.

Example

Call Op.Rotate(Angle, AboutX, AboutY)


RotateAndScale Method

Purpose

The RotateAndScale method rotates and scales the image from a source to a destination.  The point about which the raster data is rotated and scaled is the target point from Move, so Move must be called before RotateAndScale.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

Op.RotateAndScale(FromX, FromY, ToX, ToY)

Elements

Op

Required.  The Position object.

FromX

Required.  Type double.  The x coordinate of the source point.

FromY

Required.  Type double.  The y coordinate of the source point.

ToX

Required.  Type double.  The x coordinate of the destination point.

ToY

Required.  Type double.  The y coordinate of the destination point.

Example

Call Op.RotateAndScale(FromX, FromY, ToX, ToY)


Scale Method

Purpose

The Scale method scales the image about an optionally specified point by the scale factors specified.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

Op.Scale(XScale, YScale, AboutX, AboutY)

Elements

Op

Required.  The Position object.

XScale

Required.  Type double.  How much to scale the image in the x direction.  This value must be the same as YScale.

YScale

Required.  Type double.  How much to scale the image in the y direction.  This value must be the same as XScale.

AboutX

Optional.  Type double.  The x coordinate of the point about which to scale.

AboutY

Optional.  Type double.  The y coordinate of the point about which to scale.

Example

Call Op.Scale(XScale,YScale,AboutX,AboutY)


SmartFrameObject Property

Purpose

The SmartFrameObject property sets the SmartFrame dispatch object used by position to rotate, scale, and move the image.  It is also used to get the current scale and rotation.

Syntax

Op.SmartFrameObject = SF, where SF is the SmartFrame dispatch object.

Elements

Op

Required.  The Position object.

Example

Dim SF As SmartFrame 2d

Dim Op As Object

Op = SF.Object

Op.SmartFrameObject = SF


TransformUsingPoints Method

Purpose

The TransformUsingPoints method moves, scales, and rotates the image according to the source and target points set by calling PutSourcePoint and PutTargetPoint prior to calling this method.  You must first set the SmartFrameObject property before calling this method.  When you finish, you must call ReleaseSmartFrameObject.

Syntax

Op.TransformUsingPoints

Elements

Op

Required.  The Position object.

Example

Call Op.PutSourcePoint(1,dSourcePoint1X,dSourcePoint1Y)

Call Op.PutTargetPoint(1,dTargetPoint1X,dTargetPoint1Y)

Call Op.PutSourcePoint(2,dSourcePoint2X,dSourcePoint2Y)

Call Op.PutSourcePoint(2,dTargetPoint2X,dTargetPoint2Y)

Op.TransformUsingPoints()


SaveImage

Description

The SaveImage object contains methods and properties for writing images to disk that are opened or placed in a book.

CanWriteFile Property

FileName Property

PercentCompleteTitle Property

SaveImage Method


CanWriteFile Property

Purpose

The CanWriteFile property returns True if the current image can be saved with the current file name.  It returns False if the image cannot be saved (if the user does not have write permission for the file, for example).

Syntax

object.CanWriteFile

Elements

object

Required.  The SaveImage object.

Example

Dim saveImage As Object

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set saveImage = image.SaveImage

saveImage.PercentCompleteTitle = "Saving Image"

If saveImage.CanWriteFile Then

saveImage.SaveImage

End If


FileName Property

Purpose

The FileName property sets or gets the file name for the object.  The FileName property is a read-write string.

Syntax

object.FileName

Elements

object

Required.  The SaveImage object.

Example

Dim saveImage As Object

Dim oldFileName As String

Dim newFileName As String

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set saveImage = image.SaveImage

oldFileName = saveImage.FileName

newFileName = "d:\a_com\data\neweast.cot"

saveImage.FileName = newFileName


PercentCompleteTitle Property

Purpose

The PercentCompleteTitle property sets or gets the text of the percent complete dialog box's title bar.  The PercentCompleteTitle property is a read-write string.

Syntax

object.PercentCompleteTitle(title_text)

Elements

object

Required.  The SaveImage object.

title_text

A string that contains the text to be placed in the title bar.

Example

Dim saveImage As Object

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set saveImage = image.SaveImage

saveImage.PercentCompleteTitle = "Saving Image"

If saveImage.CanWriteFile Then saveImage.SaveImage

End If


SaveImage Method

Purpose

The SaveImage method writes the active image object to the file specified by the FileName property setting.  If the FileName property is not set, the file is written to the original file name.

Syntax

object.SaveImage

Elements

object

Required.  The SaveImage object.

Example

Dim saveImage As Object

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim image As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set image = objSFrame.object

Set saveImage = image.SaveImage

saveImage.PercentCompleteTitle = "Saving Image"

If saveImage.CanWriteFile Then

saveImage.SaveImage

End If


SelectArea

Description

The SelectArea object enables you to specify an area of interest, for pixel editing or other manipulation, on the image.

Add Method

CreateNew Method

Description Property

GetPoints Method

Intersect Method

Invert Method

IsPointInSelectArea Method

IsPointOnImage Method

IsSelectAreaPresent Property

PutPoints Method

Remove Method

SelectEntireImage Method

Subtract Method


Add Method

Purpose

The Add method adds the select area specified to the current select area.  If the area specified does not overlap the current area, this method results in a disjointed select area.

Syntax

object.Add

Elements

object

Required.  The command helper object.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew

PointsX(0) = 0.5

PointsY(0) = 0.5

PointsX(1) = 2.0

PointsY(1) = 0.5

PointsX(2) = 1.5

PointsY(2) = 2.0

PointsX(3) = 0.5

PointsY(3) = 0.5

Op.PutPoints 4, PointsY, PointsX

Op.Add


CreateNew Method

Purpose

The CreateNew method creates a select area using the points specified in the call to PutPoints.  PutPoints must be called before CreateNew.

Syntax

object.CreateNew

Elements

object

Required.  The command helper object.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew


Description Property

Purpose

The Description property sets the description of the command.  The Description property is a write-only string.

Syntax

object.Description

Elements

object

Required.  The command helper object.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

Op.Description = "Select Area"


GetPoints Method

Purpose

The GetPoints method reads points used to specify the outline of the current select area, and returns them in the XY coordinates of the container application.  If either of the array sizes is zero, the GetPoints method returns the correct sizes in PointArraySize and PointsPerOutlineArraySize, without filling any of the arrays.  This mechanism can be used to verify or find out the correct array sizes.  That is, by calling the GetPoints method first with sizes set to zero, the correct sizes can be obtained.  These values then can be used to make the second call to the GetPoints method, which then will fill the provided arrays.

Syntax

object.GetPoints    PointArraySize, PointsPerOutlineArraySize, PointsPerOutlineArray, YArray, XArray

Elements

object

Required.  The command helper object.

PointArraySize

Input.  The number of points.

PointsPerOutlineArraySize

Input.  The size of PointPerOutlineArray.

PointsPerOutlineArray

Input.  Array of Long.  Each element in the array indicates the number of points in the outline of each select area.

YArray

Input.  Array of Double.  The list of Y coordinates.

XArray

Input.  Array of Double.  The list of X coordinates.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim PointsPerOutlineArraySize As Long

Dim PointArraySize As Long

Dim PointsPerOutlineArray() As Long

Dim PointXArray() As Double

Dim PointYArray() As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew

PointsX(0) = 0.5

PointsY(0) = 0.5

PointsX(1) = 2.0

PointsY(1) = 0.5

PointsX(2) = 1.5

PointsY(2) = 2.0

PointsX(3) = 0.5

PointsY(3) = 0.5

Op.PutPoints 4, PointsY, PointsX

Op.Add

PointArraySize = 0

PointsPerOutlineArraySize = 0

Op.GetPoints PointArraySize, PointsPerOutlineArraySize, PointsPerOutlineArray, PointYArray, PointXArray

ReDim PointsPerOutlineArray (PointsPerOutlineArraySize)

ReDim PointXArray(PointArraySize)

ReDim PointYArray(PointArraySize)

Op.GetPoints PointArraySize, PointsPerOutlineArraySize, PointsPerOutlineArray, PointYArray, PointXArray


Intersect Method

Purpose

The Intersect method intersects the select area specified with the current select area.

Syntax

object.Intersect

Elements

object

Required.  The command helper object.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew

PointsX(0) = 0.5

PointsY(0) = 0.5

PointsX(1) = 2.0

PointsY(1) = 0.5

PointsX(2) = 1.5

PointsY(2) = 2.0

PointsX(3) = 0.5

PointsY(3) = 0.5

Op.PutPoints 4, PointsY, PointsX

Op.Intersect


Invert Method

Purpose

The Invert method inverts the select area of the image.  For example, if a traingle-shaped select area is present when this method is called, all the area outside the triangle becomes the select area.

Syntax

object.Invert

Elements

object

Required.  The command helper object.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew

Op.Invert


IsPointInSelectArea Method

Purpose

The IsPointInSelectArea method is used to determine if a specified point falls inside the select area.  The return type is an enumerator of type ImageBooleanType.

Syntax

object.IsPointInSelectArea XCoordinate, YCoordinate

Elements

object

Required.  The command helper object.

XCoordinate

Input.  The X coordinate of the point to test.

YCoordinate

Input.  The Y coordinate of the point to test.

Example

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim flag

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

flag = Op.IsPointInSelectArea 3.3, 0.4

If (flag = igTrue) Then

End If


IsPointOnImage Method

Purpose

The IsPointOnImage method is used to determine if a specified point falls within an image's boundary.

Syntax

object.IsPointOnImage, XCoordinate, YCoordinate

Elements

object

Required.  The command helper object.

XCoordinate

Input.  The X coordinate of the point to test.

YCoordinate

Input.  The Y coordinate of the point to test.

Example

Dim flag

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

flag = Op.IsPointOnImage 3.3, 0.4

If (flag = igTrue) Then

End If


IsSelectAreaPresent Property

Purpose

The IsSelectAreaPresent property is used to determine if a select area currently exists on an image.  It returns igTrue if a select area is present.  The IsSelectAreaPresent property is read-only.

Syntax

object.IsSelectAreaPresent

Elements

object

Required.  The command helper object.

Example

Dim SelArea As Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

SelArea  = Op.IsSelectAreaPresent

If (SelArea = igTrue) Then Op.Remove

End If


PutPoints Method

Purpose

The PutPoints method defines points to be used in subsequent SelectArea commands.  That is, the outline that these points form specifies the select area for subsequent SelectArea commands.  If CreateNew is called after the PutPoints method is called, a new select area is created.  The user can call the PutPoints method again with a new set of points, and then call Subtract to perform the boolean difference between the two areas.

Syntax

object.PutPoints    ArraySize, YArray, XArray

Elements

object

Required.  The command helper object.

ArraySize

Input.  The number of points.

YArray

Input.  The list of Y coordinates.

XArray

Input.  The list of X coordinates.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew


Remove Method

Purpose

The Remove method removes the current select area.

Syntax

object.Remove

Elements

object

Required.  The command helper object.

Example

Dim SelArea As Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

SelArea  = Op.IsSelectAreaPresent

If (SelArea = igTrue) Then Op.Remove

End If


SelectEntireImage Method

Purpose

The SelectEntireImage method specifies the entire image as the selected area.

Syntax

object.SelectEntireImage

Elements

object

Required.  The command helper object.

Example

Dim SelArea As Integer

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

SelArea  = Op.IsSelectAreaPresent

If (SelArea = igTrue) Then Op.Remove

End If

Op.SelectEntireImage


Subtract Method

Purpose

The Subtract method subtracts the select area from the current select area.

Syntax

object.Subtract

Elements

object

Required.  The command helper object.

Example

Dim PointsX(5) As Double

Dim PointsY(5) As Double

Dim app as Object

Dim objSheet As Object

Dim objSFrames As Object

Dim objSFrame As Object

Dim objImage As Object

Dim Op As Object

Set app = GetObject(, "Imagineer.Application")

Set objSheet = app.ActiveDocument.ActiveSheet

Set objSFrames = objSheet.SmartFrames2d

Set objSFrame = objSFrames.AddBy2Points("", 0#, 0#, 0.5, 0.5)

Call objSFrame.CreateLink("c:\Images\east.cot")

Set objImage = objSFrame.object

Set Op = objImage.SelectArea

PointsX(0) = 0.3

PointsY(0) = 0.3

PointsX(1) = 0.3

PointsY(1) = 1.0

PointsX(2) = 1.2

PointsY(2) = 1.0

PointsX(3) = 1.2

PointsY(3) = 0.3

PointsY(4) = 0.3

PointsX(4) = 0.3

Op.PutPoints 5, PointsY, PointsX

Op.CreateNew

PointsX(0) = 0.5

PointsY(0) = 0.5

PointsX(1) = 2.0

PointsY(1) = 0.5

PointsX(2) = 1.5

PointsY(2) = 2.0

PointsX(3) = 0.5

PointsY(3) = 0.5

Op.PutPoints 4, PointsY, PointsX

Op.Subtract


Undo

Description

The Undo object enables you to undo the last command executed, to undo through a specified command, to undo a specified number of strokes in the previous command, or to redo a command that was just undone.

Redo Method

UndoLast Method

UndoStrokes Method

UndoThrough Method


Redo Method

Purpose

The Redo method enables you to reverse the result of the last Undo operation.

Syntax

Op.Redo()

Elements

Op

Required.  The Undo object.

Example

Call Op.Redo( )


UndoLast Method

Purpose

The UndoLast method enables you to undo the most recently created undo layer.

Syntax

Op.UndoLast()

Elements

Op

Required.  The Undo object.

Example

Call Op.UndoLast( )


UndoStrokes Method

Purpose

The UndoStrokes method enables you to undo a specified number of strokes in the most recent undo layer.

Syntax

Op.UndoStrokes(x), where x is an integer than specifies the number of strokes to undo.

Elements

Op

Required.  The Undo object.

Example

Call Op.UndoStrokes( 2 )


UndoThrough Method

Purpose

The UndoThrough method enables you to undo through a specified layer.

Syntax

Op.UndoThrough(x), where x is an integer that specifies which layer to undo through.

Elements

Op

Required.  The Undo object.

Example

Call Op.UndoThrough( 2 )