A ChildFolder is first obtained through a root entry point from the document and is related to a tab of the Atoll Explorer window.
Most ChildFolder objects may have children, can be selected, set visible, and renamed. Only coverage predictions may be exported.
9.2 get_Application
Returns the Atoll Application object.
GetPropertiesInfo Returns names and types for all properties available on the ChildFolder object.
PropertyIsPropertyContainer Returns true when a ChildFolder object property is a PropertyContainer object.
PropertyIsTabularData Returns true when a ChildFolder object property a TabularData object.
LoadProperties Sets properties from a property container to the
ChildFolder object.
SaveProperties Saves all the ChildFolder object properties to another property container.
RemoveItem Removes one of the children of the ChildFolder object.
SetCustomIcon Sets the path of an icon to use for a custom child folder.
Name Description Attributes
Dim folder Dim item Dim doc Dim dataRoot Const atoData = 0
Set doc = Atoll.ActiveDocument
Set dataRoot = doc.GetRootFolder(atoData) For Each folder in dataRoot
‘ do some work with this folder, for instance: For Each item in folder
‘ do some work with this item Next
Next
Parameters
[out] ppVal: Address of the IApplication interface pointer used to return the Atoll Application object.
9.3 get_Parent
Returns the parent Atoll ChildFolder object.
Parameters
[out] pVal: Address of the VARIANT used to return the parent ChildFolder object. The type of the returned VARIANT is VT_DISPATCH. When the ChildFolder object is a root ChildFolder object, the IDispatch interface pointer of the Atoll Document is returned, otherwise the IDispatch interface pointer of the parent ChildFolder object is returned.
9.4 get_Name
Returns the ChildFolder object display name.
Parameters
[out] pVal: Address of the BSTR used to return the display name.
Example
Renaming the "Transmitters" folder.
9.5 put_Name
Sets the ChildFolder object display name.
HRESULT get_Parent(VARIANT *pVal);
HRESULT get_Name(BSTR *pVal);
Dim folder Dim dataTab Dim folderName Const atoData = 0
Set dataTab = ActiveDocument.GetRootFolder(atoData) For Each folder In dataTab
folderName = folder.Name
If folderName = “Transmitters” Then folder.Name = “TransmittersTest” End if
Next
Atoll 3.3.2 Task Automation Guide
Chapter 9: ChildFolder Object © 2016 Forsk. All Rights Reserved.
Parameters
[in] aNewVal: The BSTR used to specify the display name.
Example
See "get_Name" on page 115.
9.6 get_Count
Returns the number of children of the ChildFolder object.
Parameters
[out] pVal: Address of the long integer used to return the number of children.
9.7 get_Item
Returns one of the children of the ChildFolder object.
Parameter
[in] iIdx: A VARIANT of type VT_I4 or VT_BSTR identifying the returned ChildFolder object. If the type of the variant is VT_I4, it is interpreted as a zero-based index in the list of children. If the type of the variant is VT_BSTR, it is first interpreted as the display name of the child to search for, and if the display name is not found, it is then interpreted as a ChildFolder object kind, as returned by get_ObjectKind.
[out] pVal: Address of the IChildFolder interface pointer used to return a ChildFolder object.
9.8 get__NewEnum
Returns an object used to enumerate the children of the ChildFolder object.
Parameters
[out] ppUnk: Address of the IUnknown interface pointer used to return the enumerator object. The IEnumVARIANT interface is implemented by the enumerator object.
Example
9.9 get_Visible
Returns the visibility state of the ChildFolder object. HRESULT get_Count(long *pVal);
HRESULT get_Item(const VARIANT iIdx, IChildFolder **pVal);
HRESULT get__NewEnum(LPUNKNOWN *ppUnk);
Const atoModule = 2
Set modules = app.ActiveDocument.GetRootFolder(atoModule) For Each module In modules
‘ do something with module Next
Parameters
[out] pVal: Address of the VARIANT_BOOL used to return the visibility state. The visibility state values are:
VARIANT_TRUE : the ChildFolder object may be displayed on Atoll Map View windows. VARIANT_FALSE : the ChildFolder object won’t be displayed on Atoll Map View windows.
Remarks
The visibility state only makes sense for ChildFolder objects that may appear on Atoll Map View windows. get_Visible and
put_Visible calls are ignored for objects that do not support it. No error is returned.
Example
9.10 put_Visible
Sets the visibility state of the ChildFolder object.
Parameters
[in] aNewVal: The VARIANT_BOOL used to specify the visibility state. The visibility state values are:
VARIANT_TRUE : the ChildFolder object may be displayed on Atoll Map View windows. VARIANT_FALSE : the ChildFolder object won’t be displayed on Atoll Map View windows.
Remarks
The visibility state only makes sense for ChildFolder objects that may appear on Atoll Map View windows. get_Visible and
put_Visible calls are ignored for objects that don’t support it. No error is returned.
Example
9.11 get_Selected
Returns the selected state of the ChildFolder object.
Parameters
[out] pVal: Address of the VARIANT_BOOL used to return the selected state of the ChildFolder object.
Remarks
get_Selected and put_Selected calls are ignored for objects that don’t support it. No error is returned.
HRESULT get_Visible(VARIANT_BOOL *pVal);
dataFolder.Item("Predictions").Visible = True
HRESULT put_Visible(VARIANT_BOOL aNewVal);
dataFolder.Item("Predictions").Visible = True
Atoll 3.3.2 Task Automation Guide
Chapter 9: ChildFolder Object © 2016 Forsk. All Rights Reserved.
Example
9.12 put_Selected
Sets the selected state of the ChildFolder object.
Parameters
[in] newVal: The VARIANT_BOOL used to specify the selected state.
Remarks
get_Selected and put_Selected calls are ignored for objects that don’t support it. No error is returned.
Example
See "get_Selected" on page 117.
9.13 Export
Exports a ChildFolder object to a file, in a given format. This method can only be used for studies.
Parameters
[in] bstrFileName: A string containing an absolute file path.
[in] proj: An IDispCoordSystem interface pointer used to define the coordinate system for the export. [in] bstrFormat: A string used to define the format of the file specified by bstrFileName.
Public Sub SelectTx Set doc = ActiveDocument Const atoData = 0
Set dataFolder = doc.GetRootFolder(atoData) ’ Select the "Site0_0" transmitter
For Each folder In dataFolder
If folder.Name = "Transmitters" Then folder.Item("Site0_0").Selected = True End If
Next End Sub
HRESULT put_Selected(VARIANT_BOOL aNewVal);
HRESULT Export(
const BSTR bstrFileName, IDispCoordSystem* proj, const BSTR bstrFormat );
The syntax for the bstrFormat parameter is:
format:
• Available values are:
• SHP • AGD • MIF • TAB • BMP • TIF • TXT • ARCVIEWGRIDASCII • PNG • JP2
• VMAPPER (for Vertical Mapper GRC or GRD file formats)
Please read the application documentation to learn more about these file formats.
The data exported is the geographic coverage prediction of a study when using SHP, AGD, MIF, TAB, BMP, ARCVIEW- GRIDASCII, PNG, JP2, or TIF formats. However, if you specify TXT format, this method will export the study report in tabulated ASCII text format. This prediction study report is the same as the one available by right-clicking the study in the application and selecting Generate Report.
Available properties are:
Atoll version >= 3.3.1
PropertyName=Value;[PropertyName=Value;]format
Property Name Value Version Description
Resolution integer 2.8.1
This is the export resolution, expressed in meter. If not specified, the resolution used to perform the export is
the study resolution.
It is only relevant when the export format is a vector format, as opposed to a raster format.
AreaType 0|1|2 2.8.1
Used to specify the zone to export. Available values are: 0 : The Entire Covered Area
1 : The Computation Zone 2 : The Geographic Export Zone
If not specified, the entire covered area is considered to perform the export.
It is only relevant for raster formats, as opposed to vector formats.
Property Name Value Description
FilteringPercentage integer, between
0 and 100
This is the filtering percentage value.
It is only relevant when the export format is a vector format, as opposed to a raster format.
SmoothingPercentage integer, between
0 and 100
This is the smoothing percentage value.
It is only relevant when the export format is a vector format, as opposed to a raster format.
SmoothingMaximumNumberOfPoints integer
This is the maximum number of points for exported vector geometries. This option is mutually exclusive with the
smoothing percentage option.
It is only relevant when the export format is a vector format, as opposed to a raster format.
DataType integer, 0 or 1
0 = coverage thresholds are exported, this is the defaut setting if not specified.
1 = numerical coverage results are exported. This option is only relevant when BIL or GRD formats are
Atoll 3.3.2 Task Automation Guide
Chapter 9: ChildFolder Object © 2016 Forsk. All Rights Reserved.
Return value
S_OK: Export has completed successfully.
S_FALSE: Export couldn’t be performed because of one of the following reasons: • The folder specified in bstrFileName does not exist.
• The study visibility check box is cleared. • The study has no coverage.
When S_FALSE is returned, no output file is created.
Example
9.14 CentreOnMap
Centres the Atoll Map View window around the ChildFolder object.
Remarks
CentreOnMap only makes sense for ChildFolder objects that may appear on Atoll Map View windows. CentreOnMap calls will
be ignored for objects that don’t support it. No error will be returned.
9.15 Redraw
Redraws the ChildFolder object.
Remarks
Redraw only makes sense for ChildFolder objects that may appear on Atoll Map View windows. Redraw calls will be ignored
for objects that don’t support it. No error will be returned.