Home > Community > Forums > Custom IC SKILL > hiSaveAsViewFile() trouble in Virtuoso v6

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 hiSaveAsViewFile() trouble in Virtuoso v6 

Last post Fri, Mar 1 2013 1:54 PM by jaleco. 6 replies.
Started by jaleco 05 Feb 2013 10:43 AM. Topic has 6 replies and 1193 views
Page 1 of 1 (7 items)
Sort Posts:
  • Tue, Feb 5 2013 10:43 AM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    hiSaveAsViewFile() trouble in Virtuoso v6 Reply

     I have a script (http://www.cadence.com/Community/forums/p/24288/1317148.aspx#1317148) that will save the design tree file to a shell to run a shell script on, working in Virtuoso v5, but is breaking in Virtuoso v6 on the command hiSaveAsViewFile.

    The Save File As form looks quite different in v6, but I cannot figure out Cadence's documentation to search for (anything..) something like this.

    In v5 I use:

    hiSaveAsViewfile->file->value-> = Newfilename

    hiFormDone(hiSaveAsViewfileForm)

    However, in v6,  I get the error message " eval: unbound variable - hiSaveAsViewfile".

    Since testing with print statements is able to show me that the variable Newfilename is properly defined, and the command hiSaveAsViewfile() works in v6, I can only guess that the form itself is different in v6, and the format hiSaveAsViewfile->file->value is not the same.

    2 Questions -

    1. how can I test for the version of Virtuoso as an environment variable so I can handle this save function accordingly?

    2. what is the v6 format for hiSaveAsViewfile->file->value??

    many thanks in advance!

    • Post Points: 20
  • Tue, Feb 5 2013 11:03 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,460
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply

    The form looks like it is probably a QT form and won't have the Skill hooks to it. However, you can simply save it to a file like this:

    hiSaveAsViewfile( 
    [w_windowId]
    [t_fileName]
     )

     

    hiSaveAsViewfile(hiGetCurrentWindow() "/tmp/myfile")

    hiSaveAsViewfile(window(9) "/tmp/myfile")

     

    In 6.1:  dbGetDatabaseType() -> "OpenAccess"

    In 5.1:  dbGetDatabaseType() -> "CDBA"

     

    Derek

     

    • Post Points: 20
  • Tue, Feb 5 2013 11:34 AM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply

     Thanks Derek,

    I have the file saved out successfully now and will try this same code in v5.

    I get an error when I try to test the environment for version using your suggested code however.

    Much appreciated!

    • Post Points: 20
  • Tue, Feb 5 2013 11:59 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,460
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply

     What error do you get in your CIW, and what exactly did you try for your Skill code? The command is just: dbGetDatabaseType()

    Don't add the "->" stuff, I was just trying to show you the output of the command. If you are running a really old version of Cadence 5, the command might not be available, in which case you might need to do something like this:

     procedure(myCheckIsOA()
        if(getd('dbGetDatabaseType) && dbGetDatabaseType() == "OpenAccess"
            t
            nil
        )
    ) ;proc

    Derek

    • Post Points: 20
  • Fri, Mar 1 2013 11:27 AM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply

    Hello Derek, or others who may see this thread,

    I am running the script below to operate on the Design Tree saved out to the shell as an ascii file, but the hiSaveAsViewFile() cmd does not overwrite an existing file.

    Is there a way to force hiSaveAsViewFile() to overwrite an existing file?

    If not, I can always do it with a shell script, but using SKILL would be simpler.

    Any help with this would be much appreciated!!!

    procedure( TreeInvList()
          9      printf(">>>>>>>>  Creating a tree inventory from current level to bottom.  <<<<<<<\n")
         10      printf("*****************  Note:  *************\n")
         11      printf("This will strip out all symbolic links in the tree, most of which are contact or via cells created by the \"Create Contact\" function.\n")
         12      printf("An inventory is a unique list of layout files in the tree, including standard cells.\n")
         13      hiGetCurrentWindow()->stopLevel = dbGetMaxHierDepth()
         14      CellName = geGetEditCellView()->cellName
         15      printf("Cell name is %s.\n" CellName)
         16      printf("Tree File is %s_tree.\n" CellName)
         17      printf("Inventory file is %s_tree_inv.\n" CellName)
         18      WritePath = geGetEditCellView()->cell->writePath
         19      printf("Write path where files will be created is:\n")
         20      printf("%s\n" WritePath)
         21      TreeFile = strcat(WritePath "/" CellName "_tree")
         22      printf("TreeFile full path is %s\n" TreeFile)
         23      InvFile = strcat(TreeFile "_inv")
         24      printf("InvFile full path is %s\n" InvFile)
         25      printf("Wait for results....................................\n")
         26      printf("File is being created...............................\n")
         27                  leHiTree()
         28      hiFormDone(leTreeForm)
         29 ;     hiSaveAsViewfile->file->value = TreeFile                          ; version 5 input form code
         30      hiSaveAsViewfile(hiGetCurrentWindow() TreeFile)                    ; version independent code
         31 ;     hiFormDone(hiSaveAsViewfileForm)                                                          ; version 5 code
         32      hiFormDone(leTreeForm)
         33      ipcWait(ipcBeginProcess(strcat("./scripts/treeinv " TreeFile)))
         34      view(InvFile)                                                      ; view prior to response from BeginProcess displays blank window
         35 ) ; proc

    James

    • Post Points: 20
  • Fri, Mar 1 2013 12:14 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,598
    • Points 16,075
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply

    Hi James,

    Use the hiSaveViewfile() function instead, it has a third optional argument g_donotOverwrite that you can set to nil in this case. This function appears to exist in both IC5141 and IC61x versions.

    Regards,

    Lawrence.

    • Post Points: 20
  • Fri, Mar 1 2013 1:54 PM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: hiSaveAsViewFile() trouble in Virtuoso v6 Reply
    Thank you once again Lawrence, that is working great!
    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by jaleco at 05 Feb 2013 10:43 AM. Topic has 6 replies.