Creating a new category in a giving library

Discussion in 'Cadence' started by nour, Oct 28, 2008.

  1. nour

    nour Guest

    Hi, please how can I create e new category in one giving library?
    I've tried the following:

    libId=ddGetObj("libName")
    ddCatOpen(libId "newCat" "a")

    But it doesn't work...
     
    nour, Oct 28, 2008
    #1
  2. nour

    Riad KACED Guest

    Salam Nour,

    My understanding is If you create a category using skill without
    adding anything into it, then it wouldn't get physically created I'm
    afraid. In other words, it wouldn't be added into the lib.TopCat file.
    I honestly don't know why, my guess is my be to optimize the database
    and avoid useless empty things hanging around. Other chaps my have the
    'true' right explanation.
    My advice is to create the category, add a cell into it, save it and
    then close it. There is an example :
    ;
    myCat = ddCatOpen(ddGetObj("rkWorkLib") "rkCatForNour" "a")
    ddCatAddItem(myCat "rcFilter" "cell")
    ddCatSave(myCat)
    ddCatClose(myCat)
    ;

    You can use : ddCatGetLibCats(ddGetObj("rkWorkLib")) if you want to
    check ...
    Let me know if this works for you.

    Regards,
    Riad.
     
    Riad KACED, Oct 29, 2008
    #2
  3. Riad KACED wrote, on 10/29/08 17:46:
    Riad's right. Categories get purged if there's nothing in them any more. So if
    you create one without adding anything in it, it also gets purged...

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 2, 2008
    #3
  4. nour

    Riad KACED Guest

    Hi Andrew,

    There is one confusing bit though. When you hand-create the category
    from the libManager, it gets created even though it remains empty. It
    does not get purged; the 'category.Cat' file is created. Any comments
    about this ?

    Regards,
    Riad.
     
    Riad KACED, Nov 2, 2008
    #4
  5. Riad KACED wrote, on 11/02/08 22:33:
    Hi Riad,

    Sorry for the rather late reply - I've been busy trying to catch up on the news
    group having been tied up for a while.

    Anyway, if you look at the SKILL function ddCatOpenEx(), you'll see it has a
    fourth argument to control whether it will preserve empty categories or not.
    ddCatOpen() does not have this option, and is equivalent to not preserving empty
    categories.

    The library manager uses the mode to preserve empty categories.

    Regards,

    Andrew.
     
    Andrew Beckett, Jan 1, 2009
    #5
  6. nour

    Riad KACED Guest

    No worries Andrew, better late than never :)
    I was busy with other things anyway, mainly distracted by the end of
    year tapeouts and other objectives ...

    Thanks for your enlightening indeed.
    Riad.
     
    Riad KACED, Jan 5, 2009
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.