0% found this document useful (0 votes)
149 views

Acquiredirect Api: User Guide

Uploaded by

Train To Degree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

Acquiredirect Api: User Guide

Uploaded by

Train To Degree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

acQuireDirect API

User guide
Document information
Authorised use © acQuire Software Pty Ltd
Document name acQuireDirect API - User Guide
Date May 2017
Table of contents
1 Introduction 1
1.1 About acQuireDirect 1
1.1.1 Advantages of acQuireDirect 1
1.2 Obtaining acQuireDirect 1
1.3 Accessing modified data sets 1
1.4 Installation recommendations 2
1.4.1 acQuire Read API 2
1.4.2 acQuireDirect 64-bit 2
1.4.3 Conventions 2
1.5 Programming 2
1.6 Linking to acQuireDirect 3
1.7 Terms and abbreviations 3
2 Constructing a program 4
2.1 Overview 4
2.2 COM support interface 4
2.2.1 Loading a COM object 4
2.2.2 Registration of the COM object 4
3 API interface functions 5
3.1 AcqGetVersion 5
3.2 AcqHCreate 5
3.3 AcqHDestroy 5
3.4 AcqHResetSelection 5
3.5 AcqHSetInitialSettings3 5
3.6 AcqHSetParams 5
3.7 AcqHGetCurrentSettings3 6
3.8 AcqHGetCurrentParams 6
3.9 AcqHGetParamStruct 6
3.10 AcqHDeleteSettingStruct3 6
3.11 AcqHGetGeodeticOptions 6
3.12 AcqHDeleteGeodeticOptions 6
3.13 AcqHLoadParams 7
3.14 AcqHDeleteParams 7
3.15 AcqHStartSelection 7

acQuireDirect API - User Guide iii


3.16 AcqHSelectItemsOnly 7
3.17 AcqHGetDataFromAcquire 7
3.18 AcqHGetModifiedDataFromAcquire 7
3.19 AcqHGetNumberOfHoles 8
3.20 AcqHGetDeletedHoles 8
3.21 AcqHGetHoleData4 8
3.22 AcqHDeleteHoleData4 8
3.23 AcqHGetCollarFunctionFields 8
3.24 AcqHGetExtendedCollarFunctionFields 8
3.25 AcqHGetCollarFieldDefinitions 9
3.26 AcqHAddSelectedCollarField 9
3.27 AcqHAddSelectedAssay 9
3.28 AcqHAddSelectedGeology 9
3.29 AcqHClearSelectedItems 9
3.30 AcqHAddSelectedItem 10
3.31 AcqHSetUseIncludeCoordinates 10
3.32 AcqHSetIncludeCoordinates 10
3.33 AcqHSetUseExcludeCoordinates 10
3.34 AcqHSetExcludeCoordinates 10
3.35 AcqHGetAssayFunctionFields 10
3.36 AcqHGetExtendedAssayFunctionFields 11
3.37 AcqHDestroyAcqAssays 11
3.38 AcqHIsAssayTypeNumeric 11
3.39 AcqHGetGeologyFunctionFields 11
3.40 AcqHGetAssayFieldDefinitions 12
3.41 AcqHGetPageGeologyFieldDefinitions 12
3.42 AcqHGetSurveyFunctionFields 13
3.43 AcqHGetSurveyFieldDefinitions 13
3.44 AcqHGetAliases 13
3.45 AcqHUpdateAliases 13
3.46 AcqHGetOperationMode 13
3.47 AcqHSetOperationMode 13
3.48 AcqHSetConnectionString 14
3.49 AcqHSetConnection 14
3.50 AcqHHideConnectionPage 14

acQuireDirect API - User Guide iv


3.51 AcqHConnect 14
3.52 AcqHCheckConnect 15
3.53 AcqHEnableMultiGeology 15
3.54 AcqHGetValidationLookups 15
3.55 AcqHGetFunctionLookups 16
3.56 AcqHGetCDFields 16
3.57 AcqHGetFormDefFields 16
3.58 AcqHGetGeolPrimaryCode 16
3.59 AcqHSetCollarBasedOn 16
3.60 AcqHSetAssayBasedOn 17
3.61 AcqHSetGeologyBasedOn 17
3.62 AcqHSetSurveyBasedOn 17
3.63 AcqHDeleteHoleFromDatabase 17
3.64 AcqHRenameHole 17
3.65 AcqHAddSelectedHoles 17
3.66 AcqHStartUpdate 18
3.67 AcqHEndTransaction 18
3.68 AcqHGetLastError 18
3.69 AcqHUpdateGeology 18
3.70 AcqHGetServerTime 18
3.71 AcqHInsertHole4 19
3.72 AcqHSaveSettingsAsDefaults 19
3.73 AcqHSaveCurrentSettingsAsDefaults 19
3.74 AcqHLoadSettingsFromDefaults 19
3.75 AcqHGetObjectLoggingStatus 19
3.76 AcqHSetSurveyMethod 19
3.77 AcqHSaveParams 20
3.78 AcqHCreateStringArray 20
3.79 AcqHSetStringAt 20
3.80 AcqHAddString 20
3.81 AcqClose 20
3.82 AcqHSetErrorFileName 20
3.83 AcqHSetOutputPath 21
3.84 AcqHSetConnectionTrusted 21
3.85 AcqHGetCompoundAliases 21

acQuireDirect API - User Guide v


3.86 AcqHForceShowConnectionPage 21
3.87 AcqHSetCollarItemsDefaultOptions 21
3.88 AcqHSetAssayItemsDefaultOptions 21
3.89 AcqHSetGeologyItemsDefaultOptions 21
3.90 AcqHSetSurveyItemsDefaultOptions 22
3.91 AcqHSetBoundingBox 22
3.92 AcqHForceDestinationGridSelection 22
3.93 AcqHUpdateSettings 22
3.94 AcqHSetDestinationCoordSystem 23
3.95 AcqHGetSpatialSelectionOptions 24
3.96 AcqHSetSpatialSelectionOptions 25
3.97 AcqHDeleteSpatialSelectionOptions 25
3.98 AcqHSetCombineParams 25
3.99 AcqHAddPageToCombine 25
3.100 AcqHCombineSurveyCodesToAssayIntervals 25
3.101 AcqHEnableMultiAssay 25
3.102 AcqHGetCurrentSettings4 26
3.103 AcqHUpdateSettings4 26
3.104 AcqHDeleteSettingStruct4 26
3.105 AcqHGetAcquireData 27
3.106 AcqHDeleteAcquireData 27
3.107 AcqHCacheData 27
3.108 AcqHGetCacheTablesNames 27
3.109 AcqHDeleteCacheTables 28
3.110 AcqHDeleteCacheTablesNames 28
3.111 AcqHCacheProfile 28
4 Aggregation functions 29
4.1 AcqHGetCollarAggregateData 29
4.2 AcqHGetPointAggregateData 29
4.3 AcqHDeleteAggregateData 29
5 Filter functions 30
5.1 AcqHCreateFilter 30
5.2 AcqHDestroyFilter 30
5.3 AcqHAddGroupToFilter 30
5.4 AcqHAddFieldToFilter 30

acQuireDirect API - User Guide vi


5.5 AcqHSetFilterCustomSQL 30
5.6 AcqHSetSurveyFilter 31
5.7 AcqHSetCollarFilter 31
5.8 AcqHSetAssayFilter 31
5.9 AcqHSetGeologyFilter 31
6 VB-compatible standard calls 32
6.1 AcqConnectToDatabase 32
6.2 AcqSetMaxNumOfSurveyIntervals 32
6.3 AcqAddSelectedCollarField 32
6.4 AcqAddSelectedAssay 32
6.5 AcqAddSelectedGeology 32
6.6 AcqAddSelectedItem 33
6.7 AcqClearSelectedItems 33
6.8 AcqSetCombineControlPage 33
6.9 AcqSetCombineOption 33
6.10 AcqAddPageToCombine 33
6.11 AcqSetCombineOn 33
6.12 AcqSetSurveyMethod 34
6.13 AcqSetSurveyInterval 34
6.14 AcqSetIncludeCoordinates 34
6.15 AcqSetUseIncludeCoordinates 34
6.16 AcqSetExcludeCoordinates 34
6.17 AcqGetServerTime 34
6.18 AcqGetObjectLoggingStatus 35
6.19 AcqSetMode 35
6.20 AcqEnableFullSelection 35
6.21 AcqEnableMultiGeologySelection 35
6.22 AcqSetConnectionString 35
6.23 AcqObjectOpenForSaving 35
6.24 AcqObjectWriteSelection 36
6.25 AcqObjectOpenFolder 36
6.26 AcqObjectOpenFile 36
6.27 AcqObjectWriteCurrentSelection 36
6.28 AcqObjectStartClientSection 36
6.29 AcqObjectCloseSection 36

acQuireDirect API - User Guide vii


6.30 AcqObjectWriteDouble 37
6.31 AcqObjectWriteSingle 37
6.32 AcqObjectWriteString 37
6.33 AcqObjectWriteVariant 37
6.34 AcqObjectOpenForReading 37
6.35 AcqObjectReadSelection 37
6.36 AcqObjectSetSelection 38
6.37 AcqObjectReadInt 38
6.38 AcqObjectReadDouble 38
6.39 AcqObjectReadSingle 38
6.40 AcqObjectReadVariant 38
6.41 AcqObjectClose 38
6.42 AcqGetCurrentSelection 39
6.43 AcqGetHoleBaseData, AcqGetSampleIntervalData, AcqGetGeologyIntervalData and
AcqGetSurveyIntervalData 39
6.44 AcqGetItemDescription 39
6.45 AcqGetItemLookups 39
6.46 AcqGetGeologyTypes 39
6.47 AcqGetAssayTypes 40
6.48 AcqGetSurveyTypes 40
6.49 AcqStartUpdate 40
6.50 AcqEndTransaction 40
6.51 AcqAddHoleIN 40
6.52 AcqSelectItemsOnly 40
6.53 AcqInsertHole 41
6.54 AcqSaveSettingsAsDefaults 41
6.55 AcqSaveCurrentSettingsAsDefaults 41
6.56 AcqLoadSettingsFromDefaults 41
6.57 AcqResetSelection 41
6.58 AcqCloseLibrary 41
Appendix A: acQuireDirect interface 42
Common features 42
Connect to a database 42
Data selection 43
Profile Selection view 43

acQuireDirect API - User Guide viii


Profile configuration 44
For Operation Mode = DRILLHOLE 44
Select holes 44
Filter 45
Geographic 45
Assay 46
Geology 46
Survey 49
For Operation Mode = POINTSAMPLE 51
Select campaign 51
Geographic selection 52
Point samples 53
Appendix B: Header files 54

acQuireDirect API - User Guide ix


1 Introduction
1.1 About acQuireDirect
The acQuireDirect API is a programming interface to access data stored in an acQuire 4 database based on the
acQuire Data Model.
The API presents the tools for the user to select a particular subset of the drillhole or point information from the
database using the acQuireDirect interface. The data is selected under the headings of Collar, Survey, Assay and
Geology. There are appropriate filters that can be applied to define the selection. When the selection process
has been completed, the selected data set is made available to the current client software.
acQuireDirect provides essentially a monodirectional transfer of a data set from the acQuire 4 database to the
client. The data transfer is monodirectional with the exception of the following functions:
AcqInsertHole
AcqStartUpdate
AcqUpdateGeology
AcqRenameHole
AcqEndTransaction
AcqUpdateAliases.
1.1.1 Advantages of acQuireDirect
The advantages of acQuireDirect are:
The user and the developer are totally insulated from the acQuire Data Model.
It has been optimised to efficiently present the selected data to the client.
Additional data processing is supplied, especially for drillhole data. For example:
o Geographic selection. Select only those drillholes located within a defined areal extent.
o De-survey drillholes using a variety of de-surveying methods.
o Internal splitting of geological and analytical results.
Sophisticated object filtering is supplied with the API. For example, select only data assigned to a particular
project or tenement.

1.2 Obtaining acQuireDirect


To access acQuireDirect you need to apply to acQuire Technology Solutions Pty Ltd. for a software agreement.
When the software agreement is finalised, the software is made available on the acQuire web site.
Contact details for acQuire Technology Solutions Pty Ltd. are available on the last page.

1.3 Accessing modified data sets


If object tracking is installed on the acQuire 4 database the process of refreshing the data set on the client
software is performed more efficiently.
With object tracking installed on the acQuire 4 database, each drillhole or point campaign is assigned a date and
time stamp. This stamp is updated every time any modification is made to the drillhole or point campaign, or to

acQuireDirect API - User Guide 1


data associated with the campaign.

The client software can access the date and time information implemented by object tracking in the database
via the API. This means that a refresh of the data set from within the client software is executed efficiently.
Utilising the client software local cache, data that has been modified will be replaced and data added since the
last refresh will be added to the current data set. Drillhole or point campaigns and associated data that has been
deleted from the acQuire 4 database will disappear from the client data set.

1.4 Installation recommendations


Ideally, the acQuireDirect libraries should be accessed from a single discrete location. However, it is advisable
that the acQuireDirect version is installed with the client software. This will negate problems that could arise
with different versions of acQuireDirect and different versions of the client software.
1.4.1 acQuire Read API
The acQuire Read API is the Developer Kit. It contains header files, libraries and API documentation and
installation notes. The installer for the acQuire Read API can be downloaded from the acQuire website.
1.4.2 acQuireDirect 64-bit
If you are using the 64-bit version of acQuireDirect and want to include the runtime libraries in your installer,
the Coordinate Transformation.exe binary must be registered as part of your installation process. This can be
done by running the following command:
CoordinateTransformation.exe /regserver

1.4.3 Conventions
To direct you to the particular option in acQuire 4, for example, the path will be written as follows:
Manage, SQL Server, Attach Database.
This means that you should open the Manage menu, then open SQL Server in the drop-down menu, then click
Attach Database.

1.5 Programming
This manual assumes prior experience of programming.

acQuireDirect API - User Guide 2


1.6 Linking to acQuireDirect
acQuireDirect.ocx depends upon acQuire 4 being installed locally. If using acQuireDirect on a machine where
acQuire 4 is not installed make sure that the dependent dlls are installed. It is recommended that acQuireDirect
is dynamically loaded at run time.

1.7 Terms and abbreviations


ADM The acQuire Data Model; the acQuire 4 collection of defined tables and their relationships.

ODBC Object Data Base Connectivity. This controls the interactions between the database system and
an application program (such as the acQuire API).

DBMS Data Base Management System - for example MS SQL Server or Oracle.

RDBMS Relational database management system such as MS SQL Server or Oracle.

Form A view of a table in the ADM. Forms are created and named in acQuire 4.

Compound form A view of a combination of tables in the ADM. The view appears similar to a form (a view of
one table), although some of the fields in the tables that constitute the compound form are
pivoted to appear as columns.
Compound forms are created in acQuire 4. A compound form is created or constructed from a
compound definition. The user can change the default name of the compound form.

Compound definition The query that defines the particular tables and the fields that are pivoted (virtual fields) in the
named form.

Object tracking Object tracking can be installed in the acQuire 4 database. It records when a change is made to
any part of a drillhole/point campaign combination. Each drillhole/point campaign combination
is known as an object. A record is kept of when and who made the change. The change to an
object could occur at any level in the database. For example, renaming or deleting a drillhole.

acQuireDirect API - User Guide 3


2 Constructing a program
2.1 Overview
The methods and properties, the actual programming interface of the API control, and the construction of a
program incorporating them are dealt with in this section. The approach used is to investigate ‘how it is done’
and ‘what is happening’.
A program is usually a combination of components working together to provide the programmer with tools to
achieve an efficient program. The acQuireDirect API is one such component. This manual investigates the rules
that are applied by the API and describes the acQuireDirect API interface in detail.

2.2 COM support interface


2.2.1 Loading a COM object
When you run an executable that contains an COM control, the .ocx file associated with it must be registered in
the system registry. acQuireDirect.ocx is registered when you install acQuire 4.
2.2.2 Registration of the COM object
If acQuireDirect has not been registered, you can achieve this by running RegSvr32 with the full path to the
acQuireDirect file.
For example: RegSvr32 “Location of the file”\AcqDirectX.ocx
The whole acQuireDirect API control module becomes available for use in the associated code.

acQuireDirect API - User Guide 4


3 API interface functions
3.1 AcqGetVersion
Usage long int AcqGetVersion();

Returns Long integer

Description Get the acQuireDirect library version number. This is a long integer number representing the
acQuireDirect version ex. 4382 will represent the version 4.3.8.2.

3.2 AcqHCreate
Usage void *AcqHCreate(void);

Returns Handle to created acQuireDirect object.

Description Create an instance of the acQuireDirect object. The returned value should be passed to all subsequent
calls to the acQuireDirect library.

3.3 AcqHDestroy
Usage void AcqHDestroy(void *pAcqH);

Returns void

Description Destroy the acQuireDirect object. This function should be called to release the memory of the
acQuireDirect object. After this call the pAcqH handle will be invalid.

3.4 AcqHResetSelection
Usage void AcqHResetSelection(void *pAcqH);

Returns void

Description The selection settings will be reset to the default values. Any fields selected will be removed.

3.5 AcqHSetInitialSettings3
Usage void AcqHSetInitialSettings3(void *pAcqH, const AcqParamStruct3
*pParam);

Returns void

Description Set the initial state of the user selection. The selection is passed as the AcqParamStruct3 structure.

3.6 AcqHSetParams
Usage void AcqHSetParams(void *pAcqH, const AcqDirectParam *pParam);

Returns void

Description Set the settings for acQuireDirect. AcqDirectParam contains a full set of parameters therefore this
function should be used. The function above can be used to set parameters modified by the client
program.

acQuireDirect API - User Guide 5


3.7 AcqHGetCurrentSettings3
Usage AcqParamStruct3 *AcqHGetCurrentSettings3(void *pAcqH);

Returns Pointer to structure AcqParamStruct3.

Description Create and allocate the settings structure with the currently selected options.

3.8 AcqHGetCurrentParams
Usage AcqDirectParam *AcqHGetCurrentParams(void *pAcqH);

Returns Pointer to AcqDirectParam.

Description Create and allocate the settings structure with the currently selected options. Use this function to
keep the settings for later use. The AcqDirectParam structure contains the full selection information.

3.9 AcqHGetParamStruct
Usage AcqParamStruct3 *AcqHGetParamStruct(void *pAcqH, const AcqDirectParam
*pParam);

Returns Pointer to structure AcqParamStruct3.

Description Create and allocate the settings structure with the currently selected options. AcqDirectParam
structure contains the full selection set but it is in the form that can’t be interpreted by the client
program. Use this function to convert the AcqDirectParam to AcqParamStruct3.

3.10 AcqHDeleteSettingStruct3
Usage void AcqHDeleteSettingStruct3(AcqParamStruct3 *Setting);

Returns void

Description Delete the allocated structure. It is recommended to use this function to delete the structure created
via AcqHGetCurrentSettings3 or AcqHGetParamStruct.

3.11 AcqHGetGeodeticOptions
Usage AcqGeodTransformOptions *AcqHGetGeodeticOptions(void *pAcqH);

Returns Pointer to AcqGeodTransformOptions structure.

Description Get the geodetic options selected. AcqGeodTransformOptions defines the destination grid and all the
grids required to transform it to a geographic grid. It is an array of grid definitions where the
destination grid is at index NumGrid-1 and the top grid is at index 0.

3.12 AcqHDeleteGeodeticOptions
Usage void AcqHDeleteGeodeticOptions(void *pAcqH, AcqGeodTransformOptions
*pOptions);

Returns void

Description Delete the geodetic options structure.

acQuireDirect API - User Guide 6


3.13 AcqHLoadParams
Usage AcqDirectParam *AcqHLoadParams(void *pAcqH, LPCTSTR FileName);

Returns Pointer to AcqDirectParam.

Description Load the settings from the file.

3.14 AcqHDeleteParams
Usage void AcqHDeleteParams(void *pAcqH, AcqDirectParam *Param);

Returns Pointer to AcqDirectParam.

Description Delete the allocated structure. You must call this function to delete the structure created via
AcqHGetCurrentParams or AcqHLoadParams.

3.15 AcqHStartSelection
Usage int AcqHStartSelection(void *pAcqH);

Returns 1 if user clicked OK (IDOK).


2 if user clicked CANCEL (IDCANCEL).

Description Start the selection dialog.

3.16 AcqHSelectItemsOnly
Usage int AcqHSelectItemsOnly(void *pAcqH);

Returns IDOK or IDCANCEL.

Description Show the selection dialog with items selections only (it will not be possible to change the connection
or any Collar settings).

3.17 AcqHGetDataFromAcquire
Usage int AcqHGetDataFromAcquire(void *pAcqH);

Returns 1 if successful.
0 if failed.

Description acQuireDirect will open the select queries and prepare for the execution. The data is not fetched at
this stage.

3.18 AcqHGetModifiedDataFromAcquire
Usage int AcqHGetModifiedDataFromAcquire(void *pAcqH, long SinceTime);

Returns Integer

Description Retrieve the data changed since the given date from acQuire 4. SinceTime is of time_t type.

acQuireDirect API - User Guide 7


3.19 AcqHGetNumberOfHoles
Usage unsigned int AcqHGetNumberOfHoles(void *pAcqH);

Returns Integer

Description Get the number of drillholes /surveys available based on the selection criteria. This function can be
called after AcqHGetDataFromAcquire or AcqHGetModifiedDataFromAcquire.

3.20 AcqHGetDeletedHoles
Usage void AcqHGetDeletedHoles(void *pAcqH, AcqHStringArray *pHoles,
AcqHStringArray *pProjects);

Returns void

Description Get the holes that were deleted since the time required. This function can be called after
AcqHGetModifiedDataFromAcquire.

3.21 AcqHGetHoleData4
Usage AcqDrillhole4 *AcqHGetHoleData4(void *pAcqH, unsigned int Index);

Returns Pointer to AcqDrillhole4.

Description After the call to AcqHGetDataFromAcquire or AcqHGetModifiedDataFromAcquire, the data for the
selected holes or surveys can be fetched in the sequential order. Call this function in the loop to
access the data for the given Hole or Survey.

3.22 AcqHDeleteHoleData4
Usage void AcqHDeleteHoleData4(void *pAcqH, AcqDrillhole4 *pHole);

Returns void

Description Delete the memory allocated for the Hole or Survey data.

3.23 AcqHGetCollarFunctionFields
Usage void AcqHGetCollarFunctionFields(void *pAcqH, AcqHStringArray
*pFields);

Returns An array of field names in the order HoleID, ProjectCode, East, North, RL Depth.

Description Get the database field names of the HoleID, ProjectCode, East,North, RL and Depth.

3.24 AcqHGetExtendedCollarFunctionFields
Usage void AcqHGetExtendedCollarFunctionFields(void *pAcqH, AcqHStringArray
*pFields);

Returns An array of field names in the order HoleID, ProjectCode, East, North, RL, Depth, GridName,
TenementID.

Description Get the database Collar field names of HoleID, ProjectCode, East, North, RL, Depth, GridName and
TenementID.

acQuireDirect API - User Guide 8


3.25 AcqHGetCollarFieldDefinitions
Usage void AcqHGetCollarFieldDefinitions(void *pAcqH, const AcqHStringArray
*pFields, AcqHWordArray *pTypes, AcqHWordArray *pLengths, AcqHWordArray
*pPrecs);

Returns The Types, Lengths and Precisions of the fields requested in Field array.

Input pFields

Output pTypes, pLengths, pPrecs.

Description Get the Collar fields definition.


The pTypes contains the types of the field defined as:
enum ACQCTYPE {ACQ_C_STRING, ACQ_C_BYTE, ACQ_C_INT, ACQ_C_FLOAT, ACQ_C_
DBL, ACQ_C_BOOL, ACQ_C_LONG, ACQ_C_TIME, ACQ_C_BYTEARR, ACQ_C_LONGBIN,
ACQ_C_DATE, ACQ_C_NOTDEFINED};

3.26 AcqHAddSelectedCollarField
Usage void AcqHAddSelectedCollarField(void *pAcqH, LPCTSTR Field);

Returns void

Description Adds the field to the selected Collar fields.

3.27 AcqHAddSelectedAssay
Usage void AcqHAddSelectedAssay(void *pAcqH, LPCTSTR Assay);

Returns void

Description Add the field to the selected Assay fields.

3.28 AcqHAddSelectedGeology
Usage void AcqHAddSelectedGeology(void *pAcqH, LPCTSTR Code);

Returns void

Description Add the secondary code to the selected Geology fields.

3.29 AcqHClearSelectedItems
Usage void AcqHClearSelectedItems(void *pAcqH);

Returns void

Description Delete all selected Items from Assay and Geology pages.

acQuireDirect API - User Guide 9


3.30 AcqHAddSelectedItem
Usage void AcqHAddSelectedItem(void *pAcqH, LPCTSTR Item);

Returns void

Description Add the Assay or Geology item to the selected list. Use this function if it is unknown if the Item is
Geology or Assay.

3.31 AcqHSetUseIncludeCoordinates
Usage void AcqHSetUseIncludeCoordinates(void *pAcqH, BOOL Use);

Returns void

Description Set the include coordinates option on or off.

3.32 AcqHSetIncludeCoordinates
Usage void AcqHSetIncludeCoordinates(void *pAcqH, double MinEast, double
MaxEast, double MinNorth, double MaxNorth, double MinRL, double MaxRL);

Returns void

Description Set the include coordinates range option.

3.33 AcqHSetUseExcludeCoordinates
Usage void AcqHSetUseExcludeCoordinates(void *pAcqH, BOOL Use);

Returns void

Description Set the exclude coordinates option on or off.

3.34 AcqHSetExcludeCoordinates
Usage void AcqHSetExcludeCoordinates(void *pAcqH, double MinEast, double
MaxEast, double MinNorth, double MaxNorth, double MinRL, double MaxRL);

Returns void

Description Set the exclude coordinates option range option.

3.35 AcqHGetAssayFunctionFields
Usage void AcqHGetAssayFunctionFields(void *pAcqH, AcqHStringArray *pFields);

Returns An array of field names.

Drillholes Initialised to HoleID, ProjectCode, SampleID,From,To;

Points Initialised to HoleID, ProjectCode, SampleID, PointEast, PointNorth, PointRL.

Description Get Assay/PointSample database field names.

acQuireDirect API - User Guide 10


3.36 AcqHGetExtendedAssayFunctionFields
Usage void AcqHGetExtendedAssayFunctionFields(void *pAcqH, AcqHStringArray
*pFields);

Returns An array of field names.

Drillholes Initialised to HoleID, ProjectCode, SampleID,From,To;

Points Initialised to HoleID, ProjectCode, SampleID, PointEast, PointNorth, PointRL.

Description Get Assay/PointSample database field names.

3.37 AcqHDestroyAcqAssays
Usage void AcqHDestroyAcqAssays(AcqAssays *pAssayCodes);

Returns void

Description Delete the AcqAssays structure allocated in the function AcqHGetAssayFieldDefinitions.

3.38 AcqHIsAssayTypeNumeric
Usage BOOL AcqHIsAssayTypeNumeric(void *pAcqH, LPCTSTR Assay);

Returns boolean

Description Check that the given assay is numeric.

3.39 AcqHGetGeologyFunctionFields
Usage void AcqHGetGeologyFunctionFields(void *pAcqH, int Page,
AcqHStringArray *pFields);

Returns The array initialised to HoleID, ProjectCode, From, To, Priority.

Description Get the database field names from the given Geology page.

acQuireDirect API - User Guide 11


3.40 AcqHGetAssayFieldDefinitions
Usage void AcqHGetAssayFieldDefinitions(void *pAcqH, const AcqHStringArray
*pFields, AcqAssays *pAssayCodes);

Returns Assay field definitions for the given fields.

Input pFields

Output pAssayCodes

Description Get Assay fields definition. AcqAssays is defined as:


typedef struct AcqAssayCode
{
   LPCTSTR Assay;
   int IsCode;
   WORD DataType;
   WORD Length;
   WORD UserPrecision;
   // If IsCode then the following will be returned (if defined in the
database)
   LPCTSTR Description;
   LPCTSTR Comments;
   LPCTSTR Units;
   LPCTSTR AnalysisMethod;
   double AnalyticalWeight;
   LPCTSTR Element;
   LPCTSTR DigestType;
   LPCTSTR DigestDegree;
   double Rank;
   CAssayDetection Detection;
   AcqStandards Standards;
} AcqAssayCode;
typedef struct AcqAssays
{
   int Count;
   AcqAssayCode *pInfo;
} AcqAssays;

3.41 AcqHGetPageGeologyFieldDefinitions
Usage void AcqHGetPageGeologyFieldDefinitions(void *pAcqH, int Page, const
AcqHStringArray *pFields, AcqHWordArray *pTypes, AcqHWordArray
*pLengths, AcqHWordArray *pPrecs);

Returns Geology field Types, Lengths, Precisions

Input Page, pFields

Output pTypes, pLengths, pPrecs

Description Get Geology fields definition.

acQuireDirect API - User Guide 12


3.42 AcqHGetSurveyFunctionFields
Usage void AcqHGetSurveyFunctionFields(void *pAcqH, AcqHStringArray
*pFields);

Returns An array of field names initialised to HoleID, ProjectCode, Depth, Azimuth, Dip, Priority, SurveyType.

Description Get the survey database field names.

3.43 AcqHGetSurveyFieldDefinitions
Usage void AcqHGetSurveyFieldDefinitions(void *pAcqH, const AcqHStringArray
*pFields, AcqHWordArray *pTypes, AcqHWordArray *pLengths, AcqHWordArray
*pPrecs);

Returns Survey field Types, Lengths, Precisions

Input Page, pFields

Output pTypes, pLengths, pPrecs

Description Get Survey fields definition.

3.44 AcqHGetAliases
Usage void AcqHGetAliases(void *pAcqH, LPCTSTR Client, LPCTSTR CD,
AcqHStringArray *pFields, AcqHStringArray *pAliases);

Returns Survey field Types, Lengths, Precisions

Input Client, CD

Output Fields, Aliases

Description Get the field aliases for the given client and compound definition. The alias table contains the field
names to be substituted during drillhole or point sample export.

3.45 AcqHUpdateAliases
Usage BOOL AcqHUpdateAliases(void *pAcqH, LPCTSTR Client, LPCTSTR CD, const
AcqHStringArray *pAcqFields, const AcqHStringArray *pAliases);

Returns TRUE if successful.

Description Update the database with the given aliases for the given client and compound definition.

3.46 AcqHGetOperationMode
Usage ACQXOPERATIONMODES AcqHGetOperationMode(void *pAcqH);

Returns ACQXOPERATIONMODES

Description Get the current operating mode selecting either DRILLHOLES or POINTSAMPLES.

3.47 AcqHSetOperationMode
Usage void AcqHSetOperationMode(void *pAcqH, ACQXOPERATIONMODES nNewMode);

Returns void

acQuireDirect API - User Guide 13


Description Set the mode of operation - select either DRILLHOLES or POINTSAMPLES.
Available modes:
SELECT_DRILLHOLES = 0
SELECT_POINTSAMPLES = 1
SELECT_DRILLHOLES_SILENT = 2
SELECT_POINTSAMPLES_SILENT = 3
SELECT_DRILLHOLES_AGGREGATE = 4
SELECT_POINTSAMPLES_AGGREGATE = 5
SELECT_DRILLHOLES_AGGREGATE_SILENT = 6
SELECT_POINTSAMPLES_AGGREGATE_SILENT = 7
This function should be called prior to:
AcqHStartSelection
AcqHSelectItemsOnly
AcqHGetDataFromAcquire
AcqHGetCollarAggregateData
AcqHGetPointAggregateData

3.48 AcqHSetConnectionString
Usage void AcqHSetConnectionString(void *pAcqH, LPCTSTR ConnString);

Returns void

Description Set the connection string.

3.49 AcqHSetConnection
Usage void AcqHSetConnection(void *pAcqH, LPCTSTR ODBC, LPCTSTR User, LPCTSTR
Password);

Returns void

Description Set the new connection details and reconnect with new user/password/ODBC.

3.50 AcqHHideConnectionPage
Usage void AcqHHideConnectionPage(void *pAcqH, int Hide);

Returns void

Description The connection page will not be displayed.


This means that it will not be possible to change the connection from the acQuireDirect dialog. This
function should be called before AcqHStartSelection.

3.51 AcqHConnect
Usage short AcqHConnect(void *pAcqH);

Returns 0 if successful.
-1 if failed.

Description Connect to the database.


Note that the connection string or ODBC name, User name and password must be specified before
calling this function. If the database was already connected it will disconnect first and reconnect with
the new credentials.

acQuireDirect API - User Guide 14


3.52 AcqHCheckConnect
Usage short AcqHCheckConnect(void *pAcqH);

Returns 0 if successful.
-1 if failed.

Description Connect to the database only if it is not already connected.


If the connection details have changed or if you want to connect to a different database, call
AcqHConnect instead.

3.53 AcqHEnableMultiGeology
Usage void AcqHEnableMultiGeology(void *pAcqH, int Enable);

Returns void

Description Enable or disable selection of more than one geology page.


Default is enabled.

3.54 AcqHGetValidationLookups
Usage int AcqHGetValidationLookups(void *pAcqH, LPCTSTR CDName, LPCTSTR
Field, AcqHStringArray *pValues, LPCTSTR ExtraField, AcqHStringArray
*pExtraValues);

Returns Validation lookup values. If ExtraField is defined the values for this field is returned as well.

Input CDName, Field, ExtraField

Output pValues, pExtraValues

Description Get the validation lookup for the given compound definition and field.

acQuireDirect API - User Guide 15


3.55 AcqHGetFunctionLookups
Usage void AcqHGetFunctionLookups(void *pAcqH, LPCTSTR Function, LPCTSTR
Field, AcqHStringArray *pLookups);

Returns Lookup values for the given ‘function’.

Input Function, Field

Output pLookups

Description Get the values for the given field from the given ‘function’. The ‘function’ can be one of following:
Assay, Geology, Survey, Collar. This allows accessing the data from the table or compound definition
without knowing its origin.

3.56 AcqHGetCDFields
Usage void AcqHGetCDFields(void *pAcqH, LPCTSTR CDName, AcqHStringArray
*pFields);

Returns Fields from the compound definition.

Input CDName

Output pFields

Description Get the fields from the given compound definition.

3.57 AcqHGetFormDefFields
Usage void AcqHGetCDFields(void *pAcqH, LPCTSTR CDName, AcqHStringArray
*pFields);

Returns Fields from the form definition.

Input Category, FormDef.

Output pFields

Description Get fields from the given form definition identified by Category and FormDef.

3.58 AcqHGetGeolPrimaryCode
Usage LPCTSTR AcqHGetGeolPrimaryCode(void *pAcqH, LPCTSTR Code);

Returns Primary code.

Description Get the primary code for the given secondary code or NULL if not defined.

3.59 AcqHSetCollarBasedOn
Usage void AcqHSetCollarBasedOn(void *pAcqH, LPCTSTR CD);

Returns void

Description Set the compound definition that the Collar data is based on.
This may be required if the form definition is not defined.

acQuireDirect API - User Guide 16


3.60 AcqHSetAssayBasedOn
Usage void AcqHSetAssayBasedOn(void *pAcqH, LPCTSTR CD);

Returns void

Description Set the compound definition that the Assay data is based on.
This may be required if the form definition is not defined.

3.61 AcqHSetGeologyBasedOn
Usage void AcqHSetGeologyBasedOn(void *pAcqH, LPCTSTR CD);

Returns void

Description Set the compound definition that the Geology data is based on.
This may be required if the form definition is not defined.

3.62 AcqHSetSurveyBasedOn
Usage void AcqHSetSurveyBasedOn(void *pAcqH, LPCTSTR CD);

Returns void

Description Set the compound definition that the Survey data is based on.
This may be required if the form definition is not defined.

3.63 AcqHDeleteHoleFromDatabase
Usage int AcqHDeleteHoleFromDatabase(void *pAcqH, LPCTSTR HoleID, LPCTSTR
ProjectCode);

Returns void

Description Delete the hole from the database.


Use with caution. All data associated with the given hole will be destroyed.

3.64 AcqHRenameHole
Usage int AcqHRenameHole(void *pAcqH, LPCTSTR OldHoleID, LPCTSTR
OldProjectCode, LPCTSTR NewHoleID, LPCTSTR NewProjectCode);

Returns 1 if successful.
0 if failed.

Description Rename the drillhole.

3.65 AcqHAddSelectedHoles
Usage void AcqHAddSelectedHoles(void *pAcqH, const AcqHStringArray *pHoleIDs,
const AcqHStringArray *pProjects);

Returns void

Description Set the holes to be selected. Will overwrite filter selection.

acQuireDirect API - User Guide 17


3.66 AcqHStartUpdate
Usage BOOL AcqHStartUpdate(void *pAcqH, BOOL NoCommit);

Returns TRUE if successful.

Description Start updating the database.


If NoCommit is TRUE, it will not commit the changes until AcqHEndTransaction is called.
Otherwise all the changes will be committed automatically.

3.67 AcqHEndTransaction
Usage BOOL AcqHEndTransaction(void *pAcqH, BOOL Commit);

Returns TRUE if successful.

Description Finish updating the database. Commit or rollback changes.

3.68 AcqHGetLastError
Usage void AcqHGetLastError(void *pAcqH, char *pcError, long lLength);

Input pAcqH acQuireDirect handle.


pcError Buffer in which to put the message.
lLength Size of the buffer.

Returns TRUE if successful.

Description Get the text of the last error.


lLength is the maximum length in the pcError buffer.

3.69 AcqHUpdateGeology
Usage BOOL AcqHUpdateGeology(void *pAcqH, LPCTSTR HoleID, LPCTSTR
ProjectCode, LPCTSTR SecondaryCode, double Priority, BOOL
DeletePrevious, int NumberOfIntervals, const AcqXGeologyIntervalType
*pIntervals);

Returns TRUE if successful.


FALSE if failed.

Description Update the Geology intervals for the given SecondaryCode and Priority. DeletePrevious
will delete existing codes first.
Only Codes with primary code prefix defined by FUNCTION GEOUPDATABLE can be updated.
FUNCTION is set in METAFUNCTION table.

3.70 AcqHGetServerTime
Usage long AcqHGetServerTime(void *pAcqH);

Returns Long Integer

Description Get the database server current time.

acQuireDirect API - User Guide 18


3.71 AcqHInsertHole4
Usage BOOL AcqHInsertHole4(void *pAcqH, const AcqDrillhole4 *pHole, LPCTSTR
HoleType);

Returns TRUE if successful.

Description Insert the new hole to the database.


Only Collar data and Survey intervals are supported at this stage.

3.72 AcqHSaveSettingsAsDefaults
Usage void AcqHSaveSettingsAsDefaults(void *pAcqH, LPCTSTR Profile, const
AcqDirectParam *pParams);

Returns void

Description Save the given settings as the default parameters under the given profile.

3.73 AcqHSaveCurrentSettingsAsDefaults
Usage void AcqHSaveCurrentSettingsAsDefaults(void *pAcqH, LPCTSTR Profile);

Returns void

Description Save the current settings as the default parameters under the given profile.

3.74 AcqHLoadSettingsFromDefaults
Usage void AcqHLoadSettingsFromDefaults(void *pAcqH, LPCTSTR Profile);

Returns void

Description Load the settings from the default table and sets them as the current selection.

3.75 AcqHGetObjectLoggingStatus
Usage int AcqHGetObjectLoggingStatus(void *pAcqH);

Returns ON or OFF

Description Return the status of the object logging system. It will be required for the loading data that has been
modified since a given time.

3.76 AcqHSetSurveyMethod
Usage void AcqHSetSurveyMethod(void *pAcqH, short nNewValue);

Returns void

Description Set the desurvey method that will be used. The desurvey method available are
DESURVFITSPLINE = 0
DESURVBACKCALC = 1
DESURVSEMITANGENT = 2
DESURVSPLITSEG = 3
NODESURVEYING = 4

acQuireDirect API - User Guide 19


3.77 AcqHSaveParams
Usage int AcqHSaveParams(void *pAcqH, const char *FileName, const
AcqDirectParam *Param);

Returns TRUE if successful.


FALSE if failed.

Description Save the settings to the file.

3.78 AcqHCreateStringArray
Usage int AcqHCreateStringArray(AcqHStringArray *pStr, int Count);

Input pStr, Count

Returns TRUE if successful.


FALSE if failed.

Description Create the array of Count strings. This array is used in number of functions to pass the array of data,
ex. Field names or lookup values.

3.79 AcqHSetStringAt
Usage void AcqHSetStringAt(const AcqHStringArray *pStr, int Index, LPCTSTR
Str);

Input pStr, Index, Str

Description Set the given string at the given index in the pStr array.

3.80 AcqHAddString
Usage void AcqHAddString(AcqHStringArray *pStr, LPCTSTR Str);

Input pStr, Index, Str

Description Add the given string to the array. The size of the array will be automatically increased.

3.81 AcqClose
Usage void AcqClose(void)

Description Close acQuire 4.


This function should be called before exiting the client program.

3.82 AcqHSetErrorFileName
Usage void AcqHSetErrorfileName(LPCTSTR sFileName)

Description Set the file name for error messages.

acQuireDirect API - User Guide 20


3.83 AcqHSetOutputPath
Usage void AcqHSetOutputPath(void *pAcqH, LPCTSTR Path)

Description Set the folder where the log files will be created.

3.84 AcqHSetConnectionTrusted
Usage void AcqHSetConnectionTrusted(void *pAcqH, int On)

Description Set the connection to trusted.

3.85 AcqHGetCompoundAliases
Usage void AcqHGetCompoundAliases(void *pAcqH, LPCTSTR Client, LPCTSTR CD,
LPCTSTR Category, LPCTSTR FormName, AcqHStringArray *pFields,
AcqHStringArray *pAliases)

Description Get aliases for the fields defined by the form definition.
If Category and FormName are defined and the form definition is valid, returns fields and aliases
for this form definition.
If the compound definition is defined, returns all fields and aliases for this compound definition.

3.86 AcqHForceShowConnectionPage
Usage void AcqHForceShowConnectionPage(void *pAcqH, int Set)

Description If the client passes the connection string the connection page will not be displayed. To force the
connection page anyway call this function.

3.87 AcqHSetCollarItemsDefaultOptions
Usage void AcqHSetCollarItemsDefaultOptions(void *pAcqH, int MaxLength, int
Increment, int NoOfDecimals)

Description Set the default option applied for collar items.

3.88 AcqHSetAssayItemsDefaultOptions
Usage void AcqHSetAssayItemsDefaultOptions(void *pAcqH, int MaxLength, int
Increment, int NoOfDecimals)

Description Set the default option applied for assay items.

3.89 AcqHSetGeologyItemsDefaultOptions
Usage void AcqHSetGeologyItemsDefaultOptions(void *pAcqH, int MaxLength, int
Increment, int NoOfDecimals)

Description Set the default option applied for geology items.

acQuireDirect API - User Guide 21


3.90 AcqHSetSurveyItemsDefaultOptions
Usage void AcqHSetSurveyItemsDefaultOptions(void *pAcqH, int MaxLength, int
Increment, int NoOfDecimals)

Description Set the default option applied for survey items.

3.91 AcqHSetBoundingBox
Usage void AcqHSetBoundingBox(void *pAcqH, const AcqCoord *pMin, const
AcqCoord *pMax, const AcqGeodGridDef *pGridDef)

Description Set the bounding box defined in the grid defined by pGridDef.
pGridDef can be NULL, in which case it is assumed that the box coordinates are in the same grid as
the destination grid.

3.92 AcqHForceDestinationGridSelection
Usage void AcqHForceDestinationGridSelection(void *pAcqH, BOOL bForce)

Description Force the user to select the destination grid and apply transformation.

3.93 AcqHUpdateSettings
Usage void AcqHUpdateSettings(void *pAcqH, const AcqParamStruct3 *pParam)

Description Update the settings defined in pParam structure only. It will not affect the settings outside of this
structure.

acQuireDirect API - User Guide 22


3.94 AcqHSetDestinationCoordSystem
Usage void AcqHSetDestinationCoordSystem(void *pAcqH, const AcqGeodGridDef
*pGridDef)

Description Define the destination coordinate system.


AcqGeodGridDef is defined as:
typedef struct AcqCoord
{
double X;
double Y;
double Z;
} AcqCoord;
typedef struct AcqGridPoints
{
double X;
|double Y;
double Z;
double ParentX;
double ParentY;
double ParentZ;
} AcqGridPoints;
typedef struct AcqGeodGridDef
{
const char *GridName;
const char *ParentGrid;
const char *GridType;
const char *Description;
const char *Datum;
const char *ProjectionMethod;
const char *LocalDatumTransform;
const char *TransformationType;
double GridAzimuth;
double XMin;
double YMin;
double ZMin;
double XMax;
double YMax;
double ZMax;
unsigned int NumPoints;
AcqGridPoints **ParentChildPoints;
} AcqGeodGridDef;

acQuireDirect API - User Guide 23


3.95 AcqHGetSpatialSelectionOptions
Usage *AcqHGetSpatialSelectionOptions(void *pAcqH);

Description AcqHGetSpatialSelectionOptions returns the AcqSpatialSelectionSettings


structure, which is defined as:
typedef struct AcqGridDefinition
{
const char *sGridName;
const char *sDescription;
const char *sGridType;
const char *sUnits;
int iNumParams;
const char **psParams;
const char *sDatum;
const char *sElipsoid;
const char *sProjectionMethod;
const char *sProjectionType;
double XMin;
double YMin;
double ZMin;
double XMax;
double YMax;
double ZMax;
} AcqGridDefinition;
typedef struct AcqGeographicRange
{
AcqGridDefinition *GeometryGrid;
int UseInclude;
AcqCoord InclMin;
AcqCoord InclMax;
int UseExclude;
AcqCoord ExclMin;
AcqCoord ExclMax;
} AcqGeographicRange;
typedef struct AcqGridInput
{
const char *GridName;
int NumCoordinateSets;
const char **CoordinateSets;
} AcqGridInput;
typedef struct AcqSpatialSelectionSettings
{
AcqGeographicRange *GeogrRange;
int LimitByGeometry;
const char *GeometryFile;
const char *GeometryType;
const char *GeometryGrid;
int NumFilterSelections;
AcqGeometryFilterOperation **GeomSelectionFilter;
int AutoRankGrids;
int NumGridsSelected;
AcqGridInput **GridsSelected;
AcqGridDefinition *DestinationGrid;
} AcqSpatialSelectionSettings;

acQuireDirect API - User Guide 24


3.96 AcqHSetSpatialSelectionOptions
Usage void AcqHSetSpatialSelectionOptions(void *pAcqH,
AcqSpatialSelectionSettings *pOptions);

Description Set the spatial selection options.

3.97 AcqHDeleteSpatialSelectionOptions
Usage void AcqHDeleteSpatialSelectionOptions(void *pAcqH,
AcqSpatialSelectionSettings *pOptions);

Description Delete the spatial selection options.

3.98 AcqHSetCombineParams
Usage void AcqHSetCombineParams(void *pAcqH, BOOL on, LPCTSTR
controlPageName, BOOL commonIntervals, BOOL fillGaps, BOOL
combineAllCodesToAssayIntervals);

Description Set the options for splitting and combining intervals. The parameters are:
controlPageName: To use the controlling interval option for combining pages, set this
parameter to the name of the page containing the controlling intervals.
commonIntervals: To use the smallest common interval option for combining pages, set this
parameter to 1.
fillGaps: This option can be used to fill missing intervals, if needed.
combineAllCodesToAssayIntervals: If this option is set to 1, all geology codes from the
list of pages to be combined will be displayed against the assay intervals.
Note: Use AcqHAddPageToCombine to add the pages to be combined.

3.99 AcqHAddPageToCombine
Usage void AcqHAddPageToCombine(void *pAcqH, LPCTSTR PageName);

Description Add pages to be combined when using the split/combine intervals functionality.

3.100 AcqHCombineSurveyCodesToAssayIntervals
Usage void AcqHCombineSurveyCodesToAssayIntervals(void *pAcqH, BOOL on);

Returns void

Description Assigns the survey intervals data to assay intervals. All the data will be returned in the Assay part of
the drillhole data structure.

3.101 AcqHEnableMultiAssay
Usage void AcqHEnableMultiAssay(void *pAcqH, int Enable);

Returns void

Description Enable or disable selection of more than one assay page. Default is disabled.

acQuireDirect API - User Guide 25


3.102 AcqHGetCurrentSettings4
Usage AcqParamStruct4 *AcqHGetCurrentSettings4(void *pAcqH);

Returns Pointer to structure AcqParamStruct4

Description Create and allocate the settings structure with the currently selected options, where AcqParamStrct4
is:
typedef struct AcqParamStruct4
{
AcqParamStruct3 *Params;
int NumAssaySelections;
AcqAssaySelection **Assays;
} AcqParamStruct4;

3.103 AcqHUpdateSettings4
Usage void AcqHUpdateSettings4(void *pAcqH, const AcqParamStruct4 *pParam);

Returns void

Description Update the settings defined in pParam structure only. It will not affect the settings outside this
structure.

3.104 AcqHDeleteSettingStruct4
Usage void AcqHDeleteSettingStruct4(AcqParamStruct4 *pSetting);

Returns void

Description Delete the allocated structure. It is recommended to use this function to delete the structure created
using AcqHGetCurrentSettings4.

acQuireDirect API - User Guide 26


3.105 AcqHGetAcquireData
Usage AcquireObject *AcqHGetAcquireData(void *pAcqH, unsigned int index);

Returns Pointer to structure AcquireObject.

Description Get the data with multiple assays, where:


typedef struct AcqAssayStreams
{
   unsigned int Num;
   AcqSampleData **pSamples;
} AcqAssayStreams;

// with support for multiple assay streams


typedef struct AcquireObject
{
   AcqCollarData CollarData;
   unsigned int NumSurveys;
   AcqSurveyData **pSurveys;
   unsigned int NumAssayStreams;
   AcqAssayStreams **pAssayStreams;
   unsigned int NumGeologyStreams;
   AcqGeoData **pGeologyStreams;
   int NumGeophysicStreams;
   AcqGeoStream **pGeophysStreams;
   void *pReserved;
   int UpdateTime;
} AcquireObject;

3.106 AcqHDeleteAcquireData
Usage void AcqHDeleteAcquireData(void *pAcqH, AcquireObject *pData);

Returns void

Description Delete the allocated structure. It is recommended to use this function to delete the structure created
using AcqHGetAcquireData.

3.107 AcqHCacheData
Usage void AcqHCacheData(void *pAcqH)

Returns void

Description Set this option to cache the data in the tables. The user can then get the data directly from the tables.

3.108 AcqHGetCacheTablesNames
Usage AcqCacheTables AcqHGetCacheTablesNames(void *pAcqH)

Returns AcqCacheTables

Description Returns all of the acQuireDirect cache table names.

acQuireDirect API - User Guide 27


3.109 AcqHDeleteCacheTables
Usage void AcqHDeleteCacheTables(void *pAcqH)

Returns void

Description Drops all acQuireDirect cache tables.

3.110 AcqHDeleteCacheTablesNames
Usage void AcqHDeleteCacheTablesNames(void *pAcqH, AcqCacheTables *ct)

Returns void

Description Free memory allocated for AcqCacheTables.

3.111 AcqHCacheProfile
Usage void AcqHCacheProfile(void *pAcqH, const char *profileName)

Returns void

Description Creates and populates the tables related to the saved profile.

acQuireDirect API - User Guide 28


4 Aggregation functions
Aggregate functions are used when AcqHSetOperationMode is set to one of the following modes:
SELECT_DRILLHOLES_AGGREGATE
SELECT_POINTSAMPLES_AGGREGATE
SELECT_DRILLHOLES_AGGREGATE_SILENT
SELECT_POINTSAMPLES_AGGREGATE_SILENT
The aggregate functions can only be called from a command line. A selection file is required for these modes.
The procedure for using aggregation modes is as follows:
1. Prepare a selection file. In order to define the parameters for selection, use command line options; the
aggregate options cannot be set in the acQuireDirect GUI. To prepare a selection file, call export.exe with
the command line options and save the selection file to disk without opening the acQuireDirect edit
window. This selection file then can be used when accessing the aggregate data.
2. Set AcqHSetOperationMode to the required aggregation mode.
3. Specify the selection file.
4. Call the function AcqHGetCollarAggregateData or AcqHGetPointAggregateData.
5. Call AcqHDeleteAggregateData in order to delete the results.

4.1 AcqHGetCollarAggregateData
Usage AcqAggregateCatalog *AcqHGetCollarAggregateData(void *pAcqH);

Returns Drillhole data catalogue.

Description Extract aggregate drillhole data.

4.2 AcqHGetPointAggregateData
Usage AcqAggregateCatalog *AcqHGetPointAggregateData(void *pAcqH);

Returns Point sample data catalogue.

Description Extract aggregate point sample data.

4.3 AcqHDeleteAggregateData
Usage void AcqHDeleteAggregateData(void *pAcqH AcqAggregateCatalog *pData);

Returns void

Description Delete aggregate data.

acQuireDirect API - User Guide 29


5 Filter functions
5.1 AcqHCreateFilter
Usage char *AcqHCreateFilter(void *pAcqH, unsigned int *Size)

Returns The pointer to the memory allocated for the filter.

Description Create the filter object.


Size contains the size of the object.

5.2 AcqHDestroyFilter
Usage void AcqHDestroyFilter(void *pAcqH, char *pFilter)

Description Destroys the filter object.

5.3 AcqHAddGroupToFilter
Usage int AcqHAddGroupToFilter(void *pAcqH, char **Filter, unsigned int
*Size,const char *LinkToPrevious)

Returns If successful: the index of the new group.


If unsuccessful: -1.

Description Add a new group to the filter.


Filter and Size will be updated with the current information.

5.4 AcqHAddFieldToFilter
Usage int AcqHAddFieldToFilter(void *pAcqH, char **Filter, unsigned int
*Size, const char *CompoundDef, const char *Table, int Group, const
char *Field, const char *Operator,const char *Val1, const char *Val2,
const char *LinkToPrevious)

Returns If successful: 1.
If unsuccessful: 0 or -1: 0 if passed filter is valid; or-1 if passed filter is invalid.

Description Add the new field to the filter group.


Filter and Size will be updated with the current information.

5.5 AcqHSetFilterCustomSQL
Usage int AcqHSetFilterCustomSQL(void *pAcqH, char **pFilter, unsigned int
*Size, LPCTSTR SQL)

Description Set the custom filter.


After creating a filter using AcqCreateFilter, call AcqSetFilterCustomSQL to set the
custom SQL for the filter.

acQuireDirect API - User Guide 30


5.6 AcqHSetSurveyFilter
Usage void AcqHSetSurveyFilter(void *pAcqH, const char *Filter, unsigned int
Size)

Description Apply the filter to the Survey selection.

5.7 AcqHSetCollarFilter
Usage void AcqHSetCollarFilter(void *pAcqH, const char *Filter, unsigned int
Size)

Description Apply the filter to the Collar selection.

5.8 AcqHSetAssayFilter
Usage void AcqHSetAssayFilter(void *pAcqH, const char *Filter, unsigned int
Size)

Description Apply the filter to the Assay selection.

5.9 AcqHSetGeologyFilter
Usage void AcqHSetGeologyFilter(void *pAcqH, int Page,const char *Filter,
unsigned int Size)

Description Apply the filter to the Geology selection.

acQuireDirect API - User Guide 31


6 VB-compatible standard calls
These functions are the standard call type functions required for VB6 compatibility. Some of the functions are
duplicated in the previous section but, they are necessary due to the backwards compatibility requirement of
the program.

6.1 AcqConnectToDatabase
Usage int STDAPICALLTYPE AcqConnectToDatabase(void);

Returns 0 if successful.
-1 if failed.

Description Connect to the database.

6.2 AcqSetMaxNumOfSurveyIntervals
Usage int STDAPICALLTYPE AcqSetMaxNumOfSurveyIntervals(int Max);

Returns 0 if successful.
-1 if failed.

Description Set the maximum number of survey intervals.


Used in desurveying routines.

6.3 AcqAddSelectedCollarField
Usage void STDAPICALLTYPE AcqAddSelectedCollarField(LPCTSTR Field);

Returns void

Description Adds the field to the selected Collar fields.

6.4 AcqAddSelectedAssay
Usage void STDAPICALLTYPE AcqAddSelectedAssay(LPCTSTR Assay);

Returns void

Description Adds the field to the selected Assay fields.

6.5 AcqAddSelectedGeology
Usage void STDAPICALLTYPE AcqAddSelectedGeology(LPCTSTR Code);

Returns void

Description Add the secondary code to the selected Geology fields.

acQuireDirect API - User Guide 32


6.6 AcqAddSelectedItem
Usage void STDAPICALLTYPE AcqAddSelectedItem(LPCTSTR Item);

Returns void

Description Add the Assay or Geology item to the selected list.


Use this function if it is unknown if the Item is Geology or Assay.

6.7 AcqClearSelectedItems
Usage void STDAPICALLTYPE AcqClearSelectedItems(void);

Returns void

Description Delete all selected Items from Assay and Geology pages.

6.8 AcqSetCombineControlPage
Usage void STDAPICALLTYPE AcqSetCombineControlPage(LPCTSTR PageName);

Returns void

Description Set which page should be used as the control page for combining intervals.

6.9 AcqSetCombineOption
Usage void STDAPICALLTYPE AcqSetCombineOption(short Option);

Returns void

Description Set the combine intervals option to Common intervals (1) or controlled by item intervals (0).

6.10 AcqAddPageToCombine
Usage void STDAPICALLTYPE AcqAddPageToCombine(LPCTSTR PageName);

Returns void

Description Add the page to the combining of intervals.

6.11 AcqSetCombineOn
Usage void STDAPICALLTYPE AcqSetCombineOn(short On);

Returns void

Description Add the page to the combining of intervals.

acQuireDirect API - User Guide 33


6.12 AcqSetSurveyMethod
Usage void STDAPICALLTYPE AcqSetSurveyMethod(short nNewValue);

Returns void

Description Set the desurvey method that will be used. The desurvey methods available are:
DESURVFITSPLINE = 0
DESURVBACKCALC = 1
DESURVSEMITANGENT = 2
DESURVSPLITSEG = 3
NODESURVEYING = 4

6.13 AcqSetSurveyInterval
Usage void STDAPICALLTYPE AcqSetSurveyInterval(short nNewValue);

Returns void

Description Set the desurvey interval.

6.14 AcqSetIncludeCoordinates
Usage void STDAPICALLTYPE AcqSetIncludeCoordinates(double MinEast, double
MaxEast, double MinNorth, double MaxNorth, double MinRL, double MaxRL);

Returns void

Description Set the include coordinates option.

6.15 AcqSetUseIncludeCoordinates
Usage void STDAPICALLTYPE AcqSetUseIncludeCoordinates(BOOL Use);

Returns void

Description Set the include coordinates option on or off.

6.16 AcqSetExcludeCoordinates
Usage void STDAPICALLTYPE AcqSetExcludeCoordinates(double MinEast, double
MaxEast, double MinNorth, double MaxNorth, double MinRL, double MaxRL);

Returns void

Description Set the exclude coordinates option.

6.17 AcqGetServerTime
Usage long int STDAPICALLTYPE AcqGetServerTime();

Returns Long Integer

Description Get the server current time.

acQuireDirect API - User Guide 34


6.18 AcqGetObjectLoggingStatus
Usage int STDAPICALLTYPE AcqGetObjectLoggingStatus();

Returns ON or OFF

Description Return the status of the object logging system.


This will be required for the loading data that has been modified since a given time.

6.19 AcqSetMode
Usage int STDAPICALLTYPE AcqSetMode(ACQXOPERATIONMODES nNewMode);

Returns TRUE if successful.


SELECT_DRILLHOLES = 0
SELECT_POINTSAMPLES = 1
SELECT_DRILLHOLES_SILENT = 2
SELECT_POINTSAMPLES_SILENT = 3

Description Set the operation mode to drillholes or points.

6.20 AcqEnableFullSelection
Usage int STDAPICALLTYPE AcqEnableFullSelection(int Enable);

Returns TRUE if successful.

Description Enable or disable the full selection.


If full selection is disabled only selection filters can be modified.

6.21 AcqEnableMultiGeologySelection
Usage int STDAPICALLTYPE AcqEnableMultiGeologySelection(int Enable);

Returns TRUE if successful.

Description Enable creating more than one Geology page.

6.22 AcqSetConnectionString
Usage int STDAPICALLTYPE AcqSetConnectionString(LPCTSTR ConnString);

Returns TRUE if successful.

Description Set the connection string.

6.23 AcqObjectOpenForSaving
Usage int STDAPICALLTYPE AcqObjectOpenForSaving(LPCTSTR FileName);

Returns TRUE if successful.

Description Open the file for saving. This is the compound file into which any data can be saved.

acQuireDirect API - User Guide 35


6.24 AcqObjectWriteSelection
Usage int STDAPICALLTYPE AcqObjectWriteSelection(int ObjectHandler, VARIANT
*pParm);

Returns TRUE if successful.

Description Write the selection criteria to the file identified by the ObjectHandler.

6.25 AcqObjectOpenFolder
Usage int STDAPICALLTYPE AcqObjectOpenFolder(int ObjectHandler, int
DirHandler, const char *Name);

Returns Folder handler

Description Open the folder inside the compound file.

6.26 AcqObjectOpenFile
Usage int STDAPICALLTYPE AcqObjectOpenFile(int ObjectHandler, const char
*Name);

Returns File handler

Description Open the file in the directory identified by the ObjectHandler and DirHandler inside the
compound file.

6.27 AcqObjectWriteCurrentSelection
Usage int STDAPICALLTYPE AcqObjectWriteCurrentSelection(int ObjectHandler);

Returns TRUE if successful.

Description Write the current selection settings to the compound file.

6.28 AcqObjectStartClientSection
Usage int STDAPICALLTYPE AcqObjectStartClientSection(int ObjectHandler, int
Version const char *ClientName);

Returns TRUE if successful.

Description Start the new client selection (defined by version) inside the compound file.

6.29 AcqObjectCloseSection
Usage int STDAPICALLTYPE AcqObjectCloseSection(int ObjectHandler, int
Storage);

Returns TRUE if successful.

Description Close the file inside the compound file.

acQuireDirect API - User Guide 36


6.30 AcqObjectWriteDouble
Usage int STDAPICALLTYPE AcqObjectWriteDouble(int StreamHandler, double
dValue);

Returns TRUE if successful.

Description Write the double value to the file in the compound file.

6.31 AcqObjectWriteSingle
Usage int STDAPICALLTYPE AcqObjectWriteSingle(int StreamHandler, float
fValue);

Returns TRUE if successful.

Description Write the single value to the file in the compound file.

6.32 AcqObjectWriteString
Usage int STDAPICALLTYPE AcqObjectWriteString(int StreamHandler, const char
*Str);

Returns TRUE if successful.

Description Write the string to the file in the compound file.

6.33 AcqObjectWriteVariant
Usage int STDAPICALLTYPE AcqObjectWriteVariant(int StreamHandler, VARIANT
*Var);

Returns TRUE if successful.

Description Write the variant value to the file in the compound file.

6.34 AcqObjectOpenForReading
Usage int STDAPICALLTYPE AcqObjectOpenForReading(LPCTSTR FileName);

Returns Handle to the opened file.

Description Open the compound file for reading.

6.35 AcqObjectReadSelection
Usage int STDAPICALLTYPE AcqObjectReadSelection(int ObjectHandler, VARIANT
*pParm);

Returns TRUE if successful.

Description Read the selection settings from the compound file.

acQuireDirect API - User Guide 37


6.36 AcqObjectSetSelection
Usage int STDAPICALLTYPE AcqObjectSetSelection(VARIANT *pParam);

Returns TRUE if successful.

Description Set the selection settings for acQuireDirect from the VARIANT read from the compound file.

6.37 AcqObjectReadInt
Usage int STDAPICALLTYPE AcqObjectReadInt(int StreamHandler, int *iValue);

Returns TRUE if successful.

Description Read the integer value from the file.

6.38 AcqObjectReadDouble
Usage int STDAPICALLTYPE AcqObjectReadDouble(int StreamHandler, double
*dValue);

Returns TRUE if successful.

Description Read the double value from the compound file.

6.39 AcqObjectReadSingle
Usage int STDAPICALLTYPE AcqObjectReadSingle(int StreamHandler, float
*fValue);

Returns TRUE if successful.

Description Read the single value from the compound file.

6.40 AcqObjectReadVariant
Usage int STDAPICALLTYPE AcqObjectReadVariant(int StreamHandler, VARIANT
*Var);

Returns TRUE if successful.

Description Read the VARIANT value from the compound file.

6.41 AcqObjectClose
Usage int STDAPICALLTYPE AcqObjectClose(int ObjectHandler);

Returns TRUE if successful.

Description Close the object compound file.

acQuireDirect API - User Guide 38


6.42 AcqGetCurrentSelection
Usage int STDAPICALLTYPE AcqGetCurrentSelection(AcqXSettings *pSel);

Returns TRUE if successful.

Description Get the current selection criteria.

6.43 AcqGetHoleBaseData, AcqGetSampleIntervalData,


AcqGetGeologyIntervalData and AcqGetSurveyIntervalData
Usage int STDAPICALLTYPE AcqGetHoleBaseData(int Index, AcqXDrillhole *pHole);

int STDAPICALLTYPE AcqGetSampleIntervalData(int HoleIndex, int


Interval, AcqXSampleIntervalType *pSample);
int STDAPICALLTYPE AcqGetGeologyIntervalData(int HoleIndex, int Page,
int Interval, AcqXGeology *pInterval);
int STDAPICALLTYPE AcqGetSurveyIntervalData(int HoleIndex, int
Interval, AcqXSurveyDetailType *pSurvey);

Returns TRUE if successful.

Description Hole data functions, returning the data associated with the hole from the given Index.
The data should be fetched in sequential order.

6.44 AcqGetItemDescription
Usage int STDAPICALLTYPE AcqGetItemDescription(LPCTSTR Category, LPCTSTR
Form, AcqXItemInfo *pItem);

Returns TRUE if successful.

Description Get the item description.

6.45 AcqGetItemLookups
Usage int STDAPICALLTYPE AcqGetItemLookups(LPCTSTR Category, LPCTSTR Form,
AcqXLookups*pLookups);

Returns TRUE if successful.

Description Get the item description.

6.46 AcqGetGeologyTypes
Usage int STDAPICALLTYPE AcqGetGeologyTypes(int Page, VARIANT *pFields,
VARIANT *pTypes, VARIANT *plsCode);

Returns TRUE if successful.

Description Get the Geology item types.


pFields should have the item names that are required. pTypes and plsCode should be initialised as
one array and be of the correct size.

acQuireDirect API - User Guide 39


6.47 AcqGetAssayTypes
Usage integer STDAPICALLTYPE AcqGetAssayTypes(VARIANT *pFields, VARIANT
*pTypes, VARIANT *plsCode);

Returns TRUE if successful.

Description Get the Assay item types. pFields should have the item names that are required. pTypes and plsCode
should be initialised as an array and be of the correct size.

6.48 AcqGetSurveyTypes
Usage int STDAPICALLTYPE AcqGetSurveyTypes(VARIANT *pFields, VARIANT *pTypes,
VARIANT *pLength);

Returns TRUE if successful.

Description Get the Survey item types. pFields should have the item names that are required. pTypes and pLength
should be of the correct size.

6.49 AcqStartUpdate
Usage BOOL STDAPICALLTYPE AcqStartUpdate(BOOL NoCommit);

Returns TRUE if successful.

Description Start updating the database. If NoCommit is True, it will not commit the changes until
AcqEndTransaction is called. Otherwise all the changes will be committed automatically.

6.50 AcqEndTransaction
Usage BOOL STDAPICALLTYPE AcqEndTransaction(BOOL Commit);

Returns TRUE if successful.

Description Finish updating the database. Commit or roll back changes.

6.51 AcqAddHoleIN
Usage BOOL STDAPICALLTYPE AcqAddHoleIN(LPCTSTR HoleID, LPCTSTR ProjectCode);

Returns TRUE if successful.

Description Add the hole to those selected.

6.52 AcqSelectItemsOnly
Usage int STDAPICALLTYPE AcqSelectItemsOnly();

Returns IDOK or IDCANCEL

Description Show the selection dialog with items selections only (no connection change or Collar selection).

acQuireDirect API - User Guide 40


6.53 AcqInsertHole
Usage BOOL STDAPICALLTYPE AcqInsertHole(AcqDrillhole3 *pHole, LPCTSTR
HoleType);

Returns TRUE if successful.

Description Insert the new hole to the database. Only Collar data and Survey intervals are supported at this stage.

6.54 AcqSaveSettingsAsDefaults
Usage void STDAPICALLTYPE AcqSaveSettingsAsDefaults(LPCTSTR Profile,
AcqDirectParam *pParams);

Returns void

Description Save the given settings as the default parameters under the given profile.

6.55 AcqSaveCurrentSettingsAsDefaults
Usage void STDAPICALLTYPE AcqSaveCurrentSettingsAsDefaults(LPCTSTR Profile);

Returns void

Description Save the current settings as the default parameters under the given profile.

6.56 AcqLoadSettingsFromDefaults
Usage void STDAPICALLTYPE AcqLoadSettingsFromDefaults(LPCTSTR Profile);

Returns void

Description Load the settings from the default table and sets them as the current selection.

6.57 AcqResetSelection
Usage void STDAPICALLTYPE AcqResetSelection();

Returns void

Description Clear the current selection.

6.58 AcqCloseLibrary
Usage void STDAPICALLTYPE AcqCloseLibrary();

Returns void

Description Close acQuire.

acQuireDirect API - User Guide 41


Appendix A: acQuireDirect interface
Common features
The acQuireDirect interface can operate in DRILLHOLE or POINTSAMPLE mode. This section describes the
features that are common to both operation modes.
Connect to a database
acQuire 4 can connect to client databases using either ODBC or DAP. Click a tab to select the appropriate
protocol.
Highlight the row with the appropriate ODBC Name and Driver. Click the Connect button and, after a logon, a
connection will be made to the acQuire 4 database.
Note: If using the 64-bit version of acQuireDirect, 64-bit ODBC links must be used. 32-bit System ODBC links will
only be visible in the 32-bit version of acQuireDirect.
When connected, the data selection sheet tabs will display.

acQuireDirect API - User Guide 42


Data selection
There are two interfaces available for selecting the data to be exported:
Advanced: used by administrators and power users to select the specific data sets for each export as well as
setting other advanced options, such as splitting/combining intervals and managing export profiles. This view
will be different depending on whether the DRILLHOLE or POINTSAMPLE operation mode is used.
Profile Selection: provides a simplified interface for end users and is identical for both the DRILLHOLE and
POINTSAMPLE operation modes.
Profile Selection view
If the Show Profile Selection as default view checkbox is selected in the Manage Profiles dialog, the Profile
Selection view displays instead of the Advanced view. This streamlines the export process for end users, as all
they need to do is select an appropriate export profile that has been preconfigured for them, without needing
to know anything about the more advanced features of the acQuireDirect data selection interface or the
acQuire Data Model (ADM). This view also includes limited options for filtering the data set and transforming
coordinates, if needed.
Note: You can still access the Advanced view from the Profile Selection view by clicking the Advanced button
at the bottom of the window.

acQuireDirect API - User Guide 43


Profile configuration
Note: Only users with an acQuireManager licence can add, change or delete profiles.
Clicking the Profiles button in the Advanced view opens the Manage Profiles dialog. This lets you save your
current selection settings as an export profile that can be reused by other users. To do this, enter an appropriate
profile name in the Profile field and (optionally) a description of the profile in the Description field, then click
Save. Existing profiles can also be loaded or deleted using the Load and Delete buttons. The Show Profile
Selection as default view checkbox determines whether or not end users will see the Profile Selection or
Advanced view when they first access the data selection dialog.

For Operation Mode = DRILLHOLE


The Advanced view is used to define the selection criteria for the data that will be made available from the
acQuire 4 database to the client. The selection settings available in this view are described below.
Select holes
Select the form definition that best defines the drillhole information required by the client from the database.
A Collar form definition defines a particular set of fields from the acQuire 4 database. Each field in the form
definition is available to specify a particular subset of data using a filter.

acQuireDirect API - User Guide 44


Filter
Define a filter to subset the data presented to the client from the database. If the filter is defined on the Select
Holes dialog, the criteria, if valid, is always met. If filters are defined on subsequent dialogs, the data must first
meet the requirements of the Select Holes filter and then the requirements of the others. Filter buttons are
available on most dialogs for Operation Mode = DRILLHOLE and POINTSAMPLE.

Geographic
Two different operations are available on this dialog:
Dynamic grid transformation, with the results included in the client data set.
Define a client data subset by drillholes/points that occur within or outside defined coordinate limits, or
relative to 2D or 3D shapes imported from other applications.
This selection method is applicable for both Operation Mode = DRILLHOLE and POINTSAMPLE.
The Redefine coordinate fields button provides the opportunity to select fields for simple local coordinate
transformations.

acQuireDirect API - User Guide 45


Assay
Select the appropriate Assay form definition that best defines the data required by the client.
A filter, similar to that above, can be applied to further define the client data set. The Field list for this dialog
represents those of the selected Assay form definition.
The fields that will be included in the client data set are defined by selecting fields in the Use column.

Geology
Select the Geology form definition that best defines the data that is to be included in the client data set.
A filter, similar to that for Assay, can be applied to further define the subset. The Field list for this dialog
represents those of the selected Geology form definition.
The fields that will be included in the client data set are defined by selecting fields in the Use column.
Further sets of Geology data can be presented to the client by selecting the buttons highlighted in the graphic
below. These sets each have their own form definition and fields. All Geology sets are available in the client data
set.
The Geology dialog presents options to:
Combine overlapping intervals. If this is selected, intervals are combined in such a way as to eliminate
overlaps.
Preserve 0 length intervals. This is applicable when combining intervals. If this is selected, zero length
intervals will be treated as valid and included in the output.

acQuireDirect API - User Guide 46


Select only with Primary Code. This option aids the selection of fields that are to be included in the client
data set. The fields from the selected form definition that have a Primary Code equal to that selected are
highlighted. For example, the Primary Code in the following image is Alteration. The fields with this Primary
Code are highlighted. To select all the highlighted fields click one field in the Use column and all will be
selected.
Select the intervals with best priority only. If this is selected, only the intervals with the best priority will be
exported (e.g. if you have some intervals with PRIORITY = 1 and some with PRIORITY = 2, only the intervals
with PRIORITY =1 will be exported).

acQuireDirect API - User Guide 47


This Geology dialog has two geology pages: Geology Items and Alteration.

acQuireDirect API - User Guide 48


Survey
A number of options are available for selecting and enhancing the survey data that is presented to the client
data set. They include:
Use method. Select from the drop-down list of methods:
o Fit Spline
o Semi-Tangent
o Back Calculation
o Split Segments
o Minimum Curvature
o No Calculation.
Defined by collar field. The selected field should have the calculation method for a particular HoleID (Semi-
Tangent, Fit Spline, Back Calculation, Split Segment, Minimum Curvature or No Calculation). If there is no
desurveying method defined for the hole in the database, the default method is that defined by the Use
method.
De-survey interval. Enter the interval.
Always de-survey with assays. The de-survey interval will follow that defined by the De-survey interval as
much as possible. If a de-survey point occurs within an Assay interval, it will be shifted to the next SampTo
point.
Extend first survey to collar (if no survey at collar). If there is no collar survey, the first survey point will be
extended back to the collar.
Split sample (at the smaller of split interval or de-survey interval) if sample length is longer than. Split the
sample interval if the sample length is longer than the defined Split interval. It will be split at the smaller of:
o Split interval or
o De-survey interval.
Split geology interval (at the smaller of split interval or de-survey interval) if it is longer than. Split the
geology interval if the length is longer than the defined Split interval. It will be split at the smaller of:
o Split interval or
o De-survey interval.
Create default interval with Azimuth. If selected, default values for drillhole and azimuth are entered for
holes with no survey data.
Select Survey field list. Select the Survey form definition that best defines the data to be included in the
client view.
Filter. Apply a filter, similar to that available on other dialogs, to subset the data available to the client.
Load only where priority. Further subset the data that will be included in the client data set by defining the
value of an acceptable HoleSurvey.Priority.
Multiply survey dip by -1. If selected, all dips (in the default field of HoleSurvey.Dip or another field by
clicking the Redefine Fields button) will be multiplied by –1.
Add constant to Azimuth. Define the constant that will be added to the HoleSurvey.Azimuth (or another
field by clicking the Redefine Fields button).

acQuireDirect API - User Guide 49


Azimuth No. Dec. The number of decimal places that exported azimuths should be rounded to (leave blank
if rounding is not required).

acQuireDirect API - User Guide 50


For Operation Mode = POINTSAMPLE
The Advanced view is used to define the selection criteria for the data that will be made available from the
acQuire 4 database to the client. The selection settings available in this view are described below.
Select campaign
Select the Collar form definition that best defines the information required by the client from the database. For
point sample data, the name of the sampling campaign is stored in the Collar area of the acQuire 4 database.
The actual point data is stored elsewhere and is selected in the Point Sample dialog.
A Collar form definition defines a particular set of fields from the acQuire 4 database. Each field in the form
definition is available to specify a particular subset of data using a filter.

acQuireDirect API - User Guide 51


Geographic selection
Two different operations are available on this dialog.
Transform stored coordinates and azimuths from one grid system to another. This is achieved dynamically and
the results are included in the client data set.
The client data subset is defined by those drillholes/points that occur within or outside defined coordinate
limits.
This selection method is applicable for both Operation Mode = DRILLHOLE and POINTSAMPLE.
Redefine coordinate fields. This option provides the opportunity to select the coordinate data from either the
default (East, North and RL) or alternative coordinate fields.

acQuireDirect API - User Guide 52


Point samples
Select the Point Sample form definition that best defines the information required by the client from the
database.
The fields that will be included in the client data set are defined by selecting fields in the Use column.
A filter, similar to that on other dialogs, can be applied to further define the client data set. The Field list for this
dialog represents those of the selected Point Sample form definition.

acQuireDirect API - User Guide 53


Appendix B: Header files
Header Files
/* Interface for Acquire Direct */
/* Setup parameters - you can pass the parameters before AcqDirect starts
when the parameters will be used as the initial settings and get the
current settings after the selection */
/*de-surveying options*/
typedef enum {
     DESURVFITSPLINE = 0,
     DESURVBACKCALC = 1,
     DESURVSEMITANGENT,
     DESURVSPLITSEG,
     NODESURVEYING
} DESURVMETHOD;
typedef enum {
     ACQX_STRING,
     ACQX_BYTE,
     ACQX_INT,
     ACQX_FLOAT,
     ACQX_DBL,
     ACQX_BOOL,
     ACQX_LONG,
     ACQX_TIME,
     ACQX_BYTEARR,
     ACQX_LONGBIN,
     ACQX_DATE,
     ACQX_NOTDEFINED
} ACQDATATYPE;
/* Surveying coordinates */
typedef struct AcqXCoordType {
     double East
     double North;
     double RL;
} AcqXCoordType;
typedef struct AcqXSurveyType {
     double From;
     double To;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
     double Interval;
     double Depth;
     double Azimuth;
     double Dip;
} AcqXHoleSurveyType;
/* Acquire database definitions */
     #define HOLE_ID_SIZE 20
     #define PROJECT_CODE_SIZE 15
     #define HOLE_CODENAME_SIZE 15

acQuireDirect API - User Guide 54


     #define HOLE_CODEVALUE_SIZE 50
     #define TENEMENT_ID_SIZE 15
     #define RIG_ID_SIZE 15
     #define GRID_NAME_SIZE 20
     #define HOLE_TYPE_SIZE 15
     #define GEOLOGY_CODE_SIZE 254
     #define ASSAY_TYPE_SIZE 15
     #define SAMPLE_ID_SIZE 30
     #define SURVEY_TYPE_SIZE 15
     #define AZIMUTH_TYPE_SIZE 15
     #define HOLE_TYPE_DESCR_SIZE 254
     #define ASSAY_TYPE_DESCR_SIZE 254
     #define DATA_TYPE_SIZE 15
     #define SECONDARY_CODE_SIZE 15
     #define PRIMARY_CODE_SIZE 15
     #define STRUCTURE_NAME_SIZE 15
     #define SEC_CODE_DESCR_SIZE 50
     #define PROJECT_NAME_SIZE 50
     #define PROJECT_DESCR_SIZE 254
     #define AREA_CODE_SIZE 10
     #define HOLE_CODE_DESCR_SIZE 254
     #define PRIMARY_CODE_DESCR_SIZE 254
     #define MAX_GEOL_PAGES 10
/* Collar data */
typedef struct AcqXCollarType {
     char HoleID[HOLE_ID_SIZE];
     char Project[PROJECT_CODE_SIZE];
     double East;
     double North;
     double RL;
     double Depth;
} AcqXCollarType;
/* Hole Details */
typedef struct AcqXHoleDetailStruct {
     char CodeName[HOLE_CODENAME_SIZE];
     char CodeValue[HOLE_CODEVALUE_SIZE];
} AcqXHoleDetailStruct;
/* Sample Assay */
typedef struct AcqXAssayStruct {
     char AssayType[ASSAY_TYPE_SIZE+2];
     int IsNumeric;
     double Value;
     char TextValue[SECONDARY_CODE_SIZE+2];
} AcqXAssayStruct;
typedef struct AcqXSampleType {
     double From;
     double To;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
} AcqXSampleType;

acQuireDirect API - User Guide 55


/* Data type from the GeologyCodeSecondary table */
typedef struct AcqXGeologyCodeType {
     char Code[SECONDARY_CODE_SIZE+2];
     char Value[GEOLOGY_CODE_SIZE+2];
     char DataType[DATA_TYPE_SIZE+2];
} AcqXGeologyCodeType;
typedef struct AcqXHoleGeology {
     double From;
     double To;
     double Priority;
     unsigned int NumGeologyCodes;
} AcqXHoleGeology;
/* Assay type info */
typedef struct AcqXAssayInfoType {
     double Minimum;
     double Maximum;
     double Precision;
     int IsNumeric;
} AcqXAssayInfoType;
/* Geology interval */
typedef struct AcqXGeologyIntervalType {
     double From;
     double To;
     double Value;
     char TextValue[GEOLOGY_CODE_SIZE+2];
} AcqXGeologyIntervalType;
typedef enum {
     SELECT_DRILLHOLES,
     SELECT_POINTSAMPLES,
     SELECT_DRILLHOLES_SILENT,
     SELECT_POINTSAMPLES_SILENT
} ACQXOPERATIONMODES;
typedef struct AcqXGeolSelection {
     VARIANT Name;
     VARIANT FormDefinition;
     VARIANT Category;
     int UsePrimaryCode;
     VARIANT PrimaryCode;
     int CombineGeolIntervals;
     int CombineOptions;
     int NumGeologyItems;
     VARIANT GeologyItems;
} AcqXGeolSelection;
// Interval combine options
typedef struct AcqXCombineOptions {
     int On;
     int NumPagesToCombine;
     VARIANT PagesToCombine;
     int CommonMethod;
     VARIANT ControlingPage;

acQuireDirect API - User Guide 56


} AcqXCombineOptions;
typedef struct AcqXSettings {
     VARIANT ODBC;
     VARIANT User; 
     VARIANT Password;
     VARIANT EastFieldName;
     VARIANT NorthFieldName;
     VARIANT RLFieldName;
     VARIANT DepthFieldName;
     VARIANT DipFieldName;
     VARIANT AzimuthFieldName;
     VARIANT CollarFormDefinition;
     VARIANT CollarCategory;
     VARIANT AssayFormDefinition;
     VARIANT AssayCategory;
     VARIANT SurveyFormDefinition;
     VARIANT SurveyCategory;
     int NumCollarFields;
     VARIANT CollarFields;
     int NumAssayItems;
     VARIANT AssayItems;
     int NumSurveyItems;
     VARIANT SurveyItems;
     int UseIncludeCoordinates;
     AcqXCoordType MinInclude;
     AcqXCoordType MaxInclude;
     int UseExcludeCoordinates;
     AcqXCoordType MinExclude;
     AcqXCoordType MaxExclude;
     int UseTransformCoordinates;
     double OldEast;
     double OldNorth;
     double NewEast;
     double NewNorth;
     double TransAngle;
     int NumGeologySelections;
     AcqXGeolSelection GeologySelections[MAX_GEOL_PAGES];
     int DeSurveyMethod;
     double SurveyInterval;
     double SampleSplitInterval;
     int UseSurveyPriority;
     int InvertDip;
     double SurveyPriority;
     int UseCollarFieldToDesurvey;
     VARIANT CollarDesurveyField;
     int DesurveyWithAssays;
     int CombineOn;
     int NumPagesToCombine;
     VARIANT PagesToCombine;
     int CommonMethod;
     VARIANT ControlingPage;
} AcqXSettings;

acQuireDirect API - User Guide 57


Geodetic transformation data */
/* *****************************************/
/* Grid definition */
typedef struct AcqGridPoints {
     double X;
     double Y;
     double Z;
     double ParentX;
     double ParentY;
     double ParentZ;
} AcqGridPoints;
typedef struct AcqGeodGridDef {
     const char *GridName;
     const char *ParentGrid;
     const char *GridType;
     const char *Description;
     const char *Datum;
     const char *ProjectionMethod;
     const char *LocalDatumTransform;
     const char *TransformationType;
     double GridAzimuth;
     double XMin;
     double YMin;
     double ZMin;
     double XMax;
     double YMax;
     double ZMax;
     unsigned int NumPoints;
     AcqGridPoints **ParentChildPoints;
} AcqGeodGridDef;
/* Geodetic transformation options */
typedef struct AcqGeodTransformOptions {
     int NumGrids; /* Number of grids of the
                                         destination grid */
     AcqGeodGridDef **pGrids; /* Array of parent grids in order.
                                         The top grid is at index 0 and
                                         the destination grid is at
                                         index NumGrids-1*/
} AcqGeodTransformOptions;
/* Hole Data definitions */
/****************************************************/
/* Details description */
typedef struct AcqXDetailsStruct {
     VARIANT Name;
     VARIANT Value;
} AcqXDetailsStruct;
/* Sample definition */
typedef struct AcqXSampleIntervalType {
     double From;
     double To;
     AcqXCoordType FromCoord;

acQuireDirect API - User Guide 58


     AcqXCoordType ToCoord;
     VARIANT SampleName;
     int NumAssays;
     VARIANT AssayNames;
     VARIANT AssayValues;
} AcqXSampleIntervalType;
/* geology definition */
typedef struct AcqXGeology {
     double From;
     double To;
     int NumCodes;
     VARIANT CodeNames;
     VARIANT CodeValues;
} AcqXGeology;
/* Survey data */
typedef struct AcqXSurveyDetailType {
     double From;
     double To;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
     double Interval;
     double Depth;
     double Azimuth;
     double Dip;
     VARIANT SurveyType;
     int NumDetails;
     VARIANT SurvDetNames;
     VARIANT SurvDetValues;
} AcqXSurveyDetailType;
typedef struct AcqXDrillhole {
     VARIANT HoleID;
     VARIANT ProjectCode;
     double East;
     double North;
     double RL;
     double Depth;
     int NumHoleDetails;
     VARIANT HoleDetailNames;
     VARIANT HoleDetailValues;
     int NumSurveys;
     int NumSamples;
     int NumGeologyStreams;
     int NumStreamIntervals[MAX_GEOL_PAGES];
} AcqXDrillhole;
typedef struct AcqGeolSelection {
     const char *Name;
     const char *FormDefinition;
     const char *Category;
     int UsePrimaryCode;
     const char *PrimaryCode;
     int CombineGeolIntervals;

acQuireDirect API - User Guide 59


     int CombineOptions;
     unsigned int NumGeologyItems;
     const char **GeologyItems;
     unsigned int GeologyFilterSize;
     const char *GeologyFilter;
} AcqGeolSelection;
// Interval combine options
typedef struct AcqCombineOptions {
     int On;
     int NumPagesToCombine;
     const char **PagesToCombine;
     int CommonMethod;
     const char *ControlingPage;
} AcqCombineOptions;
def struct AcqParamStruct3 {
     const char *ODBC;
     const char *User;
     const char *Password;
     const char *EastFieldName;
     const char *NorthFieldName;
     const char *RLFieldName;
     const char *DepthFieldName;
     const char *DipFieldName;
     const char *AzimuthFieldName;
     unsigned int CollarFilterSize;
     const char *CollarFilter;
     const char *CollarFormDefinition;
     const char *CollarCategory;
     unsigned int AssayFilterSize;
     const char *AssayFilter;
     const char *AssayFormDefinition;
     const char *AssayCategory;
     const char *SurveyFormDefinition;
     const char *SurveyCategory;
     unsigned int CollarOrderSize;
     const char *CollarOrder;
     unsigned int NumCollarFields;
     const char **CollarFields;
     unsigned int NumAssayItems;
     const char **AssayItems;
     unsigned int NumSurveyItems;
     const char **SurveyItems;
     int UseIncludeCoordinates;
     AcqXCoordType MinInclude;
     AcqXCoordType MaxInclude;
     int UseExcludeCoordinates;
     AcqXCoordType MinExclude;
     AcqXCoordType MaxExclude;
     int UseTransformCoordinates;
     double OldEast;
     double OldNorth;
     double NewEast;

acQuireDirect API - User Guide 60


     double NewNorth;
     double TransAngle;
     unsigned int NumGeologySelections;
     AcqGeolSelection **GeologySelections;
     int DeSurveyMethod;
     double SurveyInterval;
     double SampleSplitInterval;
     int UseSurveyPriority;
     int InvertDip;
     double SurveyPriority;
     int UseCollarFieldToDesurvey;
     const char *CollarDesurveyField;
     int DesurveyWithAssays;
     AcqCombineOptions CombineOptions;
} AcqParamStruct3;
/*
   New acquire direct parameters and selection criteria will be hidden from
the client programs. It will be defined as an array of double and will not
change in the future.
   It will not be necessary to change of the client programs when extra
fields are added.
   Previous structures are still supported for backward compatibility
however for any new selection parameters the below structure should be
used.
*/
typedef struct AcqDirectParam {
     unsigned int Size; /* Size of the array in bytes */
     double *Params; /* Pointer to the selection
                                        parameters */
} AcqDirectParam;
/* Hole Data definitions */
/****************************************************/
/* Details description */
typedef struct AcqDetailsStruct {
     const char *Name;
     const char *Value;
     int Flags; // Ignore this (local use only)
} AcqDetailsStruct;
/* Sample definition */
typedef struct AcqSampleType {
     double From;
     double To;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
     const char *StructureName;
     const char *SampleName;
     unsigned int NumAssays;
     AcqDetailsStruct **Assays;
} AcqSampleType;
/* Survey data */

acQuireDirect API - User Guide 61


typedef struct AcqSurveyType2 {
     double From;
     double To;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
     double Interval;
     double Depth;
     double Azimuth;
     double Dip;
     const char *SurveyType;
     int NumDetails;
     AcqDetailsStruct **SurvDetails;
} AcqSurveyType2;
typedef struct AcqDrillhole4 {
     const char *HoleID;
     const char *ProjectCode;
     double East;
     double North;
     double RL;
     double Depth;
     unsigned int NumHoleDetails;
     AcqDetailsStruct **HoleDetails;
     unsigned int NumSurveys;
     AcqSurveyType2 **Surveys;
     unsigned int NumSamples;
     AcqSampleType **Samples;
     unsigned int NumGeologyStreams;
     AcqGeologyStream2 **GeologyStreams;
     void *pReserved;
     int UpdateTime;
} AcqDrillhole4;
typedef struct AcqGeologyStream2 {
     unsigned int NumGeologies;
     AcqGeology2 **Geologies;
} AcqGeologyStream2;
typedef struct AcqGeology2 {
     double From;
     double To;
     double Priority;
     AcqXCoordType FromCoord;
     AcqXCoordType ToCoord;
     unsigned int NumCodes;
     AcqDetailsStruct **SecondaryCodes;
} AcqGeology2;
typedef struct {
     int Count;
     LPTSTR *Str;
} AcqHStringArray;
typedef struct
{
     int Count;

acQuireDirect API - User Guide 62


     WORD *Val;
} AcqHWordArray;
/* Aggregate data */
typedef struct AcqPolygon
{
   int NumPoints;
   AcqCoord *pPoints;
} AcqPolygon;
typedef struct AcqAggregate
{
   double NumValue;
   SYSTEMTIME DateValue;
   int NumStrValues;
   const char **StrValues;
} AcqAggregate;
typedef struct AcqAggregateGroup
{
   const char *Key;
   AcqCoord Min;
   AcqCoord Max;
   int NumPolygons;
   AcqPolygon *pPolygons;
   AcqAggregate *pAggregates;
} AcqAggregateGroup;
typedef struct AcqAggregateCatalog
{
   int NumGroupFields;
   const char **GroupFields;
   int NumAggrFunctions;
   const char **AggregateFunctions;
   int NumAggrFields;
   const char **AggregateFields;
   const char **AggregateFieldsAliases;
   int *AggregateFieldsTypes;
   int *AggregateFieldsLengths;
   int *AggregateFieldsPrecisions;
   const char *GridName;
   int NumGroups;
   AcqAggregateGroup *Groups;
} AcqAggregateCatalog;
typedef struct AcqStringArray
{
unsigned int numItems;
const char **Items;
} AcqStringArray;
typedef struct AcqCacheTables
{
const char *Collar;
const char *Survey;

acQuireDirect API - User Guide 63


AcqStringArray *Assay;
AcqStringArray *Geology;
unsigned int numGeophysics;
AcqStringArray **Geophysics;
} AcqCacheTables;

acQuireDirect API - User Guide 64


Contact
Offices Australia, Canada, Chile, South Africa
Street address 26 Kintail Road, Applecross, Western Australia, 6153
Postal address PO Box 933, Canning Bridge, Western Australia, 6153
Telephone +61 8 9316 6600
Fax +61 8 9316 6699
Email [email protected]
Website www.acquire.com.au

Official information
acQuire Software Pty Ltd is the owner of the software and all icons and logos within the software, together with
all soft and hardcopy documentation.
This document is copyright. No part of this document may be reproduced by any process, or in any form,
without prior written consent from acQuire Technology Solutions Pty Ltd.

Disclaimer
acQuire Software Pty Ltd will not accept any liability arising from the use of the software or any other software
product mentioned in this document; nor for any technical or editorial errors or omissions made in this
document. The mention of any other computer software product in this document does not imply the
endorsement of such product by acQuire Software Pty Ltd.

You might also like