• 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 create window and send data to it

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 145
  • Views 14603
  • 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 create window and send data to it

Trevor1981
Trevor1981 over 14 years ago

 Hi,

I'm new to skill and have probably a very simple issue with it. I need to create a window and send some data to it, so in short my code should do something like that:

w_id = hiOpenWindow( ...)

fprintf(w_id "blah blah")

fprintf(w_id "more blah blah")

Obviously, fprintf is not the right command for this task as it accepts 'port' type variable and not the window handle.

Does anyone know how to achieve it in SKILL? Thanks for your help. 

Regards,

 T.

  • Cancel
Parents
  • StefanSL
    StefanSL over 14 years ago

    Hi Trevor1981,

    here a piece of code based on a form containing a scrolled region and
    a string-field:


    ;first, create the field to print your message to
    mydout = hiCreateOutputStringField(?name 'mydout ?defValue "OUTPUT"
    ?invisible nil
    )
    ; create a scrolled region, place mydout inside
    myds = hiCreateScrollRegion(
    ?name 'myds
    ?fields list( list(mydout 0:0 500:300) )
    )
    ; create a form and place myds into it
    mydform = hiCreateAppForm(?name 'mydform ?fields list( list(myds 0:0 600:350 ) ))
    ; display the form
    hiDisplayForm(mydform)

    ; now you can write to the form by modifying mydform->myds->mydout->value :
    mydform->myds->mydout->value = "OUTTEXT01"
    ; or by just appending new text
    mydform->myds->mydout->value = strcat(mydform->myds->mydout->value "\n" "more outtext")

    slight problem: the scrolled field does not follow your input, could not
    find the correct usage of hiSetScrollBarValue:
    hiSetScrollBarValue(mydform list(0 1000))  (-> applied to the form,)
    behaves as expected (if there is a scrollbar on the form, just reduce the window-size to check)
    but executing hiSetScrollBarValue(myds list(0 1000))
    i run into a warning
    "drawing area is NULL!" and scroll-position doesn't change

    so, there's some more work to do but i hope this is a starting point for
    further steps.


    regards
    Stefan
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • StefanSL
    StefanSL over 14 years ago

    Hi Trevor1981,

    here a piece of code based on a form containing a scrolled region and
    a string-field:


    ;first, create the field to print your message to
    mydout = hiCreateOutputStringField(?name 'mydout ?defValue "OUTPUT"
    ?invisible nil
    )
    ; create a scrolled region, place mydout inside
    myds = hiCreateScrollRegion(
    ?name 'myds
    ?fields list( list(mydout 0:0 500:300) )
    )
    ; create a form and place myds into it
    mydform = hiCreateAppForm(?name 'mydform ?fields list( list(myds 0:0 600:350 ) ))
    ; display the form
    hiDisplayForm(mydform)

    ; now you can write to the form by modifying mydform->myds->mydout->value :
    mydform->myds->mydout->value = "OUTTEXT01"
    ; or by just appending new text
    mydform->myds->mydout->value = strcat(mydform->myds->mydout->value "\n" "more outtext")

    slight problem: the scrolled field does not follow your input, could not
    find the correct usage of hiSetScrollBarValue:
    hiSetScrollBarValue(mydform list(0 1000))  (-> applied to the form,)
    behaves as expected (if there is a scrollbar on the form, just reduce the window-size to check)
    but executing hiSetScrollBarValue(myds list(0 1000))
    i run into a warning
    "drawing area is NULL!" and scroll-position doesn't change

    so, there's some more work to do but i hope this is a starting point for
    further steps.


    regards
    Stefan
     

    • 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