GTXclient C API GTXserver-16.0.2

- Main Page
- Related Pages
- Data Structures
- Files
- Examples

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
GTXClient.h File Reference

GTXserver C API. More...

`#include "GTXOs.h"`

Go to the source code of this file.

## Data Structures
struct | GTXFaultInfo
| Information on Fault System associated with a given file. More...
struct | GTXFileInfo
| Information on a File. More...
struct | GTXVariableInfo
| Information on a Variable. More...
struct | GTXFaultSegment
| Description of a Fault Segment. More...
struct | GTXFault
| Description of a Fault. More...
struct | GTXFaultSystem
| Description of a Fault System. More...
struct | GTXPolygon
| Description of a Polygon. More...
struct | GTXPolygonSystem
| Description of a Polygon System. More...
struct | GTXWireframeObject
| Description of a Wireframe Object. More...
struct | GTXWireframe
| Description of a Wireframe. More...
struct | GTXWireframeSystem
| Description of a Wireframe System. More...
struct | GTXColorScale
| Color Scale details. More...

## Macros
#define | GTX_CLIENT_VERSION 1300030

## Typedefs
typedef struct _GTXVendorDataRec * | GTXVendorData
| Opaque Vendor Data structure. More...

## Enumerations
enum | GTX_FILE_TYPE { GTX_FILE_TYPE_ANY = -1, GTX_FILE_TYPE_POINTS, GTX_FILE_TYPE_GRAVITY_LINES, GTX_FILE_TYPE_CORE_LINES, GTX_FILE_TYPE_GRID, GTX_FILE_TYPE_INVALID }
enum | GTX_VAR_TYPE { GTX_VAR_TYPE_SELECTION = -3, GTX_VAR_TYPE_FLOAT_ALL = -2, GTX_VAR_TYPE_ANY = -1, GTX_VAR_TYPE_FLOAT, GTX_VAR_TYPE_CHAR, GTX_VAR_TYPE_XG, GTX_VAR_TYPE_YG, GTX_VAR_TYPE_ZG, GTX_VAR_TYPE_MACRO, GTX_VAR_TYPE_INVALID }
enum | GTX_FORMAT_TYPE { GTX_FORMAT_TYPE_DECIMAL, GTX_FORMAT_TYPE_INTEGER, GTX_FORMAT_TYPE_EXPONENT, GTX_FORMAT_TYPE_FREE, GTX_FORMAT_TYPE_SHIFTED, GTX_FORMAT_TYPE_INVALID }
enum | GTX_CSCALE_TYPE { GTX_CSCALE_TYPE_AUTOMATIC, GTX_CSCALE_TYPE_ISOFREQ, GTX_CSCALE_TYPE_MANUAL, GTX_CSCALE_TYPE_FACIES, GTX_CSCALE_TYPE_INVALID }
enum | GTXErrorCode { GTX_ERROR_NONE = 0, GTX_ERROR_PARAMETER, GTX_ERROR_NETWORK, GTX_ERROR_SERVER, GTX_ERROR_MEMORY }
enum | GTXFeatureType { GTX_FEATURE_PALETTES, GTX_FEATURE_COLOR_SCALES }

## Functions
GLOBAL int | GTXClientInitialize (int linked_version)
| Initialize the client library. More...
GLOBAL void | GTXClientDebug (int mode)
| Set debug mode on / off. More...
GLOBAL GTXErrorCode | GTXClientGetLastError ()
| Get the last error that occured in GTXClient API. More...
GLOBAL unsigned short | GTXClientGetDefaultPort (void)
| Get the default port for GTXserver. More...
GLOBAL int | GTXClientLocateGTXserver (char *path)
| Locate GTXserver executable. More...
GLOBAL void | GTXClientSetGTXserverPath (const char *path)
| Set the GTXserver path to be used by GTXClientRunGTXserver() More...
GLOBAL int | GTXClientRunGTXserver (unsigned short *port)
| Locate GTXserver executable and run it. More...
GLOBAL int | GTXClientConnect (const char *host, unsigned short port, const char *path)
| Open a session with a running GTXserver to read isatis file system. More...
GLOBAL int | GTXClientIsConnected ()
| Check is client is connected with the server. More...
GLOBAL int | GTXClientDisconnect (void)
| Close the current session with the GTXserver. More...
GLOBAL int | GTXClientGetServerVersion ()
| Retrieves Server Protocol Version. More...
GLOBAL int | GTXClientServerHasFeature (GTXFeatureType type, int generate_error)
| Is Server supporting a given feature ? More...
GLOBAL int | GTXClientSetUnit (const char *unit)
| Set the current distance unit. More...
GLOBAL double | GTXClientUnitFactorFromSymbol (const char *symbol)
| Get the unit factor corresponding to a given unit symbol. More...
GLOBAL const char * | GTXClientUnitSymbolFromFactor (double factor)
| Get the unit factor corresponding to a given unit symbol. More...
GLOBAL int | GTXClientSetUnitMode (int mode)
| Change the way length units are used. More...
GLOBAL int | GTXClientSetCreationUnits (const char *x_unit, const char *y_unit, const char *z_unit)
| Change the default units for length variables creation. More...
GLOBAL void * | GTXClientFreePointer (void *pointer)
| Frees a pointer returned by a previous GTXClient function call. More...
GLOBAL char ** | GTXClientFreeStringArray (gtx_long nlist, char **list)
| Frees a string array returned by a previous GTXClient function call. More...
GLOBAL int | GTXClientGetStudyList (int *nb_study, char ***studies)
| Get study list in the Isatis file system. More...
GLOBAL int | GTXClientSetStudy (const char *study)
| Set the name of the current study. More...
GLOBAL int | GTXClientNewStudy (const char *study, const char *path)
| Create a new study in the Isatis file system. More...
GLOBAL int | GTXClientDeleteStudy (void)
| Delete the current study. More...
GLOBAL int | GTXClientGetDirectoryList (int *nb_dir, char ***directories)
| Get the list of directories in the current study. More...
GLOBAL int | GTXClientDirectoryExists (const char *dir_name, int *exists)
| Check if a given directory exists. More...
GLOBAL int | GTXClientSetDirectory (const char *dir)
| Set the current directory. More...
GLOBAL int | GTXClientNewDirectory (const char *name)
| Create a new directory in the current study. More...
GLOBAL int | GTXClientDeleteDirectory (void)
| Delete the current directory. More...
GLOBAL int | GTXClientGetFileList (int *nb_file, char ***files)
| Get the list of files in the current directory. More...
GLOBAL int | GTXClientGetFileListByType (GTX_FILE_TYPE file_type, int file_dim, int *nb_file, char ***files)
| Get the list of files in the current directory given a type and dimension. More...
GLOBAL int | GTXClientFileExists (const char *file_name, int *exists)
| Check if a given file exists. More...
GLOBAL int | GTXClientSetFile (const char *file)
| Set the current file in the current directory. More...
GLOBAL int | GTXClientDeleteFile (void)
| Delete the current file. More...
GLOBAL int | GTXClientGetFileInfo (GTXFileInfo *file_info)
| Get information about current file. More...
GLOBAL int | GTXClientGetFileComment (char **comment)
| Get the comment of the current file. More...
GLOBAL int | GTXClientSetFileComment (int append, const char *comment)
| Set a comment for the current file. More...
GLOBAL int | GTXClientNewPointsFile (const char *name, gtx_long nsample, const double *x, const double *y, const double *z)
| Create a new points file in the current directory. More...
GLOBAL int | GTXClientNewGridFile (const char *name, int dimension, double X0, double Y0, double Z0, double DX, double DY, double DZ, int NX, int NY, int NZ)
| Create a new grid file in the current directory. More...
GLOBAL int | GTXClientNewLinesFile (const char *name, int dimension)
| Create a new lines file in the current directory. More...
GLOBAL int | GTXClientPointsFileAppend (gtx_long nsample, const double *x, const double *y, const double *z)
| Append samples to the current Points File. More...
GLOBAL int | GTXClientLinesFileAddCoreLine (int nsample, double xbegin, double ybegin, double zbegin, const double *xend, const double *yend, const double *zend)
| Add a new line in the current lines file with core definition. More...
GLOBAL int | GTXClientLinesFileAddGravityLine (int nsample, const double *xg, const double *yg, const double *zg)
| Add a new line in the current lines file with gravity centers definition. More...
GLOBAL int | GTXClientLinesFileAddLineCoresOld (int nsample, double xbegin, double ybegin, double zbegin, const double *xend, const double *yend, const double *zend)
| Add a new line in the current lines file with core definition. More...
GLOBAL int | GTXClientLinesFileCreateLink (const char *points_file)
| Create a Link between current Lines file and its header Points file. More...
GLOBAL int | GTXClientGridModifyOrigin (double x0, double y0, double z0)
| Modify the origin of the current file (must be a grid) More...
GLOBAL int | GTXClientGridModifyMesh (double dx, double dy, double dz)
| Modify the mesh of the current file (must be a grid) More...
GLOBAL int | GTXClientGridModifyRotation (double az, double ay, double ax)
| Modify the rotation of the current file (must be a grid) More...
GLOBAL int | GTXClientGetVariableList (int *nb_var, char ***vars)
| Get the list of variables in the current file. More...
GLOBAL int | GTXClientGetVariableListByType (GTX_VAR_TYPE var_type, int *nb_var, char ***vars)
| Get the list of variables in the current file given a variable type. More...
GLOBAL int | GTXClientVariableExists (const char *var_name, int *exists)
| Check if a given variable exists. More...
GLOBAL int | GTXClientSetVariable (const char *var)
| Set the current variable in the current file. More...
GLOBAL int | GTXClientDeleteVariable (void)
| Delete the current variable. More...
GLOBAL int | GTXClientSetIndice (const int indice)
| Set the current indice for the current macro variable. More...
GLOBAL int | GTXClientSetAlphaIndice (const char *alphaindice)
| Set the current alpha indice for the current macro variable. More...
GLOBAL int | GTXClientGetVariableInfo (GTXVariableInfo *var_info)
| Get the current variable information. More...
GLOBAL int | GTXClientGetMacroIndices (int *nb_indices, int **indices)
| Get the list of available indices for the current macro variable. More...
GLOBAL int | GTXClientGetMacroIndicesWithAlpha (int *nb_indices, int **indices, char ***alpha_indices)
| Get the list of available indices for the current macro variable with the corresponding alphanumerical indices. More...
GLOBAL int | GTXClientAddMacroIndicesWithAlpha (const int nb_indice, const int *indices, const char *const *alpha_indices)
| Add a list of indices for the current macro variable. More...
GLOBAL int | GTXClientAddMacroIndices (const int nb_indice, const int *indices)
| Add a list of indices for the current macro variable. More...
GLOBAL int | GTXClientReadLineDoubleVariable (int line_index, double *test_val, int *nsample, double **data)
| Read a line from the current variable. More...
GLOBAL int | GTXClientReadDoubleVariable (int compress, double *test_val, gtx_long *nb_val, double **data)
| Read samples from the current variable. More...
GLOBAL int | GTXClientReadDoubleVariableSub (gtx_long first, gtx_long last, int compress, double *test_val, gtx_long *nb_val, double **data)
| Read a subpart of the samples from the current variable. More...
GLOBAL int | GTXClientReadCharVariable (int compress, char **test_val, gtx_long *nb_val, char ***data)
| Read samples from the current variable. More...
GLOBAL int | GTXClientReadCharVariableSub (gtx_long first, gtx_long last, int compress, char **test_val, gtx_long *nb_val, char ***data)
| Read continuous samples from the current variable. More...
GLOBAL int | GTXClientReadLineCharVariable (int line_index, char **test_val, int *nsample, char ***data)
| Read a line from the current variable. More...
GLOBAL int | GTXClientReadSelectionVariable (gtx_long *nb_val, unsigned char **data)
| Read selection from the current variable. More...
GLOBAL int | GTXClientReadSelectionVariableSub (gtx_long first, gtx_long last, gtx_long *nb_val, unsigned char **data)
| Read a subpart of the selection from the current variable. More...
GLOBAL int | GTXClientNewDoubleVariable (const char *name, int bit_length, GTX_FORMAT_TYPE format_type, int format_length, int format_digits, const char *format_unit)
| Create a new double (or macro) variable in the current file. More...
GLOBAL int | GTXClientNewCharVariable (const char *name, int max_length)
| Create a new character variable in the current file. More...
GLOBAL int | GTXClientSetVariableAsLineName (void)
| Set the current variable as the Line Name variable. More...
GLOBAL int | GTXClientWriteLineDoubleVariable (int line_index, double test_val, int nsample, const double *data)
| Write line data to the current numerical variable. More...
GLOBAL int | GTXClientWriteDoubleVariable (int flag_compress, double test_val, gtx_long nb_val, const double *dbl_data)
| Write data to the current numerical variable. More...
GLOBAL int | GTXClientWriteDoubleVariableSub (gtx_long first, gtx_long last, int flag_compress, double test_val, gtx_long nb_val, const double *dbl_data)
| Write continuous subpart of data to the current numerical variable. More...
GLOBAL int | GTXClientWriteCharVariable (int flag_compress, const char *test_val, gtx_long nb_val, const char *const *char_data)
| Write data to the current alphanumerical variable. More...
GLOBAL int | GTXClientWriteCharVariableSub (gtx_long first, gtx_long last, int compress, const char *test_val, gtx_long nb_val, const char *const *data)
| Write continuous subpart of data to the current alphanumerical variable. More...
GLOBAL int | GTXClientWriteLineCharVariable (int line_index, const char *test_val, int nsample, const char *const *char_data)
| Write line data to the current alphanumerical variable. More...
GLOBAL int | GTXClientWriteSelectionVariable (const gtx_long nb_val, const unsigned char *data)
| Write selection data (0,1) to the current variable (must be a selection) More...
GLOBAL int | GTXClientWriteSelectionVariableSub (const gtx_long first, const gtx_long last, const gtx_long nb_val, const unsigned char *data)
| Write continuous subpart of selection data (0,1) to the current variable (must be a selection) More...
GLOBAL int | GTXClientGetVariableComment (char **comment)
| Get the comment of the current variable. More...
GLOBAL int | GTXClientSetVariableComment (int append, const char *comment)
| Set a comment for the current variable. More...
GLOBAL int | GTXClientSetSelection (const char *sel)
| Set the current selection. More...
GLOBAL int | GTXClientSetVariableUnit (const char *factor, const char *symbol)
| Change the unit factor and symbol of a variable. More...
GLOBAL int | GTXClientReadFaults (int priority, GTXFaultSystem *fault_system)
| Get fault system associated to the current file. More...
GLOBAL int | GTXClientWriteFaults (const GTXFaultSystem *fault_system)
| Write fault system to the current file. More...
GLOBAL void | GTXClientFreeFaults (GTXFaultSystem *fault_system)
| Frees memory allocated in the fault system. More...
GLOBAL void | GTXClientFaultsSegmentDuplicate (const GTXFaultSegment *fault_seg_in, GTXFaultSegment *fault_seg_out)
| Copies a given Fault Segment. More...
GLOBAL void | GTXClientFaultDuplicate (const GTXFault *fault_in, GTXFault *fault_out)
| Copies a given Fault. More...
GLOBAL GTXFaultSystem * | GTXClientFaultSystemDuplicate (const GTXFaultSystem *fault_sys)
| Copies a given Fault System. More...
GLOBAL int | GTXClientNewPolygonsFile (const char *name, const GTXPolygonSystem *psystem)
| Create a new polygon file in the current directory. More...
GLOBAL int | GTXClientReadPolygons (GTXPolygonSystem *polygon_system)
| Get current file as polygon system (if possible) More...
GLOBAL void | GTXClientFreePolygons (GTXPolygonSystem *polygon_system)
| Frees memory allocated in the polygon system. More...
GLOBAL void | GTXClientPolygonDuplicate (const GTXPolygon *polygon_in, GTXPolygon *polygon_out)
| Copies a given Fault. More...
GLOBAL void | GTXClientPolygonSystemDuplicate (const GTXPolygonSystem *polysys_in, GTXPolygonSystem *polysys_out)
| Copies a given Fault. More...
GLOBAL GTXVendorData | GTXClientVendorDataNew (const char *identificator, int version)
| Create a new GTXVendorData. More...
GLOBAL int | GTXClientVendorDataAddAttributeInt (GTXVendorData vendor_data, const char *name, int value)
| Add an integer attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataAddAttributeDouble (GTXVendorData vendor_data, const char *name, double value)
| Add a double attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataAddAttributeString (GTXVendorData vendor_data, const char *name, const char *value)
| Add a string attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataAddAttributeIntArray (GTXVendorData vendor_data, const char *name, int nvalues, const int *values)
| Add an integer array attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataAddAttributeDoubleArray (GTXVendorData vendor_data, const char *name, int nvalues, const double *values)
| Add a double array attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataAddAttributeStringArray (GTXVendorData vendor_data, const char *name, int nvalues, const char *const *values)
| Add a string array attribute to a Vendor Data. More...
GLOBAL int | GTXClientVendorDataWrite (int level, GTXVendorData vendor_data)
| Write a previously created Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetVersion (const char *identificator, int level, int *version)
| Get version string from a Vendor Data. More...
GLOBAL int | GTXClientVendorDataRead (const char *identificator, int level, GTXVendorData *vendor_data, int *version)
| Read a Vendor Data from Isatis file system. More...
GLOBAL int | GTXClientVendorDataGetAttributeInt (GTXVendorData vendor_data, const char *name, int *value)
| Get value from an integer attribute of a Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetAttributeDouble (GTXVendorData vendor_data, const char *name, double *value)
| Get value from a double attribute of a Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetAttributeString (GTXVendorData vendor_data, const char *name, char **value)
| Get value from a string attribute of a Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetAttributeIntArray (GTXVendorData vendor_data, const char *name, int *nvalues, int **values)
| Get value from an integer array attribute of a Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetAttributeDoubleArray (GTXVendorData vendor_data, const char *name, int *nvalues, double **values)
| Get value from a double array attribute of a Vendor Data. More...
GLOBAL int | GTXClientVendorDataGetAttributeStringArray (GTXVendorData vendor_data, const char *name, int *nvalues, char ***values)
| Get value from a string array attribute of a Vendor Data. More...
GLOBAL GTXVendorData | GTXClientVendorDataFree (GTXVendorData vendor_data)
| Free a given Vendor Data. More...
GLOBAL int | GTXClientVendorDataExists (const char *identificator, int level, int *exists)
| Checks if a Vendor Data exists. More...
GLOBAL GTXVendorData | GTXClientVendorDataDuplicate (GTXVendorData vendor_data)
| Copies a given Vendor Data. More...
GLOBAL int | GTXClientReadWireframes (GTXWireframeSystem *wireframe_system)
| Get wireframe system associated to the current file. More...
GLOBAL int | GTXClientNewWireframesFile (const char *filename, const GTXWireframeSystem *wireframe_system)
| Create a new Write wireframes file in the current directory. More...
GLOBAL void | GTXClientFreeWireframes (GTXWireframeSystem *wireframe_system)
| Frees memory allocated in the wireframe system. More...
GLOBAL void | GTXClientWireframeObjectDuplicate (const GTXWireframeObject *object_in, GTXWireframeObject *object_out)
| Copies a given Wireframe Object. More...
GLOBAL void | GTXClientWireframeDuplicate (const GTXWireframe *wireframe_in, GTXWireframe *wireframe_out)
| Copies a given Wireframe. More...
GLOBAL void | GTXClientWireframeSystemDuplicate (const GTXWireframeSystem *wsys_in, GTXWireframeSystem *wsys_out)
| Copies a given Wireframe System. More...
GLOBAL int | GTXClientPaletteGetList (int *nb_pal, char ***palettes)
| Get the list of palettes in the current study. More...
GLOBAL int | GTXClientPaletteExists (const char *cscale_name, int *exists)
| Check if a given palette exists. More...
GLOBAL int | GTXClientPaletteWrite (const char *name, int ncolors, const int *rgbs)
| Create/Updates a palette scale in the current study. More...
GLOBAL int | GTXClientPaletteRead (const char *name, int *ncolors, int **rgbs)
| Read a Palette from the Isatis database. More...
GLOBAL int | GTXClientPaletteDelete (const char *name)
| Deletes a palette in the current study. More...
GLOBAL int | GTXClientColorScaleGetList (int *nb_cscales, char ***cscales)
| Get the list of colors scales in the current study. More...
GLOBAL int | GTXClientColorScaleExists (const char *cscale_name, int *exists)
| Check if a given color scale exists. More...
GLOBAL void | GTXClientColorScaleInit (GTXColorScale *cscale)
| Inits a color scale structure. More...
GLOBAL void | GTXClientColorScaleFree (GTXColorScale *cscale)
| Frees a color scale structure. More...
GLOBAL int | GTXClientColorScaleNew (const char *name, const GTXColorScale *cscale)
| Create a new color scale in the current study. More...
GLOBAL int | GTXClientColorScaleRead (const char *cscale_name, GTXColorScale *cscale)
| Read a Color Scale from the Isatis database. More...
GLOBAL int | GTXClientColorScaleDelete (const char *name)
| Deletes a color scale in the current study. More...

## Variables
GLOBAL void(* | GTX_ERROR_FUNCTION )(const char *string)
| Error message function pointer This function pointer is called by the API when an error occured to inform the calling application. More...

## Detailed Description

GTXserver C API.

## Macro Definition Documentation

#define GTX_CLIENT_VERSION 1300030

Version number of GTX client/server protocol Major * 100000 + Minor * 1000 + Patch * 10 + Sub-Version

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

Referenced by GTXClientInitialize().

## Typedef Documentation

GTXVendorData

Opaque Vendor Data structure.

This structure is used as an opaque data to manage Vendor Data,

See Also
  GTXClientVendorDataNew

## Enumeration Type Documentation

enum GTX_CSCALE_TYPE

Define the different types of color scales that can be read from or written to the Isatis file system.

Enumerator
GTX_CSCALE_TYPE_AUTOMATIC | Automatic
GTX_CSCALE_TYPE_ISOFREQ | IsoFrequencies
GTX_CSCALE_TYPE_MANUAL | Manual
GTX_CSCALE_TYPE_FACIES | Facies
GTX_CSCALE_TYPE_INVALID | Invalid type

enum GTX_FILE_TYPE

Define the different types of file that can be read from or written to the Isatis file system.

Enumerator
GTX_FILE_TYPE_ANY | Any kind of file (used only for queries)
GTX_FILE_TYPE_POINTS | Points
GTX_FILE_TYPE_GRAVITY_LINES | Lines
GTX_FILE_TYPE_CORE_LINES | Lines
GTX_FILE_TYPE_GRID | Grid
GTX_FILE_TYPE_INVALID | Invalid type

enum GTX_FORMAT_TYPE

Define the different types of printing formats. With a the length of the format and b the number of digits.

See Also
  printf

Enumerator
GTX_FORMAT_TYPE_DECIMAL | %%25.blf
GTX_FORMAT_TYPE_INTEGER | %d
GTX_FORMAT_TYPE_EXPONENT | %a.be
GTX_FORMAT_TYPE_FREE | %alg if a <= 13 & %a.(a-7)lg if a > 13
GTX_FORMAT_TYPE_SHIFTED | f
GTX_FORMAT_TYPE_INVALID | Invalid type

enum GTX_VAR_TYPE

Define the different types of variables that can be read from or written to the Isatis file system.

Enumerator
GTX_VAR_TYPE_SELECTION | Only selection variables (used only for queries)
GTX_VAR_TYPE_FLOAT_ALL | Any float variable (used only for queries)
GTX_VAR_TYPE_ANY | Any kind of variable (used only for queries)
GTX_VAR_TYPE_FLOAT | Number variable
GTX_VAR_TYPE_CHAR | String variable
GTX_VAR_TYPE_XG | X coordinate variable
GTX_VAR_TYPE_YG | Y coordinate variable
GTX_VAR_TYPE_ZG | Z coordinate variable
GTX_VAR_TYPE_MACRO | Macro variable (macro variables are always numbers
GTX_VAR_TYPE_INVALID | Invalid type

enum GTXErrorCode

Define the different codes returned by GTXClient C APIs /sa GTXClientGetLastError

Enumerator
GTX_ERROR_NONE | OK, can be checked as a boolean
GTX_ERROR_PARAMETER | Invalid parameter
GTX_ERROR_NETWORK | Network connection problem
GTX_ERROR_SERVER | Server returned an error
GTX_ERROR_MEMORY | Memory Allocation problem

enum GTXFeatureType

Define the different new features that might not be available in some GTXserver. /sa GTXClientServerHasFeature

Enumerator
GTX_FEATURE_PALETTES | Support from server 2013.2+
GTX_FEATURE_COLOR_SCALES | Support from server 2013.2+

## Function Documentation

GLOBAL int GTXClientAddMacroIndices | ( | const int | nb_indice,
|  | const int * | indices
| ) |  |

Add a list of indices for the current macro variable.

This function add, from the GTXserver, the list of available indices for the current macro variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nb_indice | Number of indices
  indices | Array of numerical indices

Examples:
  write_files.c.

References GTX_ERROR_NONE, GTX_ERROR_PARAMETER, and GTXClientAddMacroIndices().

Referenced by GTXClientAddMacroIndices().

GLOBAL int GTXClientAddMacroIndicesWithAlpha | ( | const int | nb_indice,
|  | const int * | indices,
|  | const char *const * | alpha_indices
| ) |  |

Add a list of indices for the current macro variable.

This function add, from the GTXserver, the list of available indices for the current macro variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nb_indice | Number of indices
  indices | Array of numerical indices
  alpha_indices | Array of alpha indices

Examples:
  write_files.c.

References GTX_ERROR_NONE, GTX_ERROR_PARAMETER, and GTXClientAddMacroIndicesWithAlpha().

Referenced by GTXClientAddMacroIndicesWithAlpha().

GLOBAL int GTXClientColorScaleDelete | ( | const char * | name | ) |

Deletes a color scale in the current study.

This function deletes a color scale in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Color Scale name to be deleted

Examples:
  write_color_scale.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientColorScaleDelete().

Referenced by GTXClientColorScaleDelete().

GLOBAL int GTXClientColorScaleExists | ( | const char * | cscale_name,
|  | int * | exists
| ) |  |

Check if a given color scale exists.

This function asks the server if a given color scale exists.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  cscale_name | color scale name to check

Return values

  exists | 0 if it does not exists, 1 if it exists

Examples:
  write_color_scale.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientColorScaleExists().

Referenced by GTXClientColorScaleExists().

GLOBAL void GTXClientColorScaleFree | ( | GTXColorScale * | cscale | ) |

Frees a color scale structure.

This function frees a color scale structure. To avoid

Parameters

  cscale | Color Scale to be freed

Examples:
  write_color_scale.c.

References GTXColorScale::bounds, GTXColorScale::facies_class_ind, GTXColorScale::facies_int_max, GTXColorScale::facies_int_min, GTXColorScale::facies_labels, GTXColorScale::facies_rgbs, GTXClientColorScaleFree(), GTXClientFreePointer(), GTXClientFreeStringArray(), GTXColorScale::nclasses, and GTXColorScale::pal_ind.

Referenced by GTXClientColorScaleFree().

GLOBAL int GTXClientColorScaleGetList | ( | int * | nb_cscales,
|  | char *** | cscales
| ) |  |

Get the list of colors scales in the current study.

This function retrieve, from the GTXserver, the list of available color scales in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_cscales | Number of color scales in the current study
  cscales | Array of color scale names

Remarks:
  Color Scales must be freed using
  cscales = GTXClientFreeStringArray(nb_cscales, cscales);

To check if server supports reading and writing color scales, use GTXClientServerHasFeature.

Examples:
  write_color_scale.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientColorScaleGetList(), and GTXClientFreeStringArray().

Referenced by GTXClientColorScaleGetList().

GLOBAL void GTXClientColorScaleInit | ( | GTXColorScale * | cscale | ) |

Inits a color scale structure.

This function initializes a color scale structure to avoid problems with non-set structure members afterwards (like at free-time).

Parameters

  cscale | Color Scale to be initialized

Examples:
  write_color_scale.c.

References GTXColorScale::bnd_inc_high, GTXColorScale::bnd_inc_inter, GTXColorScale::bnd_inc_low, GTXColorScale::bounds, GTXColorScale::facies_class_ind, GTXColorScale::facies_int_max, GTXColorScale::facies_int_min, GTXColorScale::facies_int_nb, GTXColorScale::facies_integers, GTXColorScale::facies_labels, GTXColorScale::facies_rgbs, GTX_CSCALE_TYPE_AUTOMATIC, GTXClientColorScaleInit(), GTXColorScale::highval_col, GTXColorScale::lowval_col, GTXColorScale::nclasses, GTXColorScale::other_col, GTXColorScale::other_label, GTXColorScale::pal_ind, GTXColorScale::palette_name, GTXColorScale::readonly, GTXColorScale::type, GTXColorScale::undef_col, and GTXColorScale::undef_label.

Referenced by GTXClientColorScaleInit().

GLOBAL int GTXClientColorScaleNew | ( | const char * | name,
|  | const GTXColorScale * | cscale
| ) |  |

Create a new color scale in the current study.

This function creates a new color scale in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Color Scale name to be created
  cscale | Color Scale contents to store

Examples:
  write_color_scale.c.

References GTXColorScale::bnd_inc_high, GTXColorScale::bnd_inc_inter, GTXColorScale::bnd_inc_low, GTXColorScale::bounds, GTXColorScale::facies_class_ind, GTXColorScale::facies_int_max, GTXColorScale::facies_int_min, GTXColorScale::facies_int_nb, GTXColorScale::facies_integers, GTXColorScale::facies_labels, GTXColorScale::facies_rgbs, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientColorScaleNew(), GTXColorScale::highval_col, GTXColorScale::lowval_col, GTXColorScale::nclasses, GTXColorScale::other_col, GTXColorScale::other_label, GTXColorScale::pal_ind, GTXColorScale::palette_name, GTXColorScale::readonly, GTXColorScale::type, GTXColorScale::undef_col, and GTXColorScale::undef_label.

Referenced by GTXClientColorScaleNew().

GLOBAL int GTXClientColorScaleRead | ( | const char * | cscale_name,
|  | GTXColorScale * | cscale
| ) |  |

Read a Color Scale from the Isatis database.

This function retrieve, from the GTXserver, the contents of the color scale whose name is given as argument.

Returns
  error code
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  cscale_name | Name of the Color Scale to be read (must be initialized)

Return values

  cscale | Read color scale contents

Remarks:
  output cscale must have been initialized using GTXClientColorScaleInit and must be freed using GTXClientColorScaleFree.

Examples:
  write_color_scale.c.

References GTXColorScale::bnd_inc_high, GTXColorScale::bnd_inc_inter, GTXColorScale::bnd_inc_low, GTXColorScale::bounds, GTXColorScale::facies_class_ind, GTXColorScale::facies_int_max, GTXColorScale::facies_int_min, GTXColorScale::facies_int_nb, GTXColorScale::facies_integers, GTXColorScale::facies_labels, GTXColorScale::facies_rgbs, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_VAR_TYPE_INVALID, GTXClientColorScaleRead(), GTXColorScale::highval_col, GTXColorScale::lowval_col, GTXColorScale::nclasses, GTXColorScale::other_col, GTXColorScale::other_label, GTXColorScale::pal_ind, GTXColorScale::palette_name, GTXColorScale::readonly, GTXColorScale::type, GTXColorScale::undef_col, and GTXColorScale::undef_label.

Referenced by GTXClientColorScaleRead().

GLOBAL int GTXClientConnect | ( | const char * | host,
|  | unsigned short | port,
|  | const char * | path
| ) |  |

Open a session with a running GTXserver to read isatis file system.

This function opens a session with a GTXserver running on the host host that listens to the port port and starts to read the Isatis file system located at path. If the server is a mono session one, the server will remain attached to this client until disconnect then it will quit. If the server is a multi session one, the server will still be available for other clients.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  [in] | host | hostname or IP address "aaa.bbb.ccc.ddd" of the machine where the GTXserver is running on
  [in] | port | port number where the GTXserver is listening to. If 0, a call to GTXClientGetDefaultPort is made to determine the port where GTXserver may be running.
  [in] | path | pathname of the Isatis file system to be accessed (should be a path entered by the user (GTX_DATA or GTX_INIT (see below))

Remarks:
  A session must be closed using GTXClientDisconnect to free memory allocations. When accessing Isatis < 4.1 data, the user must specify where its database is stored. This place is known as GTX_DATA environment variable. You can get it in Isatis from the Help->About menu. Starting with Isatis 4.1, this variable is not useful anymore. Instead, an hidden file is created to keep a list of studies which can be put anywhere on disk. If accessing data linked to an Isatis >= 4.1, this variable should be left empty (not NULL). However it is possible to override the default study list that would then be taken by specifying the place where the study list lies in. This directory is referred to as GTX_INIT in the Isatis Help -> About Menu.

See Also
  GTXClientDisconnect, GTXClientGetDefaultPort

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, GTXClientConnect(), and GTXClientGetDefaultPort().

Referenced by GTXClientConnect().

GLOBAL void GTXClientDebug | ( | int | mode | ) |

Set debug mode on / off.

Parameters

  mode | 1 will set debug mode to on, and 0 will set debug mode to off

Remarks:
  The default value is off

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTXClientDebug().

Referenced by GTXClientDebug().

GLOBAL int GTXClientDeleteDirectory | ( | void |  | ) |

Delete the current directory.

This function will delete the current directory. If successfull, the is no current directory set.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Examples:
  motif_client.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientDeleteDirectory().

Referenced by GTXClientDeleteDirectory().

GLOBAL int GTXClientDeleteFile | ( | void |  | ) |

Delete the current file.

This function will delete the current file. If successfull, the is no current file set.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Examples:
  motif_client.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientDeleteFile().

Referenced by GTXClientDeleteFile().

GLOBAL int GTXClientDeleteStudy | ( | void |  | ) |

Delete the current study.

This function will delete the current study. If successfull, the is no current study set.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Examples:
  motif_client.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientDeleteStudy().

Referenced by GTXClientDeleteStudy().

GLOBAL int GTXClientDeleteVariable | ( | void |  | ) |

Delete the current variable.

This function will delete the current variable. If successfull, the is no current variable directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Examples:
  motif_client.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientDeleteVariable().

Referenced by GTXClientDeleteVariable().

GLOBAL int GTXClientDirectoryExists | ( | const char * | directory_name,
|  | int * | exists
| ) |  |

Check if a given directory exists.

This function asks the server if a given directory exists (or for old servers, it retrieves the list of directorys and check it by itself).

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  directory_name | directory name to check

Return values

  exists | 0 if it does not exists, 1 if it exists

Examples:
  write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientDirectoryExists(), GTXClientFreeStringArray(), and GTXClientGetDirectoryList().

Referenced by GTXClientDirectoryExists().

GLOBAL int GTXClientDisconnect | ( | void |  | ) |

Close the current session with the GTXserver.

This function closes the current session with the GTXserver. The server will exit if in mono session mode, if in multi-session mode, it will only close the current connection.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Remarks:
  If there is no opened session the function will return 0.

See Also
  GTXClientConnect

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientDisconnect().

Referenced by GTXClientDisconnect().

GLOBAL void GTXClientFaultDuplicate | ( | const GTXFault * | fault_in,
|  | GTXFault * | fault_out
| ) |  |

Copies a given Fault.

This function copies a Fault

Parameters

  fault_in | original Fault

Return values

  fault_out | pointer on destination Fault

References GTXClientFaultDuplicate(), GTXClientFaultsSegmentDuplicate(), GTXFault::n_segments, GTXFault::name, GTXFault::polygon, and GTXFault::segments.

Referenced by GTXClientFaultDuplicate(), and GTXClientFaultSystemDuplicate().

GLOBAL void GTXClientFaultsSegmentDuplicate | ( | const GTXFaultSegment * | fault_seg_in,
|  | GTXFaultSegment * | fault_seg_out
| ) |  |

Copies a given Fault Segment.

This function copies a Fault Segment

Parameters

  fault_seg_in | original Fault Segment

Return values

  fault_seg_out | pointer on destination Fault Segment

References GTXClientFaultsSegmentDuplicate(), GTXFaultSegment::priority, GTXFaultSegment::V1, GTXFaultSegment::V2, GTXFaultSegment::V3, GTXFaultSegment::X1, GTXFaultSegment::X2, GTXFaultSegment::X3, GTXFaultSegment::Y1, GTXFaultSegment::Y2, GTXFaultSegment::Y3, GTXFaultSegment::Z1, GTXFaultSegment::Z2, and GTXFaultSegment::Z3.

Referenced by GTXClientFaultDuplicate(), and GTXClientFaultsSegmentDuplicate().

GLOBAL GTXFaultSystem* GTXClientFaultSystemDuplicate | ( | const GTXFaultSystem * | fault_sys | ) |

Copies a given Fault System.

This function copies a Fault System

Returns
  new copy of the Fault System

Parameters

  fault_sys | original Fault System

References GTXFaultSystem::aux_var_test, GTXFaultSystem::aux_var_used, GTXFaultSystem::faults, GTXFaultSystem::faults_2d, GTXClientFaultDuplicate(), GTXClientFaultSystemDuplicate(), and GTXFaultSystem::n_faults.

Referenced by GTXClientFaultSystemDuplicate().

GLOBAL int GTXClientFileExists | ( | const char * | file_name,
|  | int * | exists
| ) |  |

Check if a given file exists.

This function asks the server if a given file exists (or for old servers, it retrieves the list of files and check it by itself).

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  file_name | file name to check

Return values

  exists | 0 if it does not exists, 1 if it exists

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_FILE_TYPE_ANY, GTXClientFileExists(), and GTXClientFreeStringArray().

Referenced by GTXClientFileExists().

GLOBAL void GTXClientFreeFaults | ( | GTXFaultSystem * | fault_system | ) |

Frees memory allocated in the fault system.

This function frees the memory allocated by a previous call to GTXClientReadFaults

Parameters

  fault_system | Fault system to be freed

Remarks:
  This function is meant to only free memory allocated by GTXClientReadFaults. Only call this function AFTER a call to GTXClientReadFaults. Elsewhere memory in the fault system is not initialized and an attempt to free it could cause problems. Indeed this function frees fault_system->faults so if you may call this function before read, first initialize faults to NULL.

Examples:
  text_list.c.

References GTXFaultSystem::faults, GTXClientFreeFaults(), GTXFaultSystem::n_faults, and GTXFault::segments.

Referenced by GTXClientFreeFaults(), and GTXClientReadFaults().

GLOBAL void* GTXClientFreePointer | ( | void * | pointer | ) |

Frees a pointer returned by a previous GTXClient function call.

This function frees the memory allocated by a previous call to a GTXClient function which returned a pointer (except for string arrays).

Returns
  NULL value

Parameters

  pointer | pointer to be freed

Remarks
  : this function is meant to only free memory allocated by a GTXClient function. It simply calls free on the pointer but avoid inter-DLL memory problems under Windows. For string arrays, use

See Also
  GTXClientFreeStringArray.

Examples:
  motif_client.c, text_client.c, text_list.c, vendor_data_read.c, write_color_scale.c, and write_files.c.

References GTXClientFreePointer().

Referenced by GTXClientColorScaleFree(), GTXClientFreePointer(), GTXClientGetMacroIndices(), GTXClientGetMacroIndicesWithAlpha(), GTXClientReadLineCharVariable(), and GTXClientReadLineDoubleVariable().

GLOBAL void GTXClientFreePolygons | ( | GTXPolygonSystem * | polygon_system | ) |

Frees memory allocated in the polygon system.

This function frees the memory allocated by a previous call to GTXClientReadPolygons

Parameters

  polygon_system | Polygon system to be freed

Remarks:
  This function is meant to only free memory allocated by GTXClientReadPolygons. Only call this function AFTER a call to GTXClientReadPolygons. Elsewhere memory in the polygons system is not initialized and an attempt to free it could cause problems. Indeed this function frees polygon_system->polygons so if you may call this function before read, first initialize polygons to NULL.

Examples:
  read_polygon.c.

References GTXClientFreePolygons(), GTXPolygonSystem::n_polygons, GTXPolygonSystem::polygons, and GTXPolygon::vertices.

Referenced by GTXClientFreePolygons(), and GTXClientReadPolygons().

GLOBAL char** GTXClientFreeStringArray | ( | gtx_long | narray,
|  | char ** | array
| ) |  |

Frees a string array returned by a previous GTXClient function call.

This function frees the memory allocated by a previous call to a GTXClient function which returned an array of string.

Returns
  NULL value

Parameters

  narray | number of items in the array
  array | string array to be freed

Remarks
  : this function is meant to only free memory allocated by a GTXClient function. It is equivalent to call GTXClientFreePointer on each array item and on the array itself.

Examples:
  motif_client.c, text_client.c, text_list.c, vendor_data_read.c, write_color_scale.c, and write_files.c.

References GTXClientFreeStringArray().

Referenced by GTXClientColorScaleFree(), GTXClientColorScaleGetList(), GTXClientDirectoryExists(), GTXClientFileExists(), GTXClientFreeStringArray(), GTXClientGetDirectoryList(), GTXClientGetMacroIndicesWithAlpha(), GTXClientGetStudyList(), GTXClientPaletteGetList(), GTXClientReadLineCharVariable(), GTXClientVariableExists(), and GTXClientVendorDataGetAttributeStringArray().

GLOBAL void GTXClientFreeWireframes | ( | GTXWireframeSystem * | wireframe_system | ) |

Frees memory allocated in the wireframe system.

This function frees the memory allocated by a previous call to GTXClientReadWireframes

Parameters

  wireframe_system | Wireframe system to be freed

Remarks:
  This function is meant to only free memory allocated by GTXClientReadWireframes. Only call this function AFTER a call to GTXClientReadWireframes. Elsewhere memory in the wireframe system is not initialized and an attempt to free it could cause problems. Indeed this function frees wireframe_system->wireframes so if you may call this function before read, first initialize wireframes to NULL.

References GTXClientFreeWireframes(), GTXWireframeSystem::n_wireframes, GTXWireframe::objects, and GTXWireframeSystem::wireframes.

Referenced by GTXClientFreeWireframes(), and GTXClientReadWireframes().

GLOBAL unsigned short GTXClientGetDefaultPort | ( | void |  | ) |

Get the default port for GTXserver.

When the GTXserver is ran without argument, it runs on a default port. This default port is taken from the local /etc/services file using getservbyname with the service name equal to "GTXserver". If not found in the services file, it defaults to a hard-coded value.

Returns
  port: default GTXserver port

Remarks: This function replaces the define GTX_DEFAULT_PORT used in
  previous GTXserver versions.

Remarks: The returned value may be used as an initial value for the port
  in the user interface asking parameters for connection on an already running server.

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTXClientGetDefaultPort().

Referenced by GTXClientConnect(), and GTXClientGetDefaultPort().

GLOBAL int GTXClientGetDirectoryList | ( | int * | nb_dir,
|  | char *** | directories
| ) |  |

Get the list of directories in the current study.

This function retrieve, from the GTXserver, the list of available directories in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_dir | Number of directories in the current study
  directories | Array of directory names

Remarks:
  Directories must be freed using
  directories = GTXClientFreeStringArray(nb_dir, directories);

Examples:
  motif_client.c, text_client.c, text_list.c, and write_files.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreeStringArray(), and GTXClientGetDirectoryList().

Referenced by GTXClientDirectoryExists(), and GTXClientGetDirectoryList().

GLOBAL int GTXClientGetFileComment | ( | char ** | comment | ) |

Get the comment of the current file.

Get the comment/description to the current file

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  comment | returned comment

Remarks:
  Warning: errors converning a non compatible server are silently ignored.

comment must be freed using

comment = GTXClientFreePointer(comment)

References GTX_ERROR_NONE, and GTXClientGetFileComment().

Referenced by GTXClientGetFileComment().

GLOBAL int GTXClientGetFileInfo | ( | GTXFileInfo * | file_info | ) |

Get information about current file.

This function retrieve, from the GTXserver, the information about the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  file_info | The information about current file

Remarks:
  All coordinates are returned in the current unit (GTXClientSetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClientSetUnitMode).

Examples:
  motif_client.c, text_client.c, text_list.c, and write_files.c.

References GTXFileInfo::angle_x, GTXFileInfo::angle_y, GTXFileInfo::angle_z, GTXFaultInfo::auth_priority, GTXFaultInfo::aux_var_used, GTXFileInfo::dimension, GTXFileInfo::DX, GTXFileInfo::DY, GTXFileInfo::DZ, GTXFileInfo::fault_info, GTXFileInfo::faulted, GTXFaultInfo::faults_2d, GTXFaultInfo::faults_number, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_FILE_TYPE_CORE_LINES, GTX_FILE_TYPE_GRID, GTX_FILE_TYPE_INVALID, GTXClientGetFileInfo(), GTXFileInfo::item_number, GTXFileInfo::linked_file, GTXFileInfo::ln_var_name, GTXFileInfo::lname_var_name, GTXFaultInfo::max_fpriority, GTXFaultInfo::min_fpriority, GTXFileInfo::NX, GTXFileInfo::NY, GTXFileInfo::NZ, GTXFileInfo::polygon_file, GTXFileInfo::rn_var_name, GTXFileInfo::rotation, GTXFileInfo::s_number, GTXFaultInfo::segments_number, GTXFileInfo::sn_var_name, GTXFileInfo::type, GTXFileInfo::X0, GTXFileInfo::xb_var_name, GTXFileInfo::xe_var_name, GTXFileInfo::xg_var_name, GTXFileInfo::Y0, GTXFileInfo::yb_var_name, GTXFileInfo::ye_var_name, GTXFileInfo::yg_var_name, GTXFileInfo::Z0, GTXFileInfo::zb_var_name, GTXFileInfo::ze_var_name, and GTXFileInfo::zg_var_name.

Referenced by GTXClientGetFileInfo().

GLOBAL int GTXClientGetFileList | ( | int * | nb_file,
|  | char *** | files
| ) |  |

Get the list of files in the current directory.

This function retrieve, from the GTXserver, the list of available files in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_file | Number of files in the current directory
  files | Array of file names

Remarks:
  Files must be freed using
  files = GTXClientFreeStringArray(nb_files, files);

Examples:
  motif_client.c, text_client.c, text_list.c, and write_files.c.

References GTX_ERROR_NONE, GTX_FILE_TYPE_ANY, and GTXClientGetFileList().

Referenced by GTXClientGetFileList().

GLOBAL int GTXClientGetFileListByType | ( | GTX_FILE_TYPE | file_type,
|  | int | file_dim,
|  | int * | nb_file,
|  | char *** | files
| ) |  |

Get the list of files in the current directory given a type and dimension.

This function retrieve, from the GTXserver, the list of available files in the current directory searching for a given type and dimension.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  file_type | File type (

See Also
  GTX_FILE_TYPE)

Parameters

  file_dim | File dimension (2,3 or -1 if it does not matter)

Return values

  nb_file | Number of files in the current directory
  files | Array of file names

Remarks:
  Files must be freed using
  files = GTXClientFreeStringArray(nb_files, files);

References GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_FILE_TYPE_ANY, and GTXClientGetFileListByType().

Referenced by GTXClientGetFileListByType().

GLOBAL GTXErrorCode GTXClientGetLastError | ( |  | ) |

Get the last error that occured in GTXClient API.

Returns
  the last error that occured

See Also
  GTXErrorCode

Remarks
  each GTXClient API function return an error code to indicate if it was successful or not and sets this last error code to the correct value.

References GTXClientGetLastError().

Referenced by GTXClientGetLastError(), and GTXClientSetAlphaIndice().

GLOBAL int GTXClientGetMacroIndices | ( | int * | nb_indice,
|  | int ** | indices
| ) |  |

Get the list of available indices for the current macro variable.

This function retrieve, from the GTXserver, the list of available indices for the current macro variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_indice | Number of indices for the current macro variable
  indices | Array of available indices for the current macro variable

Remarks:
  Indices must be freed using
  indices = GTXClientFreePointer(indices)

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreePointer(), and GTXClientGetMacroIndices().

Referenced by GTXClientGetMacroIndices(), and GTXClientGetMacroIndicesWithAlpha().

GLOBAL int GTXClientGetMacroIndicesWithAlpha | ( | int * | nb_indice,
|  | int ** | indices,
|  | char *** | alpha_indices
| ) |  |

Get the list of available indices for the current macro variable with the corresponding alphanumerical indices.

This function retrieves, from the GTXserver, the list of available indices (and alpha indices) for the current macro variable. Alphanumerical indices are created for some macro variables like QTMs or Lithotypes.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_indice | Number of indices for the current macro variable
  indices | Array of available indices for the current macro variable
  alpha_indices | Array of available alphanumerical indices for the current macro variable. alpha_indices can be returned NULL if macro has no alpha indices.

Remarks:
  Indices must be freed using
  indices = GTXClientFreePointer(indices)
  alpha_indices = GTXClientFreeStringArray(nb_indices,alpha_indices)

Examples:
  motif_client.c, text_client.c, and text_list.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreePointer(), GTXClientFreeStringArray(), GTXClientGetMacroIndices(), and GTXClientGetMacroIndicesWithAlpha().

Referenced by GTXClientGetMacroIndicesWithAlpha(), and GTXClientSetAlphaIndice().

GLOBAL int GTXClientGetServerVersion | ( |  | ) |

Retrieves Server Protocol Version.

When the client is connected to the server, allows to know the server protocol version. The version is encoded as followed: Major * 1000000 + Minor * 1000 + Patch * 10 + Sub-Version It may now correspond to the Isatis version but to the major latest change in the protocol.

Returns
  connected:
  - server version

See Also
  GTXClientConnect

References GTXClientGetServerVersion().

Referenced by GTXClientGetServerVersion().

GLOBAL int GTXClientGetStudyList | ( | int * | nb_study,
|  | char *** | studies
| ) |  |

Get study list in the Isatis file system.

This function retrieve, from the GTXserver, the list of available studies in the Isatis file system selected by the GTXClientConnect call

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_study | Number of studies in the Isatis file system
  studies | Array of study names

Remarks:
  Studies must be freed using
  studies = GTXClientFreeStringArray(nb_study, studies)

Examples:
  motif_client.c, text_client.c, text_list.c, and write_files.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreeStringArray(), and GTXClientGetStudyList().

Referenced by GTXClientGetStudyList().

GLOBAL int GTXClientGetVariableComment | ( | char ** | comment | ) |

Get the comment of the current variable.

Get the comment/description to the current variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  comment | returned comment

Remarks:
  Warning: errors converning a non compatible server are silently ignored.

comment must be freed using

comment = GTXClientFreePointer(comment)

Examples:
  motif_client.c, text_client.c, and text_list.c.

References GTX_ERROR_NONE, and GTXClientGetVariableComment().

Referenced by GTXClientGetVariableComment().

GLOBAL int GTXClientGetVariableInfo | ( | GTXVariableInfo * | var_info | ) |

Get the current variable information.

This function retrieve, from the GTXserver, the information about the current variable. If used on a length variable, information will be returned using the current default unit (GTXClientSetUnit) or in the variable unit if current unit mode is 1 (GTXClientSetUnitMode).

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  var_info | The current variable information

Remarks:
  On a length variable, by default, the returned unit is the current unit (GTXClientSetUnit). If you want to get its real unit, you must set unit_mode to 1 before (GTXClientSetUnitMode).

Examples:
  motif_client.c, text_client.c, and text_list.c.

References GTXVariableInfo::alpha_length, GTXVariableInfo::bit_length, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_VAR_TYPE_INVALID, GTXClientGetVariableInfo(), GTXClientUnitFactorFromSymbol(), GTXVariableInfo::i_number, GTXVariableInfo::implicit, GTXVariableInfo::length_var, GTXVariableInfo::type, GTXVariableInfo::unit, and GTXVariableInfo::unit_symbol.

Referenced by GTXClientGetVariableInfo().

GLOBAL int GTXClientGetVariableList | ( | int * | nb_var,
|  | char *** | vars
| ) |  |

Get the list of variables in the current file.

This function retrieve, from the GTXserver, the list of available variables in the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_var | Number of variables in the current file
  vars | Array of variable names

Remarks:
  Variables must be freed using:
  *vars = GTXClientFreeStringArray(*nb_var, *vars)

Examples:
  motif_client.c, text_client.c, and text_list.c.

References GTX_ERROR_NONE, GTX_VAR_TYPE_ANY, and GTXClientGetVariableList().

Referenced by GTXClientGetVariableList().

GLOBAL int GTXClientGetVariableListByType | ( | GTX_VAR_TYPE | var_type,
|  | int * | nb_var,
|  | char *** | vars
| ) |  |

Get the list of variables in the current file given a variable type.

This function retrieve, from the GTXserver, the list of available variables in the current file for a given type.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  var_type | File type GTX_VAR_TYPE_ANY will get the list of all variables GTX_VAR_TYPE_SELECTION will get the list of selection variables but info on those variables will then return Float 1 bit. GTX_VAR_TYPE_FLOAT_ALL will get the list of all float variables including selections and implicit but excluding macro variables. GTX_VAR_TYPE_FLOAT will get the list of all float variables including selections but excluding implicit and macro variables. GTX_VAR_TYPE_CHAR will get the list of all alphanumerical variables GTX_VAR_TYPE_MACRO will get the list of all macro variables other variable types are forbidden

Return values

  nb_var | Number of variables in the current file
  vars | Array of variable names

Remarks:
  Variables must be freed using:
  *vars = GTXClientFreeStringArray(*nb_var, *vars)

References GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, GTX_VAR_TYPE_ANY, GTX_VAR_TYPE_CHAR, GTX_VAR_TYPE_FLOAT, GTX_VAR_TYPE_FLOAT_ALL, GTX_VAR_TYPE_MACRO, GTX_VAR_TYPE_SELECTION, GTX_VAR_TYPE_XG, GTX_VAR_TYPE_YG, GTX_VAR_TYPE_ZG, and GTXClientGetVariableListByType().

Referenced by GTXClientGetVariableListByType().

GLOBAL int GTXClientGridModifyMesh | ( | double | dx,
|  | double | dy,
|  | double | dz
| ) |  |

Modify the mesh of the current file (must be a grid)

This function modify the mesh of the current file (must be a grid)

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  dx | X size of one cell of the grid
  dy | Y size of one cell of the grid
  dz | Z size of one cell of the grid (unused if 2D)

Remarks:
  The new mesh must be given in the current unit (GTXClientSetUnit) if unit_mode = 0 (GTXClientSetUnitMode). Elsewhere, you must enter the new mesh according to each coordinate variable unit.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientGridModifyMesh().

Referenced by GTXClientGridModifyMesh().

GLOBAL int GTXClientGridModifyOrigin | ( | double | x0,
|  | double | y0,
|  | double | z0
| ) |  |

Modify the origin of the current file (must be a grid)

This function modify the origin of the current file (must be a grid)

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  x0 | X origin of the grid
  y0 | Y origin of the grid
  z0 | Z origin of the grid (unused if 2D)

Remarks:
  The new origin must be given in the current unit (GTXClientSetUnit) if unit_mode = 0 (GTXClientSetUnitMode). Elsewhere, you must enter the new origin according to each coordinate variable unit.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientGridModifyOrigin().

Referenced by GTXClientGridModifyOrigin().

GLOBAL int GTXClientGridModifyRotation | ( | double | az,
|  | double | ay,
|  | double | ax
| ) |  |

Modify the rotation of the current file (must be a grid)

This function modify the rotation of the current file (must be a grid)

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  az | rotation around Z axis
  ay | rotation around the Y'-axis (new Y axis in the system after the first rotation) (unused in 2D)
  ax | rotation around the X"-axis (new X axis in the systemd after the two first rotations) (unused in 2D)

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientGridModifyRotation().

Referenced by GTXClientGridModifyRotation().

GLOBAL int GTXClientInitialize | ( | int | linked_version | ) |

Initialize the client library.

This function checks consistency between the version of the library you linked with and the current one. It also inititializes tracing. You must call it before you first use GTXClientConnect.

Returns
  error code:
  - 0 if Ok
  - 1 cannot initialize the library

Parameters

  linked_version | is GTX_CLIENT_VERSION (used to determine the version of GTXclient you linked with if using dynamic linking).

Remarks:
  Typical usage is: if (GTXClientInitialize (GTX_CLIENT_VERSION)) If the library is already initialized, nothing is done and 0 is returned.

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_CLIENT_VERSION, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, and GTXClientInitialize().

Referenced by GTXClientInitialize().

GLOBAL int GTXClientIsConnected | ( |  | ) |

Check is client is connected with the server.

Check the status of the connection with the GTXserver

Returns
  connected:
  - 0 if not connected
  - 1 if connected

See Also
  GTXClientConnect, GTXClientDisconnect

References GTXClientIsConnected().

Referenced by GTXClientIsConnected().

GLOBAL int GTXClientLinesFileAddCoreLine | ( | int | nsample,
|  | double | xbeg,
|  | double | ybeg,
|  | double | zbeg,
|  | const double * | xend,
|  | const double * | yend,
|  | const double * | zend
| ) |  |

Add a new line in the current lines file with core definition.

This function add a new line in the current lines file. Coordinates are given with beginning and end of cores.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nsample | Number of sample to be added to the new line
  xbeg | X coordinate of the beginning of the first core
  ybeg | Y coordinate of the beginning of the first core
  zbeg | Z coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores
  zend | Array of Z coordinate of the end of cores (or NULL)

Remarks:
  zend must be NULL for adding a line to a 2D lines file. Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Replaces GTXClientLinesFileAddLineCores. Warning: if you used the old GTXClientLinesFileAddLineCores function, you must remove the storage of an additional undefined value at the beginning of each line (see client/C/write_files.c for an example).

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, GTXClientLinesFileAddCoreLine(), and GTXClientLinesFileAddLineCoresOld().

Referenced by GTXClientLinesFileAddCoreLine().

GLOBAL int GTXClientLinesFileAddGravityLine | ( | int | nsample,
|  | const double * | xg,
|  | const double * | yg,
|  | const double * | zg
| ) |  |

Add a new line in the current lines file with gravity centers definition.

This function add a new line in the current lines file. Coordinates are given with gravity centers.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nsample | Number of sample to be added to the new line
  xg | Array of X coordinate of the centers of gravity
  yg | Array of Y coordinate of the centers of gravity
  zg | Array of Z coordinate of the centers of gravity (or NULL)

Remarks:
  zg must be NULL for adding a line to a 2D lines file. Lines file must have been set before appending a line. Samples will be converted to gravity centers. If you want to use this line as cores in Isatis, you must add a sample at the beginning of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

replaces GTXClientLinesFileAddLineCenters.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientLinesFileAddGravityLine().

Referenced by GTXClientLinesFileAddGravityLine().

GLOBAL int GTXClientLinesFileAddLineCoresOld | ( | int | nsample,
|  | double | xbeg,
|  | double | ybeg,
|  | double | zbeg,
|  | const double * | xend,
|  | const double * | yend,
|  | const double * | zend
| ) |  |

Add a new line in the current lines file with core definition.

This function add a new line in the current lines file. Coordinates are given with beginning and end of cores.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nsample | Number of sample to be added to the new line
  xbeg | X coordinate of the beginning of the first core
  ybeg | Y coordinate of the beginning of the first core
  zbeg | Z coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores
  zend | Array of Z coordinate of the end of cores (or NULL)

Remarks:
  zend must be NULL for adding a line to a 2D lines file. Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

You should consider using GTXClientLinesFileAddCoreLine to create real cores in Isatis instead of converting to gravity centers like this function does. Warning: if you use the new function, you must also remove the storage of an additional undefined value at the beginning of each line (see client/C/write_files.c for an example).

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientLinesFileAddLineCoresOld().

Referenced by GTXClientLinesFileAddCoreLine(), and GTXClientLinesFileAddLineCoresOld().

GLOBAL int GTXClientLinesFileCreateLink | ( | const char * | points_file | ) |

Create a Link between current Lines file and its header Points file.

This function creates a link between the current Lines file and its associated Points File. Lines file must have been set before and the Points file must have as many samples as the Lines file has separate lines.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  points_file | points file to link to

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientLinesFileCreateLink().

Referenced by GTXClientLinesFileCreateLink().

GLOBAL int GTXClientLocateGTXserver | ( | char * | path | ) |

Locate GTXserver executable.

This function tries to determine the location of GTXserver executable using:

- the value that has been set by GTXClientSetGTXserverPath()
- the value of the GTX_SERVER environment variable
- the executable located in Isatis installation (which is determined by the value of GTX_HOME environment variable under UNIX and Windows or a registry key under Windows),
- a GTXserver executable in one component of the PATH environment variable. If all of those tests are unsuccessfull, this function will return 1.

Returns
  error code:
  - 0 if OK
  - 1 if the server was not found

Return values

  path | return path of GTXserver executable (must be at least 1024 chars)

Remarks:
  This function can be use to initialize an interface with the path of the currently used GTXserver or for debugging purposes. You can also force this function to find a given executable by using GTXClientSetGTXserverPath()

References GTX_ERROR_NONE, GTX_ERROR_PARAMETER, and GTXClientLocateGTXserver().

Referenced by GTXClientLocateGTXserver(), and GTXClientRunGTXserver().

GLOBAL int GTXClientNewCharVariable | ( | const char * | name,
|  | int | max_length
| ) |  |

Create a new character variable in the current file.

This function create a new character variable in the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the variable to be created
  max_length | Maximum length of string per sample (without \0)

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientNewCharVariable().

Referenced by GTXClientNewCharVariable().

GLOBAL int GTXClientNewDirectory | ( | const char * | name | ) |

Create a new directory in the current study.

This function creates a new directory in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Directory name to be created

Examples:
  write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientNewDirectory().

Referenced by GTXClientNewDirectory().

GLOBAL int GTXClientNewDoubleVariable | ( | const char * | name,
|  | int | bit_length,
|  | GTX_FORMAT_TYPE | format_type,
|  | int | format_length,
|  | int | format_digits,
|  | const char * | format_unit
| ) |  |

Create a new double (or macro) variable in the current file.

This function creates a new double variable (also known as numerical variable) in the current file

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the variable to be created (will be a macro variable if name ends with [xxxxx])
  bit_length | Number of bits per sample, authorized values are 1, 2, 4, 8, 16, 32 and 64
  format_type | Ouput printing format
  format_length | Ouput printing length (3 to 19)
  format_digits | Number of digits (0 to 9)
  format_unit | Unit string, use NULL or empty string for length variable

Remarks:
  If you use NULL as the unit string, the variable will be a length variable with the current default unit symbol and factor (GTXClientSetUnit). If the format_unit is part of the known length units list, the variable will be a length one with the specified unit and corresponding factor, elsewhere a float variable will be created. If you need to have a length variable with different unit symbol and factor, use GTXClientSetVariableUnit. To create a selection, use 1 for the bit_length. To create a macro variable, use a name ending with [xxxxx]. To create a macro-selection, use a name ending with [xxxxx] and a bitlength of 1.

Examples:
  write_fault.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, GTX_FORMAT_TYPE_DECIMAL, GTX_FORMAT_TYPE_INVALID, and GTXClientNewDoubleVariable().

Referenced by GTXClientNewDoubleVariable().

GLOBAL int GTXClientNewGridFile | ( | const char * | name,
|  | int | dimension,
|  | double | X0,
|  | double | Y0,
|  | double | Z0,
|  | double | DX,
|  | double | DY,
|  | double | DZ,
|  | int | NX,
|  | int | NY,
|  | int | NZ
| ) |  |

Create a new grid file in the current directory.

This function create a new grid file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the grid file to be created
  dimension | 2 for a 2D grid, 3 for a 3D grid
  X0 | X origin of the grid
  Y0 | Y origin of the grid
  Z0 | Z origin of the grid (unused if 2D)
  DX | X size of one cell of the grid
  DY | Y size of one cell of the grid
  DZ | Z size of one cell of the grid (unused if 2D)
  NX | X nodes number
  NY | Y nodes number
  NZ | Z nodes number (unused if 2D)

Remarks:
  The file will be created using the current unit (GTXClientSetUnit) or the creation units (GTXClientSetCreationUnits) if unit_mode is 1 (GTXClientSetUnitMode). The grid origin and mesh must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Examples:
  write_fault.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientNewGridFile().

Referenced by GTXClientNewGridFile().

GLOBAL int GTXClientNewLinesFile | ( | const char * | name,
|  | int | dimension
| ) |  |

Create a new lines file in the current directory.

This function create a new lines file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the new lines file
  dimension | File dimension 2 for 2D, 3 for 3D

Remarks:
  The file will be created using the current unit (GTXClientSetUnit) or the creation units (GTXClientSetCreationUnits) if unit_mode is 1 (GTXClientSetUnitMode).

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientNewLinesFile().

Referenced by GTXClientNewLinesFile().

GLOBAL int GTXClientNewPointsFile | ( | const char * | name,
|  | gtx_long | nsample,
|  | const double * | x,
|  | const double * | y,
|  | const double * | z
| ) |  |

Create a new points file in the current directory.

This function create a new points file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the file to be created
  nsample | Number of samples to be created in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample
  z | Array of Z coordinate of each sample (or NULL)

Remarks:
  To create a 2D file, set z to NULL.

The file will be created using the current unit (GTXClientSetUnit) or the creation units (GTXClientSetCreationUnits) if unit_mode is 1 (GTXClientSetUnitMode).

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientNewPointsFile().

Referenced by GTXClientNewPointsFile().

GLOBAL int GTXClientNewPolygonsFile | ( | const char * | filename,
|  | const GTXPolygonSystem * | polygon_system
| ) |  |

Create a new polygon file in the current directory.

This function creates a new polygons file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  filename | File name of the polygons file
  polygon_system | Polygon system to be created

Remarks:
  The file will be created using the current unit (GTXClientSetUnit) or the creation units (GTXClientSetCreationUnits) if unit_mode is 1 (GTXClientSetUnitMode).

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Examples:
  write_polygon.c.

References GTXPolygonSystem::ext_max, GTXPolygonSystem::ext_min, GTXPolygon::group_name, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientNewPolygonsFile(), GTXPolygonSystem::n_polygons, GTXPolygon::n_vertices, GTXPolygon::name, GTXPolygonSystem::polygons, GTXPolygonSystem::polygons_2d, GTXPolygon::vertices, GTXPolygon::z_max, and GTXPolygon::z_min.

Referenced by GTXClientNewPolygonsFile().

GLOBAL int GTXClientNewStudy | ( | const char * | name,
|  | const char * | path
| ) |  |

Create a new study in the Isatis file system.

This function create a new study in the Isatis file system.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the study to be created (logical study name)
  path | Physical study PATH (must be a non existing directory in an existing parent directory)

Remarks
  The physical path correspond to the directory where the study contents will be stored. This path is only used/needed for Isatis >= 4.1 (because before that, all studies were stored near to each other).

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientNewStudy().

Referenced by GTXClientNewStudy().

GLOBAL int GTXClientNewWireframesFile | ( | const char * | filename,
|  | const GTXWireframeSystem * | wireframe_system
| ) |  |

Create a new Write wireframes file in the current directory.

This function creates a new wireframes file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  filename | Name of the Wireframes File that has to be created
  wireframe_system | Wireframe system to be stored in the current file

References GTXWireframe::color, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientNewWireframesFile(), GTXWireframe::n_objects, GTXWireframeObject::n_triangles, GTXWireframeObject::n_vertices, GTXWireframeSystem::n_wireframes, GTXWireframe::name, GTXWireframe::objects, GTXWireframeObject::triangles, GTXWireframeObject::vertices, and GTXWireframeSystem::wireframes.

Referenced by GTXClientNewWireframesFile().

GLOBAL int GTXClientPaletteDelete | ( | const char * | name | ) |

Deletes a palette in the current study.

This function deletes a palette in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Palette name to be deleted

Remarks:
  Warning: System palettes cannot be deleted.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientPaletteDelete().

Referenced by GTXClientPaletteDelete().

GLOBAL int GTXClientPaletteExists | ( | const char * | pal_name,
|  | int * | exists
| ) |  |

Check if a given palette exists.

This function asks the server if a given palette exists in the Isatis database.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  pal_name | palette name to check

Return values

  exists | 0 if it does not exists, 1 if it exists

Remarks:
  Warning: System palettes cannot be checked for existence.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientPaletteExists().

Referenced by GTXClientPaletteExists().

GLOBAL int GTXClientPaletteGetList | ( | int * | nb_pal,
|  | char *** | palettes
| ) |  |

Get the list of palettes in the current study.

This function retrieve, from the GTXserver, the list of available palettes in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_pal | Number of palettes in the current study
  palettes | Array of palette names

Remarks:
  Palettes must be freed using
  palettes = GTXClientFreeStringArray(nb_pal, palettes);

Warning: System palettes are not listed here and can be read/written.

To check if server supports reading and writing palettes, use GTXClientServerHasFeature.

Examples:
  write_color_scale.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreeStringArray(), and GTXClientPaletteGetList().

Referenced by GTXClientPaletteGetList().

GLOBAL int GTXClientPaletteRead | ( | const char * | pal_name,
|  | int * | ncol,
|  | int ** | rgbs
| ) |  |

Read a Palette from the Isatis database.

This function retrieve, from the GTXserver, the contents of the palette whose name is given as argument.

Returns
  error code
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  pal_name | Name of the Palette to be read

Return values

  ncol | Number of Colors in the palette
  rgbs | Color RGBs of the palettes (order RRRRGGGGBBB with as many R as colors)

Remarks:
  Color RGBs must be freed using
  rgbs = GTXClientFreePointer(rgbs);

Warning: System palettes cannot be read.

Examples:
  write_color_scale.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientPaletteRead().

Referenced by GTXClientPaletteRead().

GLOBAL int GTXClientPaletteWrite | ( | const char * | pal_name,
|  | int | ncol,
|  | const int * | rgbs
| ) |  |

Create/Updates a palette scale in the current study.

This function creates or overwrite a palette in the current study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  pal_name | Name of the Palette to be created/written
  ncol | Number of Colors
  rgbs | RGBs of the palette colors. Each value must [0-255]. Values are ordered RRRGGGBBB with as many R,G and Bs as colors.

Remarks:
  Palette can already exist and will be updated. Warning: System palettes cannot be overwritten.

Examples:
  write_color_scale.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientPaletteWrite().

Referenced by GTXClientPaletteWrite().

GLOBAL int GTXClientPointsFileAppend | ( | gtx_long | nsample,
|  | const double * | x,
|  | const double * | y,
|  | const double * | z
| ) |  |

Append samples to the current Points File.

This function appends samples to the current Points File

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nsample | Number of samples to be appended in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample
  z | Array of Z coordinate of each sample (or NULL)

Remarks:
  If current file is a 2D file, set z to NULL.

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding units if unit_mode = 1.

Creating a Points File by appending samples 1 by 1 is not optimum at all. If you know the number of samples from the beginning, you should directly create the file with the right number of points.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientPointsFileAppend().

Referenced by GTXClientPointsFileAppend().

GLOBAL void GTXClientPolygonDuplicate | ( | const GTXPolygon * | polygon_in,
|  | GTXPolygon * | polygon_out
| ) |  |

Copies a given Fault.

This function copies a Polygon

Return values

  polygon_out | new copy of the Polygon

Parameters

  polygon_in | original Polygon

References GTXPolygon::group_name, GTXClientPolygonDuplicate(), GTXPolygon::n_vertices, GTXPolygon::name, GTXPolygon::vertices, GTXPolygon::z_max, and GTXPolygon::z_min.

Referenced by GTXClientPolygonDuplicate(), and GTXClientPolygonSystemDuplicate().

GLOBAL void GTXClientPolygonSystemDuplicate | ( | const GTXPolygonSystem * | polysys_in,
|  | GTXPolygonSystem * | polysys_out
| ) |  |

Copies a given Fault.

This function copies a Polygon

Return values

  polysys_out | new copy of the Polygon

Parameters

  polysys_in | original Polygon

References GTXPolygonSystem::ext_max, GTXPolygonSystem::ext_min, GTXClientPolygonDuplicate(), GTXClientPolygonSystemDuplicate(), GTXPolygonSystem::n_polygons, GTXPolygonSystem::polygons, and GTXPolygonSystem::polygons_2d.

Referenced by GTXClientPolygonSystemDuplicate().

GLOBAL int GTXClientReadCharVariable | ( | int | compress,
|  | char ** | test_val,
|  | gtx_long * | nb_val,
|  | char *** | data
| ) |  |

Read samples from the current variable.

This function read all samples from the current variable. The variable must be an alphanumerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Return values

  test_val | Value used for undefined samples
  nb_val | Number of kept samples
  data | Array of character variable samples

Remarks:
  test_val must be freed using:
  test_val = GTXClientFreePointer(test_val);
  data must be freed using:
  *data = GTXClientFreeStringArray(*nb_val, *data);

Examples:
  motif_client.c, and text_client.c.

References GTX_ERROR_NONE, and GTXClientReadCharVariable().

Referenced by GTXClientReadCharVariable().

GLOBAL int GTXClientReadCharVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | int | compress,
|  | char ** | test_val,
|  | gtx_long * | nb_val,
|  | char *** | data
| ) |  |

Read continuous samples from the current variable.

This function read contiguous samples from the current variable. The variable must be an alphanumerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Sample Number of the first item to read (from 1 to nsample)
  last | Sample Number of the last item to read (from 1 to nsample)
  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Return values

  test_val | Value used for undefined samples
  nb_val | Number of kept samples
  data | Array of character variable samples

Remarks:
  test_val must be freed using:
  test_val = GTXClientFreePointer(test_val);
  data must be freed using:
  *data = GTXClientFreeStringArray(*nb_val, *data);

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientReadCharVariableSub().

Referenced by GTXClientReadCharVariableSub().

GLOBAL int GTXClientReadDoubleVariable | ( | int | compress,
|  | double * | test_val,
|  | gtx_long * | nb_val,
|  | double ** | data
| ) |  |

Read samples from the current variable.

This function read all samples from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Return values

  test_val | Value used for undefined samples
  nb_val | Number of kept samples
  data | Array of variable samples

Remarks:
  data must be freed using:
  data = GTXClientFreePointer(data);

If the variable is a length one, data is returned in the current unit (GTXClientSetUnit) if unit_mode is 0 (GTXClientSetUnitMode). If the variable is a length one and unit_mode is 1, the variable unit is used instead.

Examples:
  motif_client.c, and text_client.c.

References GTX_ERROR_NONE, and GTXClientReadDoubleVariable().

Referenced by GTXClientReadDoubleVariable().

GLOBAL int GTXClientReadDoubleVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | int | compress,
|  | double * | test_val,
|  | gtx_long * | nb_val,
|  | double ** | data
| ) |  |

Read a subpart of the samples from the current variable.

This function read a subpart of the samples from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Sample Number of the first item to read (from 1 to nsample)
  last | Sample Number of the last item to read (from 1 to nsample)
  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Return values

  test_val | Value used for undefined samples
  nb_val | Number of kept samples (obviously if not using a selection, this will be last-first+1)
  data | Array of variable samples

Remarks:
  data must be freed using:
  data = GTXClientFreePointer(data);

Warning: This functions needs a server version >= 4.0.7 for 4.0.x series or >= 4.1.1 for 4.1.x series.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientReadDoubleVariableSub().

Referenced by GTXClientReadDoubleVariableSub().

GLOBAL int GTXClientReadFaults | ( | int | priority,
|  | GTXFaultSystem * | fault_system
| ) |  |

Get fault system associated to the current file.

This function retrieve, from the GTXserver, the fault system associated to the current file. Faults in the fault system can be masked with the given priority.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  priority | Authorized priority

Return values

  fault_system | Fault system associated to the current file

Remarks:
  Only segments which have a priority greater or equal to priority are returned. Faults which have no such segments are removed.

You may use a 0 priority to get all the faults with all their segments. Use the value from GTXClientGetFileInfo to get the faults as they were saved in Isatis Fault Manager.

All coordinates are returned in the current unit (GTXClientSetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClientSetUnitMode).

Some memory is allocated inside passed fault_system. Memory must be freed using GTXClientFreeFaults.

Examples:
  motif_client.c, text_client.c, and text_list.c.

References GTXFaultSystem::aux_var_test, GTXFaultSystem::aux_var_used, GTXFaultSystem::faults, GTXFaultSystem::faults_2d, GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreeFaults(), GTXClientReadFaults(), GTXFaultSystem::n_faults, GTXFault::n_segments, GTXFault::name, GTXFault::polygon, GTXFaultSegment::priority, GTXFault::segments, GTXFaultSegment::V1, GTXFaultSegment::V2, GTXFaultSegment::V3, GTXFaultSegment::X1, GTXFaultSegment::X2, GTXFaultSegment::X3, GTXFaultSegment::Y1, GTXFaultSegment::Y2, GTXFaultSegment::Y3, GTXFaultSegment::Z1, GTXFaultSegment::Z2, and GTXFaultSegment::Z3.

Referenced by GTXClientReadFaults().

GLOBAL int GTXClientReadLineCharVariable | ( | int | line_index,
|  | char ** | test_val,
|  | int * | nsample,
|  | char *** | data
| ) |  |

Read a line from the current variable.

This function read a line from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  line_index | The index of the line [1..nline]

Return values

  test_val | Value used for undefined samples
  nsample | Number samples
  data | Array of variable samples

Remarks:
  test_val must be freed using:
  test_val = GTXClientFreePointer(test_val);
  data must be freed using:
  *data = GTXClientFreeStringArray(*nsample, *data);

Warning: This functions needs a server version >= 16.01beta

Examples:
  write_files.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreePointer(), GTXClientFreeStringArray(), and GTXClientReadLineCharVariable().

Referenced by GTXClientReadLineCharVariable().

GLOBAL int GTXClientReadLineDoubleVariable | ( | int | line_index,
|  | double * | test_val,
|  | int * | nsample,
|  | double ** | data
| ) |  |

Read a line from the current variable.

This function read a line from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  line_index | The index of the line [1..nline]

Return values

  test_val | Value used for undefined samples
  nsample | Number samples
  data | Array of variable samples

Remarks:
  data must be freed using:
  data = GTXClientFreePointer(data);

Warning: This functions needs a server version >= 8.06beta

Examples:
  write_files.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreePointer(), and GTXClientReadLineDoubleVariable().

Referenced by GTXClientReadLineDoubleVariable().

GLOBAL int GTXClientReadPolygons | ( | GTXPolygonSystem * | polygon_system | ) |

Get current file as polygon system (if possible)

This function retrieve, from the GTXserver, the polygon system associated to the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  polygon_system | Polygon system associated to the current file

Remarks:
  All coordinates are returned in the current unit (GTXClientSetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClientSetUnitMode).

Some memory is allocated inside passed polygon_system. Memory must be freed using GTXClientFreePolygons.

Examples:
  read_polygon.c.

References GTXPolygonSystem::ext_max, GTXPolygonSystem::ext_min, GTXPolygon::group_name, GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreePolygons(), GTXClientReadPolygons(), GTXPolygonSystem::n_polygons, GTXPolygon::n_vertices, GTXPolygon::name, GTXPolygonSystem::polygons, GTXPolygonSystem::polygons_2d, GTXPolygon::vertices, GTXPolygon::z_max, and GTXPolygon::z_min.

Referenced by GTXClientReadPolygons().

GLOBAL int GTXClientReadSelectionVariable | ( | gtx_long * | nb_val,
|  | unsigned char ** | data
| ) |  |

Read selection from the current variable.

This function read all selection from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  nb_val | Number of kept selection
  data | Array of variable selection

Remarks:
  data must be freed using:
  data = GTXClientFreePointer(data);

If the variable is a length one, data is returned in the current unit (GTXClientSetUnit) if unit_mode is 0 (GTXClientSetUnitMode). If the variable is a length one and unit_mode is 1, the variable unit is used instead.

Warning: This functions needs a server version >= 7.0.8beta or 8.00

Examples:
  write_files.c.

References GTX_ERROR_NONE, and GTXClientReadSelectionVariable().

Referenced by GTXClientReadSelectionVariable().

GLOBAL int GTXClientReadSelectionVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | gtx_long * | nb_val,
|  | unsigned char ** | data
| ) |  |

Read a subpart of the selection from the current variable.

This function read a subpart of the selection from the current variable. The variable must be an numerical variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Selection Number of the first item to read (from 1 to nselection)
  last | Selection Number of the last item to read (from 1 to nselection)

Return values

  nb_val | Number of kept selection (obviously if not using a selection, this will be last-first+1)
  data | Array of variable selection

Remarks:
  data must be freed using:
  data = GTXClientFreePointer(data);

Warning: This functions needs a server version >= 7.0.8beta or 8.00

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientReadSelectionVariableSub().

Referenced by GTXClientReadSelectionVariableSub().

GLOBAL int GTXClientReadWireframes | ( | GTXWireframeSystem * | wireframe_system | ) |

Get wireframe system associated to the current file.

This function retrieve, from the GTXserver, the wireframe system associated to the current file. Wireframes in the wireframe system can be masked with a selection.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Return values

  wireframe_system | Wireframe system associated to the current file

Remarks:
  All coordinates are returned in the current unit (GTXClientSetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClientSetUnitMode).

Some memory is allocated inside passed wireframe_system. Memory must be freed using GTXClientFreeWireframes.

References GTXWireframe::color, GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientFreeWireframes(), GTXClientReadWireframes(), GTXWireframe::n_objects, GTXWireframeObject::n_triangles, GTXWireframeObject::n_vertices, GTXWireframeSystem::n_wireframes, GTXWireframe::name, GTXWireframe::objects, GTXWireframeObject::triangles, GTXWireframeObject::vertices, and GTXWireframeSystem::wireframes.

Referenced by GTXClientReadWireframes().

GLOBAL int GTXClientRunGTXserver | ( | unsigned short * | port | ) |

Locate GTXserver executable and run it.

This function tries to locate the GTXserver executable using GTXClientLocateGTXserver() and run it.

Returns
  error code:
  - 0 if OK
  - 1 if the server was not found or failed to RUN

Parameters

  port | if you have a preferred port to RUN GTXserver on. If 0 a free port is taken and its value is returned.

Return values

  port | the new port is return here

Remarks:
  Typical usage:
  usigned short port = 0;
  if (GTXClientRunGTXserver(&port)) ...
  GTXserver is ran in the background listening on the given port. If the port is 0, GTXserver is ran on the first free port of the machine. This avoids trying to run a server on an already used port. The new port is returned in the port variable and should be used to connect to the server.

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTXClientLocateGTXserver(), and GTXClientRunGTXserver().

Referenced by GTXClientRunGTXserver().

GLOBAL int GTXClientServerHasFeature | ( | GTXFeatureType | type,
|  | int | generate_error
| ) |  |

Is Server supporting a given feature ?

This function checks if the GTXserver support a given feature and can output an error message if not.

Parameters

  type | feature requested
  generate_error,: | output an error message using the error function

Returns
  feature_supported:
  - 0 if the feature is NOT supported
  - 1 if the feature IS supported

Examples:
  write_color_scale.c.

References GTX_FEATURE_COLOR_SCALES, GTX_FEATURE_PALETTES, and GTXClientServerHasFeature().

Referenced by GTXClientServerHasFeature().

GLOBAL int GTXClientSetAlphaIndice | ( | const char * | alphaindice | ) |

Set the current alpha indice for the current macro variable.

Set the current alpha indice for the current macro variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  alphaindice | Macro alpha indice to set

Remarks:
  Current variable should have been set before.

Examples:
  motif_client.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, GTXClientGetLastError(), GTXClientGetMacroIndicesWithAlpha(), GTXClientSetAlphaIndice(), and GTXClientSetIndice().

Referenced by GTXClientSetAlphaIndice().

GLOBAL int GTXClientSetCreationUnits | ( | const char * | x_unit,
|  | const char * | y_unit,
|  | const char * | z_unit
| ) |  |

Change the default units for length variables creation.

This functions allows to change the default units used for coordinate variables creation when unit_mode (GTXClientSetUnitMode) is set to 1. After that, all coordinate variables creation take those units into account. This has no effect when unit_mode is 0.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  x_unit | new X coordinate unit
  y_unit | new Y coordinate unit
  z_unit | new Z coordinate unit

Remarks
  Warning: setting mode to 1 and back to 0 resets creation units.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetCreationUnits().

Referenced by GTXClientSetCreationUnits().

GLOBAL int GTXClientSetDirectory | ( | const char * | name | ) |

Set the current directory.

Set the current directory to name.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the directory to be set as current

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetDirectory().

Referenced by GTXClientSetDirectory().

GLOBAL int GTXClientSetFile | ( | const char * | name | ) |

Set the current file in the current directory.

Set the current file in the current directory.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the file to be set as current

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_fault.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetFile().

Referenced by GTXClientSetFile().

GLOBAL int GTXClientSetFileComment | ( | int | append,
|  | const char * | comment
| ) |  |

Set a comment for the current file.

Set or append a comment/description to the current file

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  append | 0 to set a comment 1 to append to an existing one
  comment | Comment to be set or append to the existing one

Remarks:
  Warning: errors converning a non compatible server are silently ignored.

References GTX_ERROR_NONE, and GTXClientSetFileComment().

Referenced by GTXClientSetFileComment().

GLOBAL void GTXClientSetGTXserverPath | ( | const char * | path | ) |

Set the GTXserver path to be used by GTXClientRunGTXserver()

Parameters

  path,: | full path of the GTXserver executable, should be less than 1024 characters or empty string to remove any previous specification of it.

References GTXClientSetGTXserverPath().

Referenced by GTXClientSetGTXserverPath().

GLOBAL int GTXClientSetIndice | ( | const int | indice | ) |

Set the current indice for the current macro variable.

Set the current indice for the current macro variable.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  indice | Macro indice to set

Remarks:
  Current variable should have been set before.

Examples:
  motif_client.c, text_client.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetIndice().

Referenced by GTXClientSetAlphaIndice(), and GTXClientSetIndice().

GLOBAL int GTXClientSetSelection | ( | const char * | name | ) |

Set the current selection.

Set the current selection for further reading in the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the selection to be set as curent, use NULL or empty to unset a selection

Examples:
  motif_client.c, and text_client.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetSelection().

Referenced by GTXClientSetSelection().

GLOBAL int GTXClientSetStudy | ( | const char * | study | ) |

Set the name of the current study.

This function will set the name of the current study, all following calls will be made using this study.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  study | Name of the study to be set

Examples:
  motif_client.c, read_polygon.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_color_scale.c, write_fault.c, write_files.c, and write_polygon.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetStudy().

Referenced by GTXClientSetStudy().

GLOBAL int GTXClientSetUnit | ( | const char * | unit | ) |

Set the current distance unit.

Set the current distance unit.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  unit | Distance unit to set

Remarks:
  This default Unit will be used when creating new variables. It will also be used to scale length variables in this unit when reading and from this unit when writing. Authorized units are:
  - micr for Micron
  - mm for Millimeter
  - cm for Centimeter
  - dm for Decimeter
  - m for Meter
  - dam for Decameter
  - hm for Hectometer
  - km for Kilometer
  - in for Inch
  - ft for Foot
  - yd for Yard
  - mile for Mile
  - nmil for Nautical Mile
  - dakm for 10 Kilometers
  - hkm for 100 Kilometers
  - kkm for 1000 Kilometers

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientSetUnit().

Referenced by GTXClientSetUnit().

GLOBAL int GTXClientSetUnitMode | ( | int | mode | ) |

Change the way length units are used.

This functions allows to change the way units are used at the creation of new length variables and reading of existing ones. When mode is 0, all length variables are read/written using the current unit (GTXCLientSetUnit). When mode is 1, each length variable is read/written using its own unit. This also affect File Information and File Creation that are also based on coordinates variables which are the main length variables.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  mode | new unit mode

Remarks
  Default mode if 0 which means that you read/write all information in the current unit set with GTXClientSetUnit.

Warning: setting mode to 1 and back to 0 resets creation units (set with

See Also
  GTXClientSetCreationUnits) to the current unit.

Examples:
  motif_client.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetUnitMode().

Referenced by GTXClientSetUnitMode().

GLOBAL int GTXClientSetVariable | ( | const char * | name | ) |

Set the current variable in the current file.

Set the current variable in the current file

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  name | Name of the variable to be set as curent

Examples:
  motif_client.c, text_client.c, text_list.c, vendor_data_read.c, vendor_data_write.c, write_fault.c, and write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetVariable().

Referenced by GTXClientSetVariable().

GLOBAL int GTXClientSetVariableAsLineName | ( | void |  | ) |

Set the current variable as the Line Name variable.

This function sets the current variable as the line name of the file in which it appears. The file must be a Points file linked to Lines file and the variable must be alphanumerical.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientSetVariableAsLineName().

Referenced by GTXClientSetVariableAsLineName().

GLOBAL int GTXClientSetVariableComment | ( | int | append,
|  | const char * | comment
| ) |  |

Set a comment for the current variable.

Set or append a comment/description to the current variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  append | 0 to set a comment 1 to append to an existing one
  comment | Comment to be set or append to the existing one

Remarks:
  Warning: errors converning a non compatible server are silently ignored.

References GTX_ERROR_NONE, and GTXClientSetVariableComment().

Referenced by GTXClientSetVariableComment().

GLOBAL int GTXClientSetVariableUnit | ( | const char * | factor,
|  | const char * | symbol
| ) |  |

Change the unit factor and symbol of a variable.

This functions allows to change the unit attached to a variable. If the factor unit is part of the known units list, it changes the variable to a length one. Then we can specify a different symbol to display. If the factor, is not known as a length one, the variable will be float (e.g, not length) and the symbol will not be used.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  factor | new unit factor
  symbol | new unit symbol (used for length or NULL)

See Also
  GTXClientSetUnit for the list of know units.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_PARAMETER, GTX_ERROR_SERVER, and GTXClientSetVariableUnit().

Referenced by GTXClientSetVariableUnit().

GLOBAL double GTXClientUnitFactorFromSymbol | ( | const char * | symbol | ) |

Get the unit factor corresponding to a given unit symbol.

This function returns the unit factor corresponding to a given unit symbol or 0. if not a known length symbol.

Parameters

  symbol | unit symbol to be searched for

Returns
  unit factor

References GTXClientUnitFactorFromSymbol().

Referenced by GTXClientGetVariableInfo(), and GTXClientUnitFactorFromSymbol().

GLOBAL const char* GTXClientUnitSymbolFromFactor | ( | double | factor | ) |

Get the unit factor corresponding to a given unit symbol.

This function returns the unit symbol corresponding to a given unit symbol or an empty string if not a known length factor.

Parameters

  factor | unit factor to be searched for

Returns
  unit symbol

Remarks: the returned string is a static string. It doesn't have to be
  fred.

References GTXClientUnitSymbolFromFactor().

Referenced by GTXClientUnitSymbolFromFactor().

GLOBAL int GTXClientVariableExists | ( | const char * | var_name,
|  | int * | exists
| ) |  |

Check if a given variable exists.

This function asks the server if a given variable exists (or for old servers, it retrieves the list of variables and check it by itself).

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  var_name | variable name to check

Return values

  exists | 0 if it does not exists, 1 if it exists

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTX_VAR_TYPE_ANY, GTXClientFreeStringArray(), and GTXClientVariableExists().

Referenced by GTXClientVariableExists().

GLOBAL int GTXClientVendorDataAddAttributeDouble | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | double | value
| ) |  |

Add a double attribute to a Vendor Data.

This function adds an double attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  value | Value of the attribute

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeDouble().

Referenced by GTXClientVendorDataAddAttributeDouble(), and GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataAddAttributeDoubleArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int | nvalues,
|  | const double * | values
| ) |  |

Add a double array attribute to a Vendor Data.

This function adds a double array attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  nvalues | Number of values in the array
  values | Array of double

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeDoubleArray().

Referenced by GTXClientVendorDataAddAttributeDoubleArray(), and GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataAddAttributeInt | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int | value
| ) |  |

Add an integer attribute to a Vendor Data.

This function adds an integer attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  value | Value of the attribute

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeInt().

Referenced by GTXClientVendorDataAddAttributeInt(), and GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataAddAttributeIntArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int | nvalues,
|  | const int * | values
| ) |  |

Add an integer array attribute to a Vendor Data.

This function adds an integer array attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  nvalues | Number of values in the array
  values | Array of integer

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeIntArray().

Referenced by GTXClientVendorDataAddAttributeIntArray(), and GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataAddAttributeString | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | const char * | value
| ) |  |

Add a string attribute to a Vendor Data.

This function adds a string attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  value | Value of the attribute

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeString().

Referenced by GTXClientVendorDataAddAttributeString(), and GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataAddAttributeStringArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int | nvalues,
|  | const char *const * | values
| ) |  |

Add a string array attribute to a Vendor Data.

This function adds a double array attribute to a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor data to be modified
  name | Attribute name
  nvalues | Number of values in the array
  values | Array of strings

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataAddAttributeStringArray().

Referenced by GTXClientVendorDataAddAttributeStringArray(), and GTXClientVendorDataDuplicate().

GTXVendorData GTXClientVendorDataDuplicate | ( | GTXVendorData | vendor_data | ) |

Copies a given Vendor Data.

This function copies a Vendor Data

Returns
  new copy of the Vendor Data

Parameters

  vendor_data | original Vendor Data

References GTXClientVendorDataAddAttributeDouble(), GTXClientVendorDataAddAttributeDoubleArray(), GTXClientVendorDataAddAttributeInt(), GTXClientVendorDataAddAttributeIntArray(), GTXClientVendorDataAddAttributeString(), GTXClientVendorDataAddAttributeStringArray(), GTXClientVendorDataDuplicate(), and GTXClientVendorDataNew().

Referenced by GTXClientVendorDataDuplicate().

GLOBAL int GTXClientVendorDataExists | ( | const char * | identificator,
|  | int | level,
|  | int * | exists
| ) |  |

Checks if a Vendor Data exists.

This function verifies the existence of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  identificator | Identificator of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

Return values

  exists | 0 if it does not exists, 1 if it exists

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientVendorDataExists().

Referenced by GTXClientVendorDataExists().

GLOBAL GTXVendorData GTXClientVendorDataFree | ( | GTXVendorData | vendor_data | ) |

Free a given Vendor Data.

This function frees a Vendor Data

Returns
  freed Vendor Data (NULL)

Parameters

  vendor_data | The Vendor Data to be freed

Examples:
  vendor_data_read.c, and vendor_data_write.c.

References GTXClientVendorDataFree().

Referenced by GTXClientVendorDataFree(), and GTXClientVendorDataRead().

GLOBAL int GTXClientVendorDataGetAttributeDouble | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | double * | value
| ) |  |

Get value from a double attribute of a Vendor Data.

This function reads the value from a double attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read

Return values

  value | Returned double value

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataGetAttributeDouble().

Referenced by GTXClientVendorDataGetAttributeDouble().

GLOBAL int GTXClientVendorDataGetAttributeDoubleArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int * | nvalues,
|  | double ** | values
| ) |  |

Get value from a double array attribute of a Vendor Data.

This function reads the value from a double array attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read
  nvalues | Returned number of values in the array
  values | Returned array of values

Return values

  value | Returned double array value

Remarks:
  The returned double array must be freed using:
  values = GTXClientFreePointer(values);

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataGetAttributeDoubleArray().

Referenced by GTXClientVendorDataGetAttributeDoubleArray().

GLOBAL int GTXClientVendorDataGetAttributeInt | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int * | value
| ) |  |

Get value from an integer attribute of a Vendor Data.

This function reads the value from an integer attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read

Return values

  value | Returned integer value

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataGetAttributeInt().

Referenced by GTXClientVendorDataGetAttributeInt().

GLOBAL int GTXClientVendorDataGetAttributeIntArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int * | nvalues,
|  | int ** | values
| ) |  |

Get value from an integer array attribute of a Vendor Data.

This function reads the value from an integer array attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read
  nvalues | Returned number of values in the array
  values | Returned array of values

Return values

  value | Returned integer array value

Remarks:
  The returned integer array must be freed using:
  values = GTXClientFreePointer(values);

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataGetAttributeIntArray().

Referenced by GTXClientVendorDataGetAttributeIntArray().

GLOBAL int GTXClientVendorDataGetAttributeString | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | char ** | value
| ) |  |

Get value from a string attribute of a Vendor Data.

This function reads the value from a string attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read

Return values

  value | Returned string value

Remarks:
  The returned string must be freed using:
  value = GTXClientFreePointer(value);

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientVendorDataGetAttributeString().

Referenced by GTXClientVendorDataGetAttributeString().

GLOBAL int GTXClientVendorDataGetAttributeStringArray | ( | GTXVendorData | vendor_data,
|  | const char * | name,
|  | int * | nvalues,
|  | char *** | values
| ) |  |

Get value from a string array attribute of a Vendor Data.

This function reads the value from a string array attribute of a Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  vendor_data | Vendor Data
  name | Name of the attribute to read
  nvalues | Returned number of strings in the array
  values | Returned array of strings

Return values

  value | Returned string array value

Remarks:
  The returned string array must be freed using:
  values = GTXClientFreeStringArray(nvalues, values);

Examples:
  vendor_data_read.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTXClientFreeStringArray(), and GTXClientVendorDataGetAttributeStringArray().

Referenced by GTXClientVendorDataGetAttributeStringArray().

GLOBAL int GTXClientVendorDataGetVersion | ( | const char * | identificator,
|  | int | level,
|  | int * | version
| ) |  |

Get version string from a Vendor Data.

This function reads the version string from a stored Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  identificator | Identificator of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

Return values

  version | Returned Vendor Data version

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientVendorDataGetVersion().

Referenced by GTXClientVendorDataGetVersion().

GLOBAL GTXVendorData GTXClientVendorDataNew | ( | const char * | identificator,
|  | int | version
| ) |  |

Create a new GTXVendorData.

This function creates a new GTXVendorData.

Returns
  a new GTXVendorData or NULL on allocation error

Parameters

  identificator | Vendor data identificator
  version | Vendor data version

Remarks:
  The memory used by each GTXVendorData must be freed using GTXClientVendorDataFree.

Examples:
  vendor_data_write.c.

References GTXClientVendorDataNew().

Referenced by GTXClientVendorDataDuplicate(), GTXClientVendorDataNew(), and GTXClientVendorDataRead().

GLOBAL int GTXClientVendorDataRead | ( | const char * | identificator,
|  | int | level,
|  | GTXVendorData * | vendor_data,
|  | int * | version
| ) |  |

Read a Vendor Data from Isatis file system.

This function reads a Vendor Data from the Isatis file system

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  identificator | Identificator of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

Return values

  vendor_data | Returned Vendor Data
  version | Returned Vendor Data version

Remarks:
  You can pass NULL as version if you do not want to retrieve version number. After usage, You should free the Vendor Data using GTXClientVendorDataFree.

Examples:
  vendor_data_read.c.

References GTX_ERROR_MEMORY, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientVendorDataFree(), GTXClientVendorDataNew(), and GTXClientVendorDataRead().

Referenced by GTXClientVendorDataRead().

GLOBAL int GTXClientVendorDataWrite | ( | int | level,
|  | GTXVendorData | vendor_data
| ) |  |

Write a previously created Vendor Data.

This function writes a previously created Vendor Data

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  level | Where to write the Vendor Data 0 for study 1 for directory 2 for file 3 for variable
  vendor_data | The Vendor Data to be written

Examples:
  vendor_data_write.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientVendorDataWrite().

Referenced by GTXClientVendorDataWrite().

GLOBAL void GTXClientWireframeDuplicate | ( | const GTXWireframe * | wireframe_in,
|  | GTXWireframe * | wireframe_out
| ) |  |

Copies a given Wireframe.

This function copies a Wireframe

Parameters

  wireframe_in | original Wireframe

Return values

  wireframe_out | pointer on destination Wireframe

References GTXWireframe::color, GTXClientWireframeDuplicate(), GTXClientWireframeObjectDuplicate(), GTXWireframe::n_objects, GTXWireframe::name, and GTXWireframe::objects.

Referenced by GTXClientWireframeDuplicate(), and GTXClientWireframeSystemDuplicate().

GLOBAL void GTXClientWireframeObjectDuplicate | ( | const GTXWireframeObject * | object_in,
|  | GTXWireframeObject * | object_out
| ) |  |

Copies a given Wireframe Object.

This function copies a Wireframe Object

Parameters

  object_in | original Wireframe Object

Return values

  object_out | pointer on destination Wireframe Object

References GTXClientWireframeObjectDuplicate(), GTXWireframeObject::n_triangles, GTXWireframeObject::n_vertices, GTXWireframeObject::triangles, and GTXWireframeObject::vertices.

Referenced by GTXClientWireframeDuplicate(), and GTXClientWireframeObjectDuplicate().

GLOBAL void GTXClientWireframeSystemDuplicate | ( | const GTXWireframeSystem * | wsys_in,
|  | GTXWireframeSystem * | wsys_out
| ) |  |

Copies a given Wireframe System.

This function copies a Wireframe System

Returns
  new copy of the Wireframe System

Parameters

  wsys_in | original Wireframe System

Return values

  wsys_out | copied Wireframe System

References GTXClientWireframeDuplicate(), GTXClientWireframeSystemDuplicate(), GTXWireframeSystem::n_wireframes, and GTXWireframeSystem::wireframes.

Referenced by GTXClientWireframeSystemDuplicate().

GLOBAL int GTXClientWriteCharVariable | ( | int | compress,
|  | const char * | test_val,
|  | gtx_long | nb_val,
|  | const char *const * | data
| ) |  |

Write data to the current alphanumerical variable.

This function writes data to the current alphanumerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  test_val | Value for undefined sample
  nb_val | Number of sampes in the array
  data | Array of alphanumerical variable samples

Examples:
  write_files.c.

References GTX_ERROR_NONE, and GTXClientWriteCharVariable().

Referenced by GTXClientWriteCharVariable().

GLOBAL int GTXClientWriteCharVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | int | compress,
|  | const char * | test_val,
|  | gtx_long | nb_val,
|  | const char *const * | data
| ) |  |

Write continuous subpart of data to the current alphanumerical variable.

This function writes a subpart of data to the current alphanumerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  test_val | Value for undefined sample
  nb_val | Number of values in the data array (must be set to the number of selected samples in the specified range in compressed mode or the number of samples in the range in non-compressed mode)
  data | Array of alphanumerical variable samples

Remarks:
  Warning: This functions needs a server version >= 6.0.8

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientWriteCharVariableSub().

Referenced by GTXClientWriteCharVariableSub().

GLOBAL int GTXClientWriteDoubleVariable | ( | int | compress,
|  | double | test_val,
|  | gtx_long | nb_val,
|  | const double * | data
| ) |  |

Write data to the current numerical variable.

This function writes data to the current numerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  test_val | Value for undefined sample
  nb_val | Number of samples in the array (must be set to the number of selected samples in the current file in compressed mode or the number of samples in the file in non-compressed mode)
  data | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays

If the variable is a length one, data must be in the current unit (GTXClientSetUnit) if unit_mode is 0 (GTXClientSetUnitMode). If the variable is a length one and unit_mode is 1, it must be expressed in the variable unit.

Examples:
  write_fault.c, and write_files.c.

References GTX_ERROR_NONE, and GTXClientWriteDoubleVariable().

Referenced by GTXClientWriteDoubleVariable().

GLOBAL int GTXClientWriteDoubleVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | int | compress,
|  | double | test_val,
|  | gtx_long | nb_val,
|  | const double * | data
| ) |  |

Write continuous subpart of data to the current numerical variable.

This function writes a subpart of data to the current numerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  test_val | Value for undefined sample
  nb_val | Number of values in the data array (must be set to the number of selected samples in the specified range in compressed mode or the number of samples in the range in non-compressed mode)
  data | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays Warning: This functions needs a server version >= 4.0.7 for 4.0.x series or >= 4.1.1 for 4.1.x series.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientWriteDoubleVariableSub().

Referenced by GTXClientWriteDoubleVariableSub().

GLOBAL int GTXClientWriteFaults | ( | const GTXFaultSystem * | fault_system | ) |

Write fault system to the current file.

This function store a fault system in the current file.

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  fault_system | Fault system to be stored in the current file

Examples:
  write_fault.c.

References GTXFaultSystem::aux_var_test, GTXFaultSystem::aux_var_used, GTXFaultSystem::faults, GTXFaultSystem::faults_2d, GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, GTXClientWriteFaults(), GTXFaultSystem::n_faults, GTXFault::n_segments, GTXFault::name, GTXFault::polygon, GTXFaultSegment::priority, GTXFault::segments, GTXFaultSegment::V1, GTXFaultSegment::V2, GTXFaultSegment::V3, GTXFaultSegment::X1, GTXFaultSegment::X2, GTXFaultSegment::X3, GTXFaultSegment::Y1, GTXFaultSegment::Y2, GTXFaultSegment::Y3, GTXFaultSegment::Z1, GTXFaultSegment::Z2, and GTXFaultSegment::Z3.

Referenced by GTXClientWriteFaults().

GLOBAL int GTXClientWriteLineCharVariable | ( | int | line_index,
|  | const char * | test_val,
|  | int | nsample,
|  | const char *const * | data
| ) |  |

Write line data to the current alphanumerical variable.

This function writes line data to the current alphanumerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  line_index | The line index [1..nline]
  test_val | Value for undefined sample
  nsample | Number of samples in the array (must be set to the number of samples of this line even with a active selection)
  data | Array of alphanumerical variable samples

Remarks:
  Warning This functions needs a server version >= 16.01beta

You might consider using

See Also
  GTXClientWriteCharVariableSub if you potentially have a lot of lines to write for efficiency.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientWriteLineCharVariable().

Referenced by GTXClientWriteLineCharVariable().

GLOBAL int GTXClientWriteLineDoubleVariable | ( | int | line_index,
|  | double | test_val,
|  | int | nsample,
|  | const double * | data
| ) |  |

Write line data to the current numerical variable.

This function writes line data to the current numerical variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  line_index | The line index [1..nline]
  test_val | Value for undefined sample
  nsample | Number of samples in the array (must be set to the number of samples of this line even with a active selection)
  data | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays

Warning: This functions needs a server version >= 8.06beta.

You might consider using

See Also
  GTXClientWriteDoubleVariableSub if you potentially have a lot of lines to write for efficiency.

Examples:
  write_files.c.

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, GTX_ERROR_SERVER, and GTXClientWriteLineDoubleVariable().

Referenced by GTXClientWriteLineDoubleVariable().

GLOBAL int GTXClientWriteSelectionVariable | ( | const gtx_long | nb_val,
|  | const unsigned char * | data
| ) |  |

Write selection data (0,1) to the current variable (must be a selection)

This function writes data to the current numerical/selection variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  nb_val | Number of samples in the array (must be set to the number of selected samples in the current file)
  data | Array of variable samples (0,1)

Remarks:
  The current selection (which may have been set by GTXClientSetSelection) is ignored while writing the current variable's (which must also be a selection variable) contents. The variable must be have been chosen beforehand by using GTXClientSetVariable.

Warning: This functions needs a server version >= 7.0.8beta or 8.00

Examples:
  write_files.c.

References GTX_ERROR_NONE, and GTXClientWriteSelectionVariable().

Referenced by GTXClientWriteSelectionVariable().

GLOBAL int GTXClientWriteSelectionVariableSub | ( | const gtx_long | first,
|  | const gtx_long | last,
|  | const gtx_long | nb_val,
|  | const unsigned char * | data
| ) |  |

Write continuous subpart of selection data (0,1) to the current variable (must be a selection)

This function writes data to the current numerical/selection variable

Returns
  error code:
  - 0 if Ok
  - 1 on error (see GTXClientGetLastError)

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  nb_val | Number of samples in the array (must be set to the number of selected samples in the current file)
  data | Array of variable samples (0,1)

Remarks:
  The current selection (which may have been set by GTXClientSetSelection) is ignored while writing the current variable's (which must also be a selection variable) contents. The variable must be have been chosen beforehand by using GTXClientSetVariable.

Warning: This functions needs a server version >= 7.0.8beta or 8.00

References GTX_ERROR_NETWORK, GTX_ERROR_NONE, and GTXClientWriteSelectionVariableSub().

Referenced by GTXClientWriteSelectionVariableSub().

## Variable Documentation

void(* GTX_ERROR_FUNCTION)(const char *string)

Error message function pointer This function pointer is called by the API when an error occured to inform the calling application.

This function can be overriden by an application function. The default function prints the error message to the standard error descriptor prefixed by the string: "GTXClient ERROR:".

Examples:
  motif_client.c.