PreviousNext
Help > Programming PhotoModeler - Scripting/DDE Interface > Commands > Scale
Scale

Description:

Set the scale part of the project coordinate transform. The scale distance should be in project units (which are set during NewProect).

Syntax:

"Scale pt1Id pt2Id distance"

where:

pt1Id and pt2Id are identifier numbers for the Object Points that scale is defined between. 

or

"Scale id1 id2 distance type1 type2 disableExisting"

The optional “type1 type2” variables control what object types are used to define the scale where 1=point, 2=edge, and 3=camera station.  The optional "disableExisting" parameter on this variation of the command controls whether any existing scales are disabled - use "0" to keep existing scales enabled, or use "1" or omit the parameter to disable the scale.

 

The project is scaled so that the distance between those two items becomes 'distance' (in project's default units). Note that if either of the items is not 3D or invalid then the command still succeeds but the project will not be scaled until the items both become 3D.

Return:

"1" if successful or "0" if not.

Failure returns

- incorrect number of parameters

- no project is open

- 'pt1Id' or 'pt2Id' do not correspond to existing points

- 'distance' is zero or negative

Example:

"Scale 12 13 22.34"

or

“Scale 1 2 22.34 1 3" or “Scale 1 2 22.34 1 3 0"

return: "1"