Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

DefaultMeasurementType

String value that selects between Metric and English (Imperial) measurement types (see Figure 1). The U-T-H window allows the default measurement type to be changed there (Figure 2). Enter English or Metric and click on OK. Figure 3 shows where the Measurement Type is set for a New Job.

API Call:

...

Image RemovedImage Added

                      Figure 1


Image RemovedImage Added 

         Figure 2


Image RemovedImage Added

              Figure 3

API Calls

Table of Contents
minLevel3

Delphi

Code Block
languagedelphi
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
procedure main; 
var
 planswift: IPlanSwift;
 settings: IItem;
 property: IPropertyObject 
begin planswift := coPlanSwift.Create();
 settings := planswift.getItem('\Settings');
 property := planswift.GetProperty('DefaultMeasurementType');
 WriteLn(property.ResultAsString()) 
end


Code Block
languagedelphi
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
//or 
procedure main;
var
 planswift: IPlanSwift;
 property:IPropertyObject;
begin
 planswift := coPlanSwift.Create();
 property := planswift.GetProperty('\Settings','DefaultMeasurementType');
 WriteLn(property.ResultAsString()) 
end;

C#

Code Block
languagec#
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
private void Main()
{
	PlanSwift planswift = new PlanSwift();
	IItem settings = planswift.GetItem(@"\Settings");
	IPropertyObject property = settings.GetProperty("DefaultMeasurementType");
	console.WriteLn(property.ResultAsString())
}


Code Block
languagec#
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
private void Main()
{
	PlanSwift planswift = new PlanSwift();
	IPropertyObject property = planswift.GetProperty(@"\Settings","DefaultMeasurementType")
	console.WriteLn(property.ResultAsString)
}

VB/VBA (OLE)

Code Block
languagevb
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
Sub main()
    Dim planswift = CreateObject("PlanSwift9.PlanCenter")
    Dim settings = planswift.GetItem("\Settings")
    Dim property = settings.GetProperty("DefaultMeasurementType")
    Console.WriteLn(property.ResultAsString());
End Sub


Code Block
languagevb
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
Sub Main()
    Dim planswift = CreateObject("PlanSwift9.PlanCenter")
    Dim nameProperty = planswift.GetProperty("\Settings","DefaultMeasurementType")
    Console.WriteLn(property.ResultAsString)
End Sub

Pascal Scripting (OLE)

Code Block
themeRDark
firstline1
titleItem Object Model
linenumberstrue
begin
    settings := getItem('\Settings');
    ShowMessage(GetResultAsString(settings,'DefaultMeasurementType'));
end


Code Block
themeRDark
titleRoot Object Model
linenumberstrue
begin
   ShowMessage(GetResultAsString('\Settings','DefaultMeasurementType'));
end

Pascal Scripting

Code Block
themeRDark
firstline1
titleItem Object Model
linenumberstrue
begin
    settings := PlanSwift.getItem('\Settings');
    property := settings.GetProperty('DefaultMeasurementType');
    ShowMessage(property.ResultAsString);
end


Code Block
themeRDark
titleUsing the PlanSwift Object Model
linenumberstrue
begin
    property := PlanSwift.GetProperty('\Settings','DefaultMeasurementType');
    ShowMessage(property.ResultAsString);
end