Use of #$ variables

Optuma Forums Optuma Scripting Use of #$ variables

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #58221
    AvatarMichael
    • Topics: 10
    • Replies: 15
    • Posts: 25

    Hi,

     

    I am still a little bemused by the use of #$ varaibles although I have integrated them successfully in other scripts.

    This script tries to use #$factor as an adjustable variable but it does not seem to work and the “factor” option does not appear in the adjustable variables when the script is used.

    Here is the script;

    I have tried to attach the exported script but apparently it is not an allowed file type so I have attached the entire workbook which is only one chart.

    cheers

    Michael

    • This topic was modified 5 days, 19 hours ago by AvatarMichael.
    Attachments:
    #58227
    AvatarMichael
    • Topics: 10
    • Replies: 15
    • Posts: 25

    Here is the script again in better form because the forum won’t let me edit my post above.

     

     

    #58229
    AvatarTrevor R
    • Topics: 74
    • Replies: 239
    • Posts: 313

    Hi Michael,

    I ran into the issue you have struck sometime ago. You cannot use #$ and $ to input a number variable. That functionality is limited Bar variables.

    You can get around the issue with a little, as yet undocumented, scripting trickery as explained by Mathew in the thread Scripting: Variables and Properties.

    Cheers

    Trevor

    1 user thanked author for this post.
    #58247
    AvatarMichael
    • Topics: 10
    • Replies: 15
    • Posts: 25

    So I have changed the code to this, but it does absolutely nothing. Am I not getting it?

    • This reply was modified 5 days, 9 hours ago by AvatarMichael.
    #58251
    AvatarTrevor R
    • Topics: 74
    • Replies: 239
    • Posts: 313

    Hi Michael,

    It appears that you cannot undertake calculations with the #$ variables.

    I tried the simple MA plot script from the KB article Bar Variables and Properties :

    This code will work as shown in the above KB article, with MA1 and MA2 appearing and active in the Properties Panel list.

    However, if you change the code to:

    You will find that the MA1 has disappeared from the Properties Panel list.

    This seems to stymie what you are attempting to achieve.

    We’ll have to hope that the Optuma Genii can come up with a solution that makes to use of the #$var function much more flexible.

    Cheers

    Trevor

    1 user thanked author for this post.
    #58257
    MathewMathew
    • Topics: 28
    • Replies: 1,335
    • Posts: 1,363

    Hi Michael (and thanks Trevor)

    Unfotunately I can not see us ever getting this to work

    There is a lot of work involved in pre-parsing that and while I understand it is inconvenient, you can add more variables for the unique values you need. Given the amount of work needed, and the existance of an alternative, this will never get high enough in the priority list to get addressed.

    All the best

    Mathew

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close