Object - definition

Some of the OpusScript functions will return a new object, for example

DimInfo = Image1.GetObjectDimensions()

In this example, the GetObjectDimensions function returns an object that we have saved into DimInfo.

(i) a new object contains properties – these properties are listed in the function’s Help page in the Return Value section. For example, top is one of the properties of the GetObjectDimensions function.

(ii) Properties can be stored to a different variable that can then be used by other script functions. Below is an example of how you reference an object’s property and store it a variable

var imageTop = DimInfo.top

(iii) The functions that create new objects normally begin with the word Get, e.g. GetAppearance and GetPosition.

(iv) There is normally an equivalent Set function for any Get function that creates a new object e.g. SetObjectDimensions and SetPosition.

Object syntax in Data Types

Close