• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. VIVA Skill Functions

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 143
  • Views 17730
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VIVA Skill Functions

netbug
netbug over 9 years ago

Good afternoon,

I am using quite intensively VIVA, and I would like to create some bindkeys for the main functions I am using.

So I would like to do the following (not ordered by priority)

1 - Change Font from created labels, or when creating a label automatically use a given font and size

2 - Save the images to a PNG file with a name generated automatically, that can have any format

For eg. the name of the file could look like "test_13Mar2016_01", "test 13Mar2016_02, etc". 

If you could refer to a manual having skill functions for VIVA, I would appreciate.

Many thanks,

Pedro

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    For the first question, you can change the font used by subsequent labels (added with Graph->Add Label) by using something like this:

    envSetVal("viva.graphLabel" "font" 'string "Helvetica,16,-1,5,50,0,0,0,0,0")

    For the second (assuming you're using IC616 or IC617) you can use saveGraphImage() - details in the documentation.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 9 years ago
    Hi Andrew, Thanks for the answer. Regarding first question it worked perfectly, while the second only pops the menu and I what I reaaly want is to pass strings to the function to fill in each of the fields. Thanks in advance, José
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi José,

    I don't understand why saveGraphImage() should "pop the menu" (whatever that means) - which version are you using, and what arguments are you passing it:

    saveGraphImage(
    [?window x_window]
    [?fileName x_fileName]
    [?exactcopy g_exactCopy
    [?quality x_quality]
    [?msOptimize g_msOptimize]
    [?width x_width]
    [?height x_height]
    [?units s_units]
    [?resolution x_resolution]
    [?resolutionUnits s_resolutionUnits]
    [?aspectRatio g_aspectRatio]
    [?enableTitle g_enableTitle]
    [?enableLegend g_enableLegend]
    [?enableAxes g_enableAxes]
    [?enableGrids g_enableGrids]
    [?backgroundColor s_backgroundColor]
    [?saveAllSubwindows g_saveAllSubwindows]
    [?saveEachSubwindowSeparately g_saveEachSubwindowSeparately]
    )
    => x_fileName / nil

    Saves the graph as an image.

    More details in the full documentation...

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 9 years ago

    Maybe I was using the wrong command. I was using _ddtExecuteAction(awvGetCurrentWindow()->vivaSession "graphSaveImage").

    What I would like to do, is to save the file as a PNG having as name the that the one of the tab where the graph is being plotted. Moreover I would like this file to be unique, so if I have several  plots of the same window the name should be somewhow different, eg. ending in 01, 02, etc.

    Best regards,

    José

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi José,

    Well, that wasn't what I advised you to use - that's a completely different function.

    I don't think you'll get to the "tab name" - well, you could use awvGetWindowTitle(currentWindow()) to get it maybe - but you could certain write some SKILL around the call to saveGraphImage() to compute a unique name easily enough.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 9 years ago

    Hi Andrew,

    Thanks a lot for your answer.

    I can't really find a way to retrieve the name of a tab, other way would be to retrieve the name of the test under ADE-XL. After that is it possible to concatenate the test's name with another string that could  identify the image with an unique name ?

    Regarding my very first question, on the command that you've indicated:

    envSetVal("viva.graphLabel" "font" 'string "Helvetica,16,-1,5,50,0,0,0,0,0")

    what does -1,5,50,0,0,0,0,0 stand for, and how do I set the font to bold ?

    Many thanks,

    Pedro

    PS: I am using IC616

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    The awvGetWindowTitle() approach I mentioned earlier would get the info about the test name from the tab if used in ADE XL. In my case, my tests are called "AC" and "TRAN", and depending on the selected VIVA window I get:

    awvGetWindowTitle(currentWindow()) => "AC : opamp090 full_diff_opamp_AC schematic"

    awvGetWindowTitle(currentWindow()) => "TRAN : opamp090 full_diff_opamp_TRAN schematic"

    So ADE XL names the window with the test name and the test bench.

    You can get the test names from ADE XL using:

    axlSess=axlGetWindowSession()
    sdb=axlGetMainSetupDB(axlSess)
    testNames=cadr(axlGetTests(sdb))

    but this has to be done when the ADE XL window is the current window, and it would give you a list of all the test names, so I'm not sure it's useful.

    For the font information, this is covered in detail in the documentation. It's pretty easy to find, but if you bring up Help->Virtuoso Documentation Library, then make sure that View->Show Navigation is enabled (not hidden), and then search in the left pane for "Font String" (include the quotation marks) you should find it. Or you could search for graphLabel - it's pretty easy to locate.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 9 years ago

    Well, I am most there.

    I have done mystr=praseString(awvGetWindowTitle(currentWindow())":") and now I just want to take the first element of the array to pass it to the function saveGraphImage.

    Best regards,

    José

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago
    car()
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 9 years ago

    Thanks a lot Andrew for your patience. ;-)

    Best regards,

    José

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information