Categories > OpenTBS general >

Use Multiple Variables in ope=changepic code?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: John Lawler
Date: 2012-02-21
Time: 23:09

Use Multiple Variables in ope=changepic code?

Hi, I'm trying to use the changepic feature to replace pictures in a document with multiple pages, where each page will have an image.

I've got it working simply in test with code like this:

[b.#;ope=changepic;from=’temp[val].png’;adjust=sameheight]

However, it would be most convenient for me if I were able to specify the file name with two different variables (maybe b.# combined with a global onshow.x, e.g., variable).  Is that possible with OpenTBS?  I can of course just modify my block array (that contains a database query) to contain the data, but felt what I'm suggesting here would be a cleaner solution if it can be done.

Thanks
By: Skrol29
Date: 2012-02-21
Time: 23:33

Re: Use Multiple Variables in ope=changepic code?

Hi,

You can use [var] fields in parameter "from".

For example:
[b.#;ope=changepic;from='temp_[var.type]_[val].png';adjust=sameheight]
By: John Lawler
Date: 2012-02-21
Time: 23:34

Re: Use Multiple Variables in ope=changepic code?

Thanks, Skrol.  I was just about to post back that I had figured that out (basically) on closer examination of the docs.  Sorry to have bothered you with it.