• 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. How to generate & view files from GUI forum

Stats

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

How to generate & view files from GUI forum

Drake96
Drake96 over 3 years ago

hola!

I have created a GUI , which consists of several tech nodes (hiCreateCyclicField) - 5nm,10nm,14nm,28nm & and button "view sample text"
I want that when i click on 5nm and press button-> a sample text will be visible that contains eg --     "name - drake wick"

same when i click on 10nm -> a sample text generate and contains--  "needs help in skill"

Basically it will be sample file , visible but not editable...so for different nodes , different text appears.

How we can approach that?

Apologies if its not clear..am still in learning mode

Drake

  • Cancel
Parents
  • mbracht
    mbracht over 3 years ago

    Hi Drake,

    I don't know what you mean when you say "a sample text will be visible". You want to see it in a dialog or in the CIW or what exactly?

    Below is an example that prints the sample text to CIW - I leave it up to you to implement the "visibility" thing the way you want.

    (let (cyclicField btn form)
       cyclicField = (hiCreateCyclicField
                         ?name       (gensym)
                         ?choices    (list "5nm" "10nm" "14nm" "28nm"))
       btn = (hiCreateButton
          ?name (gensym)
          ?buttonText "view sample text"
          ?callback   (lambda (@rest args)
                         (case cyclicField->value
                            ("10nm"
                               (println "needs help in skill"))
                            ("5nm"
                               (println "that's pretty small!"))
                            (t
                               (printf "don't know what to do with %s\n" cyclicField->value)))))

       form = (hiCreateAppForm
          ?name (gensym)
          ?fields (list cyclicField btn))
       (hiDisplayForm form) )

    Max

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Drake96
    Drake96 over 3 years ago in reply to mbracht

    Hello Max,
    I want it in text file form?
    Is it possible to happen that when am click 5nm a text file open, also that file should not editable

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 3 years ago in reply to Drake96

    so you want a text file to be opened in readonly mode when you click the button right? This is what the view() function does. Just replace the println() statements against (view <nameOfTextFile>).

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Drake96
    Drake96 over 3 years ago in reply to mbracht

    Max,

    Sorry for trouble.

    mbracht said:
    println() statements against (view <nameOfTextFile>).

    when am replacing am gettting something like this..text is appearing as title and inside its empty-

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 3 years ago in reply to Drake96

    <nameOfTextFile> must be the name of an existing(!) file - "that's pretty small" is not an existing file is it?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Drake96

    That won't work of course because it's trying to open a text file that doesn't exist and so it just shows empty contents. If you've used view() - you didn't say - that's exactly what it would do.

    Instead, try:

    procedure(CCFshowSomeTextInAWindow(theText)
      let((win)
        win=hiOpenWindow(?type "text")
        hiTextDisplayString(win theText t)
        win
      )
    )

    and replace the calls to println in Max's code with similar to this:

    (CCFshowSomeTextInAWindow "needs help in skill")

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Drake96

    That won't work of course because it's trying to open a text file that doesn't exist and so it just shows empty contents. If you've used view() - you didn't say - that's exactly what it would do.

    Instead, try:

    procedure(CCFshowSomeTextInAWindow(theText)
      let((win)
        win=hiOpenWindow(?type "text")
        hiTextDisplayString(win theText t)
        win
      )
    )

    and replace the calls to println in Max's code with similar to this:

    (CCFshowSomeTextInAWindow "needs help in skill")

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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