Home > Community > Forums > Custom IC SKILL > dialog interactive window noise summary

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: *

 dialog interactive window noise summary 

Last post Tue, Feb 13 2007 9:10 AM by archive. 1 replies.
Started by archive 13 Feb 2007 09:10 AM. Topic has 1 replies and 1541 views
Page 1 of 1 (2 items)
Sort Posts:
  • Tue, Feb 13 2007 9:10 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    dialog interactive window noise summary Reply

    Dear all,

    Howto pop up a window and take a string into a variable in SKILL ?
    I intend to upgrade my "print noise summary" button listed bellow in order to save it in the choosen file, like : scanf("%s",filename) or something.
    Thanks for any idea.

    ;; A noise simulation is supposed to have been run

    procedure( saveNoise( filename )
    noiseSummary( 'integrated ?result 'noise
    ?noiseUnit "V"
    ?truncateType 'byNumber ?truncateData 15
    ?output filename)
    printf("Noise Summary Result saved in %s\n",filename)
    ); end procedure
    ;; i.e.: saveNoise( "toto.txt")

    ;;; creating a item for the pulldown menu
    trMenuItemMyFunction = hiCreateMenuItem(
    ?name 'trMenuItemMyFunction
    ?itemText "My Function"
    ?callback "saveNoise(\"summaryNoise.txt\")"
    ); end of created Menu item

    ;;; creating a second menu item for the pulldown menu
    trMenuItemPrintNoiseSummary = hiCreateMenuItem(
    ?name 'trMenuItemPrintNoiseSummary
    ?itemText "print noise"
    ?callback "noiseSummary( 'integrated ?result 'noise ?noiseUnit \"V\" ?truncateType 'byNumber ?truncateData 15)"
    ); end of created Menu item

    ;;; creating the Example Menu pulldown menu
    hiCreatePulldownMenu(
    'trEdPulldownMenu
    "Ed_Menu"
    list( trMenuItemMyFunction trMenuItemPrintNoiseSummary )
    )

    ;;; inserting the pulldown menu in the CIW
    hiInsertBannerMenu( window(1) trEdPulldownMenu 5 )


    Originally posted in cdnusers.org by ebecheto
    • Post Points: 0
  • Fri, Feb 23 2007 7:28 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: dialog interactive window noise summary Reply

    I have update this code to work for paramatric simulation as well if anyone is interested...
    Just save the following code in thisFile.ocn and execute :
    load("thisFile.ocn")



    ;; A noise simulation is supposed to have been run

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    procedure( noiseResult( @optional (file nil ) )
    let( (resultDir pfile param paramList)

    ;; optional argument proccessing
    caseq( file
    (nil pfile = poport)
    (t pfile = outfile(file))
    )

    ;; execute the following code
    ;; does not work if anyone had created a directory named *=* also
    if( paramList=rexMatchList(".*=.*" ls(openResults())) then

    ;; loop on every paramatric directory
    resultDir = openResults()
    foreach(param paramList
    openResults(strcat(resultDir "/" param))
    fprintf(pfile "\t\t[** %s **]\n",param)
    noiseSummary( 'integrated ?result 'noise ?noiseUnit "V" ?truncateType 'byNumber ?truncateData 15 ?output pfile)
    ); end foreach
    openResults(resultDir)

    else ;; not a parametric simulation

    ;; call to the noise summary function in the current directory
    noiseSummary( 'integrated ?result 'noise ?noiseUnit "V" ?truncateType 'byNumber ?truncateData 15 ?output pfile)

    ); end if
    close(pfile)

    ); end let
    ); end procedure

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




    ;;; creating a item for the pulldown menu
    trMenuItemMyFunction = hiCreateMenuItem(
    ?name 'trMenuItemMyFunction
    ?itemText "Save noise"
    ?callback "filename = \"summaryNoise.txt\"
    noiseResult( filename )
    printf(\"Noise Summary Result saved in [_** %s/%s **_]\n\", pwd() filename)"
    ); end of created Menu item

    ;;; creating a second menu item for the pulldown menu
    trMenuItemPrintNoiseSummary = hiCreateMenuItem(
    ?name 'trMenuItemPrintNoiseSummary
    ?itemText "print noise"
    ?callback "noiseResult()"
    ); end of created Menu item

    ;; noiseSummary( 'integrated ?result 'noise ?noiseUnit "V" ?truncateType 'byNumber ?truncateData 15)

    ;;; creating the menu item for the pulldown menu
    trMenuItemResize = hiCreateMenuItem(
    ?name 'trMenuItemResize
    ?itemText "Resize"
    ?callback "hiResizeWindow( window(1) list(0:0 500:500))"
    )


    ;;; creating the Example Menu pulldown menu
    hiCreatePulldownMenu(
    'trEdPulldownMenu
    "Menu_perso"
    list( trMenuItemMyFunction trMenuItemPrintNoiseSummary trMenuItemResize)
    )

    ;;; inserting the pulldown menu in the CIW
    hiInsertBannerMenu( window(1) trEdPulldownMenu 5 )

    ;; might want to delete it maybe
    ;;hiDeleteBannerMenu( window(1) 5 ) <== number of the item


    Originally posted in cdnusers.org by ebecheto
    • Post Points: 0
Page 1 of 1 (2 items)
Sort Posts:
Started by archive at 13 Feb 2007 09:10 AM. Topic has 1 replies.