Home > Community > Forums > Custom IC SKILL > How to write skill to change library access permissions

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

 How to write skill to change library access permissions 

Last post Wed, Jun 16 2010 2:32 AM by Vijay Srinivas. 6 replies.
Started by Vijay Srinivas 11 Jun 2010 09:34 AM. Topic has 6 replies and 2285 views
Page 1 of 1 (7 items)
Sort Posts:
  • Fri, Jun 11 2010 9:34 AM

    How to write skill to change library access permissions Reply

    Hi All,

     

    I am trying to write a skill code to change the access permissions of a specific library. e.g I want to change the library "Test" to read only for all and then I want to change the access back to read/write for all.

     

    Thanks,

    Vijay

     

     

    • Post Points: 20
  • Fri, Jun 11 2010 6:28 PM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,069
    • Points 16,275
    Re: How to write skill to change library access permissions Reply

    Hi Vijay

    I cannot find any public design management SKILL API to do this so I guess you would have to use something similar to the following:

    procedure( CCSchangeLibMode(myLib mode)
       let( (libId)
          libId=ddGetObj(myLib)
          sprintf(cmd "chmod %n %s" mode myLib~>readPath)
          system(cmd)
          printf("Changed permission of lib %s to %n\n" myLib mode)
       ) ;let
    ) ;procedure

    === Owner read/write/execute ===
    CCSchangeLibMode("test" 755)

    === Owner read/execute ===
    CCSchangeLibMode("test" 555)


    Best regards
    Quek

    • Post Points: 35
  • Fri, Jun 11 2010 6:40 PM

    Re: How to write skill to change library access permissions Reply
    Hi Quek,
    Thank you for your quick response. I was thinking of writing a shell script for that purpose, but I was thinking about it and came up with a better idea:

    My idea is to specify a cellname and change the permissions of all cellview under the cell name hierarchically. I am new to SKILL, I am not sure how to get the list of cells in the hierarchy if I provide the parent cell name.

    Could you please point me in the right direction?

    Thanks,
    Vijay
    • Post Points: 20
  • Sat, Jun 12 2010 4:48 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,069
    • Points 16,275
    Re: How to write skill to change library access permissions Reply

    Hi Vijay

    You can use the following script. Save it as "getcells.il" in the working directory and load it in ciw using:

    load "getcells.il"

    Open your top level layout and enter the following in ciw:

    CCSallCells()

    The names of all subcells will be returned as a list.

    Best regards
    Quek


    procedure( CCSgetCells(cv cellList)
       foreach( master cv~>instances~>master
          let( (nextCv)
             nextCv=master
             cond(
                (!nextCv nil)
                (member(nextCv cellList) nil)
                (t cellList=CCSgetCells(nextCv cons(nextCv cellList)))
             ) ;cond
          ) ;let
       ) ;foreach
       cellList
    ) ;procedure


    procedure( CCSallCells()
       let( (cellList)
          cellList=CCSgetCells(geGetWindowCellView() list())
          cellList~>cellName
       ) ;let
    ) ;procedure

    • Post Points: 5
  • Sat, Jun 12 2010 4:53 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,069
    • Points 16,275
    Re: How to write skill to change library access permissions Reply

    Hi Vijay

    If you want to use the script by providing a top cell name, you can use this:

    procedure( CCSallCells(myLib myCell myView)
       let( (cellList cv)
          cv=dbOpenCellViewByType(myLib myCell myView)
          cellList=CCSgetCells(cv list())
          cellList~>cellName
       ) ;let
    ) ;procedure

    Sample cmd:
    CCSallCells("abcLib" "myTopCell" "layout")


    Best regards
    Quek

    • Post Points: 20
  • Mon, Jun 14 2010 2:47 PM

    Re: How to write skill to change library access permissions Reply

    Hi Quek,

     

    It works great. Thanks a lot!!

     

    Thanks,

    Vijay

    • Post Points: 5
  • Wed, Jun 16 2010 2:32 AM

    RE: How to write skill to change library access permissions Reply
    Hi Quek,

    Thank you for your quick response. I was thinking of writing a shell script for that purpose, but I was thinking about it and came up with a better idea:

    My idea is to specify a cellname and change the permissions of all cellview under the cell name hierarchically.

    I am new to SKILL, I am not sure how to get the list of cells in the hierarchy if I provide the parent cell name. Could you please point me in the right direction?

    Thanks,

    Vijay
    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by Vijay Srinivas at 11 Jun 2010 09:34 AM. Topic has 6 replies.