GuiXT Replacing a separator character: We have a material number that contains / as a separator character, e.g. 0815/007. In order to display a .jpg image of the material we need to replace the / with -. The first and second parts of the material number are of variable length. How can we achieve this in GuiXT?

Let's assume that the material number "0815/007" is in F[Material].
You can choose between two viable possibilites:

(1)

Using a long text variable and the ReplaceText command:

Set text[nr] "&F[Material]"
ReplaceText "nr" from="/" to="-"
Image (10,80) "prodimages\&text[nr].jpg"


(2)

Using the "pattern=" option of the Set command:

Set V[nr1] "&F[Material]" pattern="%/"
Set V[nr2] "&F[Material]" pattern="&V[nr1]/%"
Image (10,80) "prodimages\&V[nr1]-&V[nr2].jpg"