create a form with Skill that create a file from library man

M

manell15

Guest
I am developping a tool with skill language that generate automaticaly
a testchip from a file that describe tle list of cells of the
testchip.
I want to create from an interface this file that contains in each
line :
"name of a library" "name of the cell" "the view of the cell"
"the position of the cell in the testchip"
the interface will contain a button called "BROWSE"
when we click on the button the library manager appears and we choose
the library, the cell name and the cell view , in this moment a file
should be created containing all these informations: "name of a
library" "name of the cell" "the view of the cell" "the position
of the cell in the testchip"
Could you please help me

Best regards
manell15
 
Hi,

The Cadence Documentation is your best companion.
You have to learn how to create guis/forms/buttons and write the
callbacks which are the skill functions to be executed underneath ...
Give a look to the folowing documents :

1. The Skill User Guide: $CDSHOME/doc/sklangref/sklangref.pdf
2. The Skill reference Manual: $CDSHOME/doc/sklanguser/sklanguser.pdf
3. The User interface Manual: $CDSHOME/doc/skuiref/skuiref.pdf

The later is a good one to know about the forms/buttons and other GUI
stuffs. It comes with loads of examples as well.
This is a good one that can help for your browser task.
Do note that many posts related to guis/forms have been answered in
this forum, just google it !

Give it try yourself and feel free to back if you need a more specific
thing.

Riad.

-------- Snippet from The User interface Manual
Adding an Entry to a Menu
The following code adds a new entry, Library Browser, to the CIW. It
looks for the Library
Manager entry in all the menus of the CIW, and adds an entry for the
Library Browser
immediately after it.
let( ((ciwBannerMenus hiGetBannerMenus(window(1))) toolMenu
pdItem menuList found libBrowser)
while(ciwBannerMenus
pdItem = eval(car(ciwBannerMenus))
ciwBannerMenus = cdr(ciwBannerMenus)
menuList = pdItem ->_menuItemList
while(menuList
menuItem = car(menuList)
menuList = cdr(menuList)
when(menuItem == ’LibMan
found = t
menuList = nil
ciwBannerMenus = nil
)
)
)
when( found
libBrowser = hiCreateMenuItem(
?name ’LibBrowser
?itemText "Library Browser..."
?callback "dmbOpenLibDAGBrowser()"
)
hiInsertMenuItem(pdItem libBrowser ’LibMan)
)
)
 
manell15 wrote:
I am developping a tool with skill language that generate automaticaly
a testchip from a file that describe tle list of cells of the
testchip.
I want to create from an interface this file that contains in each
line :
"name of a library" "name of the cell" "the view of the cell"
"the position of the cell in the testchip"
the interface will contain a button called "BROWSE"
when we click on the button the library manager appears and we choose
the library, the cell name and the cell view , in this moment a file
should be created containing all these informations: "name of a
library" "name of the cell" "the view of the cell" "the position
of the cell in the testchip"
Could you please help me

Best regards
manell15
You'll want to look at ddsSyncWithForm() type of function, to allow choosing from the library manager.

Below's a minimal example.


Cheers,
Stéphane

--

procedure( SBChooseCellview()

unless( boundp('CSForm) && hiIsForm(CSForm)
CSForm = hiCreateAppForm(
?name 'CSForm
?formTitle "Choose Cellview"
?buttonLayout '(OKCancel)
?buttonDisabled '(Help)
?dialogStyle 'modal
?initialSize 320:210
?minSize 320:210
?maxSize 320:210
?fields list(
; source
list( hiCreateStringField(
?name 'srcLib
?prompt "Library"
?defValue ""
?callback "ddsUpdateSyncWithForm()"
) 20:20 260:025 080 )
list( hiCreateStringField(
?name 'srcCell
?prompt "Cell"
?defValue ""
?callback "ddsUpdateSyncWithForm()"
) 20:50 260:025 080 )
list( hiCreateStringField(
?name 'srcView
?prompt "View"
?defValue ""
?callback "ddsUpdateSyncWithForm()"
) 20:80 260:025 080 )
list( hiCreateButton(
?name 'srcBrowseBtn
?buttonText "Browse..."
?callback "ddsSyncWithForm( CSForm 'browse 'srcLib 'srcCell 'srcView )"
) 20:120 100:040 )
; destination
) ; ?fields
) ; hiCreateAppForm
)

when( hiDisplayForm( CSForm )
list( CSForm->srcLib->value CSForm->srcCell->value CSForm->srcView->value )
)

) ; procedure
 
On Apr 23, 11:09 am, "S. Badel" <stephane.ba...@REMOVETHISepfl.ch>
wrote:
manell15 wrote:
I am developping a tool with skill language that generate automaticaly
a testchip from a file that describe tle list of cells of the
testchip.
I want to create from an interface this file that contains in each
line :
"name of a library"   "name of the cell"   "the view of the cell"
"the position of the cell in the testchip"
the interface will contain a button called "BROWSE"
when we click on the button the library manager appears and we choose
the library, the cell name and the cell view , in this moment a file
should be created containing all these informations: "name of a
library"   "name of the cell"   "the view of the cell"  "the position
of the cell in the testchip"
Could you please help me

Best regards
manell15

You'll want to look at ddsSyncWithForm() type of function, to allow choosing from the library manager.

Below's a minimal example.

Cheers,
Stéphane

--

procedure( SBChooseCellview()

  unless( boundp('CSForm) && hiIsForm(CSForm)
   CSForm = hiCreateAppForm(
    ?name 'CSForm
    ?formTitle "Choose Cellview"
    ?buttonLayout '(OKCancel)
    ?buttonDisabled '(Help)
    ?dialogStyle 'modal
    ?initialSize 320:210
    ?minSize 320:210
    ?maxSize 320:210
    ?fields list(
        ; source
     list( hiCreateStringField(
      ?name 'srcLib
      ?prompt "Library"
      ?defValue ""
      ?callback "ddsUpdateSyncWithForm()"
     )       20:20 260:025 080 )
     list( hiCreateStringField(
      ?name 'srcCell
      ?prompt "Cell"
      ?defValue ""
      ?callback "ddsUpdateSyncWithForm()"
     )      20:50 260:025 080 )
     list( hiCreateStringField(
      ?name 'srcView
      ?prompt "View"
      ?defValue ""
      ?callback "ddsUpdateSyncWithForm()"
     )      20:80 260:025 080 )
     list( hiCreateButton(
      ?name 'srcBrowseBtn
      ?buttonText "Browse..."
      ?callback "ddsSyncWithForm( CSForm 'browse 'srcLib 'srcCell 'srcView )"
     ) 20:120 100:040 )
     ; destination
    ) ; ?fields
   ) ; hiCreateAppForm
  )

  when( hiDisplayForm( CSForm )
   list( CSForm->srcLib->value CSForm->srcCell->value CSForm->srcView->value )
  )

) ; procedure- Hide quoted text -

- Show quoted text -
Thank you very much for your help.
I want to ask how to add a text in an " MLTextField".
I've trayed to do it with the fuction "appel()" but this function
concat all texts in the same line and I want to insert each new text
in a newline.

Best regards
manell15



list( hiCreateMLTextField(
?name 'zone
?prompt "List of cells"
?defValue ""
?editable t
)

(defun appel ()
(let (nextLine)
nextLine=strcat(CSForm->srcLib->value " " CSForm->srcCell->value " "
CSForm->srcView->value )
CSForm~>zone~>value =strcat( nextLine CSForm~>zone~>value )
)
 
Thank you very much for your help.
I want to ask how to add a text in an " MLTextField".
I've trayed to do it with the fuction "appel()" but this function
concat all texts in the same line and I want to insert each new text
in a newline.
why don't you add a newline ("\n") ?
 
Hi
when I concat mt text with "\n", "\n" is considered as a string so I
obtain "text\n"
It is possible to use "\n" to add a new line ? I know that it is
possible with printf but for strcut fuction for example can I use it
to add a new line?

Best regards
Manell15
From the documentation, I see :

The string can contain the C newline character (’\n’) to indicate an advance to the next logical line.

So, yes it should work

CSForm~>zone~>value =strcat( nextLine "\n" CSForm~>zone~>value )


How exactly do you do it ?


Stéphane
 
On Apr 24, 4:57 pm, "S. Badel" <stephane.ba...@REMOVETHISepfl.ch>
wrote:
Thank you very much for your help.
I want to ask how to add a text in an " MLTextField".
I've trayed to do it with the fuction "appel()" but this function
concat all texts in the same line and  I want to insert each new text
in a newline.

why don't you add a newline ("\n") ?
Hi
when I concat mt text with "\n", "\n" is considered as a string so I
obtain "text\n"
It is possible to use "\n" to add a new line ? I know that it is
possible with printf but for strcut fuction for example can I use it
to add a new line?

Best regards
Manell15
 
Hi !

I'm not actually sure I've understand the question but a quick test on
my side gave a pretty good interpretation of the \n
This is what I've run on my box :
procedure( rkCreateMLTextForm()
let((myInitString myNewString)
myString="Here we go !!"
myNewString="Here we go Again !!"
sprintf(myInitString "%s\n%s\n%s\n%s ..." myString myString
myString myString)
myMLText = hiCreateMLTextField(
?name 'myMLText
?prompt "Type in Text"
?value myInitString
)
myForm = hiCreateAppForm(
?name 'myForm
?formTitle "Muti Line text Form Sample"
?fields list( list(myMLText 0:0 600:200 120))
)
myMLText~>value = strcat(myMLText~>value "\n" myNewString "\n\n"
myNewString)
hiDisplayForm(myForm)
)
)

Hope it helps !

Riad.
 
On Apr 24, 9:06 pm, Riad KACED <riad.ka...@gmail.com> wrote:
Hi !

I'm not actually sure I've understand the question but a quick test on
my side gave a pretty good interpretation of the \n
This is what I've run on my box :
procedure( rkCreateMLTextForm()
   let((myInitString myNewString)
      myString="Here we go !!"
      myNewString="Here we go Again !!"
      sprintf(myInitString "%s\n%s\n%s\n%s ..." myString myString
myString myString)
       myMLText = hiCreateMLTextField(
          ?name 'myMLText
          ?prompt "Type in Text"
          ?value myInitString
       )
       myForm = hiCreateAppForm(
          ?name 'myForm
          ?formTitle "Muti Line text Form Sample"
          ?fields list( list(myMLText 0:0 600:200 120))
       )
     myMLText~>value = strcat(myMLText~>value "\n" myNewString "\n\n"
myNewString)
     hiDisplayForm(myForm)
   )
)

Hope it helps !

Riad.
Hi all

Thank you very much for your help
I've tryed it and it works now

Best Regard
manell15
 

Welcome to EDABoard.com

Sponsor

Back
Top