SOLVED: Setting a colour ramp through a gx

Options
CarolineTweedle
CarolineTweedle Posts: 3 Calcite Rank Badge
edited February 2023 in GeoStudio
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);
SetString_SYS("SELECT_ZONE_FILE","INPUT_ZONEFILE","");
SetString_SYS("SELECT_ZONE_FILE","OUTPUT_ZONEFILE",sColourRamp);
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

Caroline

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

Comments

This discussion has been closed.