Currently, I have hardcoded the range from 3.0 to 4.0 with 0.1 increment as follows.
$Range->{value} = [['voltage', "cell($cell_addr)"], [3.0, $icell_hash{$cell_addr}{' 3.00'}], [3.1, $icell_hash{$cell_addr}{' 3.10'}], [3.2, $icell_hash{$cell_addr}{' 3.20'}], [3.3, $icell_hash{$cell_addr}{' 3.30'}], [3.4, $icell_hash{$cell_addr}{' 3.40'}], [3.5, $icell_hash{$cell_addr}{' 3.50'}], [3.6, $icell_hash{$cell_addr}{' 3.60'}], [3.7, $icell_hash{$cell_addr}{' 3.70'}], [3.8, $icell_hash{$cell_addr}{' 3.80'}], [3.9, $icell_hash{$cell_addr}{' 3.90'}], [4.0, $icell_hash{$cell_addr}{' 4.00'}],
But if a user specified he wanted the range from 1.00 to 2.00 with a 0.1 increment for the X-axis then I would like the Range variable to look liks this. I just don't know how to change it other then hardcoding it in the code myself.
$Range->{value} = [['voltage', "cell($cell_addr)"], [1.0, $icell_hash{$cell_addr}{' 3.00'}], [1.1, $icell_hash{$cell_addr}{' 3.10'}], [1.2, $icell_hash{$cell_addr}{' 3.20'}], [1.3, $icell_hash{$cell_addr}{' 3.30'}], [1.4, $icell_hash{$cell_addr}{' 3.40'}], [1.5, $icell_hash{$cell_addr}{' 3.50'}], [1.6, $icell_hash{$cell_addr}{' 3.60'}], [1.7, $icell_hash{$cell_addr}{' 3.70'}], [1.8, $icell_hash{$cell_addr}{' 3.80'}], [1.9, $icell_hash{$cell_addr}{' 3.90'}], [2.0, $icell_hash{$cell_addr}{' 4.00'}],
I would like to have the code change thru some type of loop on runtime.

In reply to Re^4: Win32::OLE X-Axis range question by Niner710
in thread Win32::OLE X-Axis range question by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.