SOLVED: Setting a colour ramp through a gx

edited February 2019 in GX Developer
Hi all,

I'm trying to set up a gx to change the colour ramps of multiple AGGs in a map. I have everything working now expect setting the colour ramp from a .tbl file. I couldn't find a gx function for this so I tried recording a script and using the SetString_SYS() function to set the input parameters into the parameter block.

So far I have:
IFileCombineParts_STR(C","\\Program Files\\Geosoft\\Desktop Applications 9\\tbl\\Topography","bathymetry-mid-esri-112","tbl","",sColourRamp,1056);
iRunGX_SYS("geogxnet.dll(Geosoft.GX.UtilityForms.SelectZoneFile;Run)"); // Run the create database gx

However, when I run the gx, it just opens the colour ramp selector with it defaulted to the standard Geosoft colour bar. I have tried running it as SetInteractive_SYS(0) but to no avail.

Does anyone know of either a direct function to set the colour ramp or what other inputs are required for the parameter block please?

Many thanks


In case anyone has a similar problem, I have solved it by creating an ITR from the rrquired colour tbl file, then applying it

itr = CreateFile_ITR(sColourRamp); //createITR from tbl file

Normal_ITR(itr,rSD,rMean,rExpansion,rDUMMY); //Set normal dist parameters

SetAggMap_ITR(Map,sAGG,itr); // ITR object to set


This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!