• 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. Create a print out log GUI

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 17546
  • 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

Create a print out log GUI

psill000
psill000 over 11 years ago

My script has some print outs and is there a way to create a print out log GUI of those print outs.

The closest thing I could find is the  hiCreateMLTextField, but I would have to append every string to the current value. Also, I dont know how clear it may become in reading previous and if the string would become too big and cause problems.

It is not that big of an issue to append the string, just looking for the most effective way to have a print out log GUI.

The print out would be strictly used for reading print output. I know I can print to the CIW, but some users want a print out GUI.

Paul

  • Cancel
  • skillUser
    skillUser over 11 years ago

    Hi Paul,

    You could do something like the following

      msgwin = hiCreateWindow(nil "text" "Messages" "" t)
      msgwin->neverCurrentWindow = t
      hiSetViewfile(msgwin "")
      hiEnableTailViewfile(msgwin)
      hiDisplayWindow(msgwin)
    

    You may need to add a close function, but I think sending the messsages to a specific log file and displaying in a window that can automatically update should meet your needs.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 11 years ago

    Paul,

    You can add the (hopefully) already existing File menu as seen on a View File window:

    when(boundp('fileMenu) && hiIsMenu(fileMenu)
      hiInsertBannerMenu(msgwin fileMenu 0)
    )
    

    Something like that...
    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

    Is there a way to add the text without creating a file?

    Sorry for being difficult, but can I use just a *printf function to the cell window.

    Paul

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

    See this post.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill00
    psill00 over 11 years ago

    How do indentify the window?

    I tried using hiGetWindowList()

    win=hiCreateWindow(nil "text" "Show File")
    win~>??
    window:8
    >
    (searchWrapAround t scrollToLocation t ignoreCase
        t exactWord t
    )

    Paul

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

    Paul,

    I don't understand your question. If you meant "identify" then hiCreateWindow returns the window id. If you meant "indentify" then I have no idea what that word means!

    Please clarify what the issue is.

    Kind Regards,

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

    Sorry for not clarifying better.

    I have one procedure that creates and prints to the window.

    Later I have another procedure I want to print to the window.

    How do I identify from the mutliple windows I have open on which window I can print?

     

    Paul

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

    Paul,

    Why not assign the windowId to a variable that you can then refer to later?

    If you really don't want to do that, you could always do:

    win=hiCreateWindow(...)
    win->thisIsMyWindow=t  ; or whatever you want the property to be

    and then you can find it later by doing:

    win=car(exists(winId hiGetWindowList() winId->thisIsMyWindow))

    But it seems more sensible to keep track of it rather than having to search for a property on the window.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

    I have a few procedures that pint to the dialog box.

    If the procedures were nested I would pass the window variable, but several procedures outside of each other need to print out to the window.

    Thanks

    Paul

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

    You could just use a sensibly named global variable to hold the windowId. If you have an aversion to global variables for such things, then you could always use some lexical scoping using the SKILL++ (Scheme) features:

    let((windowId)
      globalProc(CCFcreateTextWindow(@rest args)
        windowId=apply(hiCreateWindow args)
      )
      globalProc(CCFgetTextWindow()
        windowp(windowId) && windowId
      )
    )

    Then you can create a window using:

      CCFcreateTextWindow(nil "text" "Show File")

    and later refer to the ID using:

      CCFgetTextWindow()

    The file above needs to be put in a file with a ".ils" suffix. It will also only work from IC615 onwards because it uses globalProc. It could be implemented in earlier releases by doing:

    let((windowId)
      CCFcreateTextWindow=lambda((@rest args)
        windowId=apply(hiCreateWindow args)
      )
      CCFgetTextWindow=lambda(()
        windowp(windowId) && windowId
      )
    )

    No global variables were harmed in the implementation of this code.

    Regards,

    Andrew.

    • 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