Returns the number of currently open documents in an Atoll session.
Parameters
[out] pVal: A LONG pointer used to return the number of open documents.
Example
4.3 get_Item
Returns one document currently open in an Atoll session.
Parameters
[in] vIdx: A VARIANT of type VT_I4 or VT_BSTR identifying the returned document. A variant of type VT_I4 is interpreted as a zero-based index in the documents collection. A variant of type VT_BSTR is interpreted as the name of a document. [out] ppDoc: Address of the IDocument interface pointer used to return the Atoll document object.
Remarks
The name of a document is the document file name, as returned by get_Name().
4.4 get_Application
Returns the Atoll application object.
Parameters
[out] ppVal: Address of the IApplication interface pointer used to return the Atoll application object.
4.5 get_Parent
Returns the Atoll application object.
Parameters
[out] ppVal: Address of the IApplication interface pointer used to return the Atoll application object.
4.6 Open
Opens an existing document and adds it to the collection of open documents. HRESULT get_Count(LONG *pVal);
Dim nDocs
nDocs = Atoll.Documents.Count
HRESULT get_Item(const VARIANT vIdx, IDocument **ppDoc);
HRESULT get_Application(IApplication **ppVal);
Parameters
[in] bstrPathName: The absolute path of the document to open.
[in] readOnly: VARIANT_TRUE means the document will be opened in read-only mode. VARIANT_FALSE means the document will be opened in read-write mode.
[out] pDoc: Address of the IDocument interface pointer used to return the open Document object.
Example
4.7 Add
Creates a new document and adds it to the collection of open documents.
Parameters
[in] templateName: The name of an Atoll template.
[out] pDoc: Address of the IDocument interface pointer used to return the new Document object.
Example
4.8 OpenFromDatabase
Creates a new document from a database and adds it to the collection of open documents.
Parameters
[in] connection: A VARIANT of type VT_BSTR or VT_UNKNOWN. If the variant is of type VT_BSTR, it is interpreted as the connection string of the database you want to connect to. If the variant if of type VT_UNKNOWN, it is interpreted as an ADODB connection interface pointer. Please read the Microsoft documentation about ADOX interfaces.
[in] schema: The name of the database schema, in case of databases supporting muti-schema based definition. The syntax of the schema string is:
Available properties are:
HRESULT Open(const BSTR bstrPathName, VARIANT_BOOL aReadOnly, IDocument **pDoc);
Dim doc
Set doc = app.Documents.Open(“C:\Temp\myProject.atl”)
HRESULT Add(BSTR templateName, IDocument **pDoc);
Dim doc
Set doc = app.Documents.Add(“UMTS”)
HRESULT OpenFromDatabase(VARIANT connection, BSTR schema, IDocument **pDoc);
Value[;PropertyName = Value]
Property Name Value Version Description
Atoll 3.3.2 Task Automation Guide
Chapter 4: Documents Object © 2016 Forsk. All Rights Reserved.
[out] pDoc: Address of the IDocument interface pointer used to return the new Document object.
Remarks
A dialogue box is displayed to enter the schema properties in these cases: a. When schema is NULL, or schema is equal to the string constant "0".
b. When a project is specified, and when no site lists are specified in the schema parameter.
No dialogue box is displayed when a project is specified, and when the site lists property of the schema parameter is set to "<ALL>". In this case, all sites are loaded from the database.
Example
Creating a new document from a MS Access database:
Creating a new document from a database, specifying a site list to load:
Creating a new document from an Oracle database, with no dialogue box:
Creating a new document from a 3GPP Multi-RAT Oracle database, loading LTE and UMTS information only:
4.9 CloseAll
Closes all open documents.
Keep Connection 0|1 2.6.0 Whether to keep connection with the database or not
Field Groups group name
[,group name] 2.6.0 Comma separated values of field groups
Site Lists site list[,site list] 2.6.0 Comma separated values of site lists
IntraTechnology
Neighbours 0|1 2.6.1 Whether to load the table "NEIGHBOURS" or not
InterTechnology
Neighbours 0|1 2.6.1 Whether to load the table "NEIGHBOURSEXT" or not
Systems system,[system] 3.1.2
Comma separated values of systems.
When creating a new document from a 3GPP Multi-RAT database, it is used to specify the radio access technologies
to load.
Available values for systems are: GSM
UMTS LTE
When no property named "Systems" is specified in the schema string, all radio technologies are loaded.
Public Sub OpenMSAccessDatabase
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myproject.mdb" Atoll.Documents.OpenFromDatabase conn, ""
End Sub
Public Sub OpenSiteList
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myproject.mdb" Atoll.Documents.OpenFromDatabase conn, "Site Lists=MySiteList"
End Sub
Parameters
[in] saveChanges:
• atoSaveNo: Discards document changes, then closes all open documents. • atoSaveYes: Saves document changes, then closes all open documents.
• atoSavePrompt: The user is prompted to save document changes, then all open documents are closed. [out] status: The AtoSaveStatus enumeration pointer used to return whether changes were successfully saved or not.
• Returns atoSaveCanceled when the user was prompted and has chosen not to save the changes, otherwise returns atoSaveSucceeded.
4.10 SaveAll
Saves all open documents. HRESULT SaveAll();
Atoll 3.3.2 Task Automation Guide
Chapter 5
Document
Object
Atoll 3.3.2 Task Automation Guide
5 Document Object
The Doc ument object provides access to ATL documents and database connections. A document can be managed (open, save, close, etc.) using its properties and methods. A document is also the main entry to manage all the data it contains.
• • •
The Document object provides the following properties and methods:
Name Description Attributes
get_Application Returns the Atoll Application Object. Type: Application object
Access: Read
get_Parent Returns the Atoll Documents collection. Type: Documents object
Access: Read
get_FullName Returns the document full path. Type: String
Access: Read
get_Name Returns the document file name without the extension. Type: String
Access: Read
get_Path Returns the document path. Type: String
Access: Read
get_ReadOnly Returns true if the document is read-only, false otherwise. Type: Boolean
Access: Read
get_Saved Returns false if the document contains unsaved changes,
true otherwise.
Type: Boolean Access: Read
get_CoordSystemProjection Returns the projection coordinate system of a document.
Type: CoordSystem object Access: Read/Write
putref_CoordSystemProjection Sets the projection coordinate system of a document.
Type: CoordSystem object Access: Read/Write
get_CoordSystemDisplay Returns the display coordinate system of a document.
Type: CoordSystem object Access: Read/Write
putref_CoordSystemDisplay Sets the display coordinate system of a document.
Type: CoordSystem object Access: Read/Write
get_CoordSystemInternal Returns the internal coordinate system of a document.
Type: CoordSystem object Access: Read
get_TransmissionUnit Returns the transmission power unit. Type: Integer
Access: Read/Write
put_TransmissionUnit Sets the transmission power unit. Type: Integer
Access: Read/Write
get_ReceptionUnit Returns the signal level reception unit. Type: Integer
Access: Read/Write
put_ReceptionUnit Sets the signal level reception unit. Type: Integer
Access: Read/Write
get_DistanceUnit Returns the display distance unit. Type: Integer
Atoll 3.3.2 Task Automation Guide
Chapter 5: Document Object © 2016 Forsk. All Rights Reserved.
put_DistanceUnit Sets the display distance unit. Type: Integer
Access: Read/Write
Close Closes a document.
FilePrint Sends a document to a printer.
Save Saves a document.
Refresh Refreshes the document from a database.
Archive Archives the document in a database.
Run Starts calculations.
SetConfig Loads a configuration file.
Import Loads a file containing geographic data.
GetRecords Returns a TabularData object for a requested category of
records.
Redraw Refreshes all items in the document.
CenterMapOn Centres map on a parameter point.
GetRootFolder
Returns the root ChildFolder object used to enumerate all ChildFolder objects belonging to one tab of the Atoll
explorer window.
RunPathloss Calculates the path loss matrices with no need for any
predefined studies.
GetService Returns a Document Service Object.
ExportConfig Exports a subset of the current document configuration to
a file.
GetCommandDefaults Returns current default parameters specific to a
command.
InvokeCommand Invokes a command.
get_RadiatedPowerUnit Returns the current radiated power unit. Type: Integer
Access: Read/Write
put_RadiatedPowerUnit Sets the current radiated power unit. Type: Integer
Access: Read/Write
get_AntennaGainUnit Returns the current antenna gain unit. Type: Integer
Access: Read/Write
put_AntennaGainUnit Sets the current antenna gain unit. Type: Integer
Access: Read/Write
get_HeightOffsetUnit Returns the current height offset unit. Type: Integer
Access: Read/Write
put_HeightOffsetUnit Sets the current height offset unit. Type: Integer
Access: Read/Write
get_DatabaseConnectionString Returns the database connection string. Type: String
Access: Read/Write
HasRunningTask Returns true when there is some calculation in progress. Type: Boolean
Access: Read
RunEx Starts calculations.
get_DatabaseSchemaString Returns the database schema string. Type: String
Access: Read/Write