Difference between revisions of "XML Script"

From OCAD Wiki - English
Jump to navigation Jump to search
Line 45: Line 45:
 
! style="width:12em" | Parameter  
 
! style="width:12em" | Parameter  
 
! style="width:8em" | Data type  
 
! style="width:8em" | Data type  
! style="width:13em" | Values / Description
+
! style="width:19em" | Values / Description
 
|-
 
|-
 
| File.Open || File || String || ocd file name
 
| File.Open || File || String || ocd file name
Line 70: Line 70:
 
! style="width:12em" | Parameter  
 
! style="width:12em" | Parameter  
 
! style="width:8em" | Data type  
 
! style="width:8em" | Data type  
! style="width:13em" | Values / Description
+
! style="width:19em" | Values / Description
 
|-
 
|-
 
| View.EntireMap || Enable|| Boolean || true, false
 
| View.EntireMap || Enable|| Boolean || true, false
Line 85: Line 85:
 
! style="width:12em" | Parameter  
 
! style="width:12em" | Parameter  
 
! style="width:8em" | Data type  
 
! style="width:8em" | Data type  
! style="width:13em" | Values / Description
+
! style="width:19em" | Values / Description
 
|-
 
|-
 
| Map. OptimizeRepair|| Enable|| Boolean || true, false
 
| Map. OptimizeRepair|| Enable|| Boolean || true, false

Revision as of 09:08, 5 October 2011

(This function is only available in OCAD Professional!)

Choose this command to execute functions whose settings are defined in a XML file.

http://www.ocad.com/Whitepaper/Ocad10_Xml_Script_Specification.pdf

Example of XML script file:

<ocadScript>
<exportScript>
<export id="3">
<file>c:\export\exportfile.bmp</file>
<format>BMP</format>
<resolution>300</resolution>
<anti-alias>true</anti-alias>
<colorCorrection>true</colorCorrection>
<partialMap>
<enabled>false</enabled>
</partialMap>
<tiles>
<enabled>true</enabled>
<width>500</width>
<height>500</height>
</tiles>
</export>
</exportScript>
</ocadScript>



1. Introduction

Select Execute XML Script from File menu.


2. XML Script General

File

Node <OcadScript> Parameter Data type Values / Description
File.Open File String ocd file name
File.Close Enable Boolean true, false
File.Save Enable Boolean true, false
File.SaveAs File String ocd file name
File.MultipleFileImport Directory
New Offset
Horizontally
Vertically
Angle
MapScale

Grid Distance
Layer Field

String
Enum. types
Ingeger
Integer
Double
Integer
Double
String
Directory of import files enabled, disabled
File.ExportOIM File String html file name
File.Exit Enabled Boolean true, false Close OCAD Program


View

Node <OcadScript> Parameter Data type Values / Description
View.EntireMap Enable Boolean true, false
View.MoveTo X
Y
Double
Double
 


Map

Node <OcadScript> Parameter Data type Values / Description
Map. OptimizeRepair Enable Boolean true, false
Map.ChangeScale NewScale Integer e. g. 10 000
  EnlargeReduceSymbols Boolean true, false
Map.ConvertLayer CrtFile String crt file name
Symbol.LoadSymbolsFrom File String ocd file name (with symbols to be loaded)
The option replace existing colors and symbols is used


Database

Node <OcadScript> Parameter Data type Values / Description
Database.Dataset.Remove Dataset String
Integer
all for all databases
3, 2, 1, ... for only one or several
Database.Assign.Symbols Dataset
 
CntFile
String
Integer
String
all for all databases
1, 2, 3, ... for only one database
 
ex. 101.0
true, false (Default)
Database.Assign.Texts Dataset
 
TextField
Symbol
ReplaceExistingObjects
String
Integer
String
String
Boolean
all for all databases
1, 2, 3, ... for only one database
 
ex. 101.0
true, false (Default)
Database.Assign.Angles Dataset
 
AngleField
String
Integer
String
all for all databases
1, 2, 3, ... for only one database
 
Database.CreateObjects Dataset
SelectSymbol
Condition
HorizontalCoordinate
VerticalCoordinate
Unit
TextField
HorizontalOffset
VerticalOffset
Integer
Double
String
String
String
Enum. types
String
Double
Double
1, 2, 3, ... Number of dataset
Symbol numer. ex. 207,0
SQL String (ex. SYMBOL LIKE 207,0)
Database fieldname
Database fieldname
m, km
Database fieldname
 
 


Previous Chapter: Chapter 17: Database

Next Chapter: Chapter 19: Course Settings for Orienteering

Back to Help:Contents