home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / cad / cadence / 571 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.0 KB  |  63 lines

  1. Newsgroups: comp.cad.cadence
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!netcom.com!green
  3. From: green@netcom.com (David Greenstein)
  4. Subject: Re: getting all cellviews
  5. Message-ID: <1993Jan12.215511.19994@netcom.com>
  6. Keywords: opus, cells, library, skill
  7. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  8. References: <1993Jan12.172646.14372@venus.ic.cmc.ca>
  9. Date: Tue, 12 Jan 1993 21:55:11 GMT
  10. Lines: 51
  11.  
  12. >
  13. >In Cadence 4.2 skill, how might one go about
  14. >getting a list of all cells in a library?
  15. >
  16.  
  17. Here is a quick solution.  I have not tried this on Opus yet, so please
  18. send me e-mail if you have any problems.
  19.  
  20. Regards,
  21. David
  22.  
  23. ;*****************************************************************************
  24. ;
  25. procedure( showCells( libName fileName "t" )
  26. ;
  27. ; showCells() takes as input a library name and file name, then outputs
  28. ; the names of all cells for that library into the file.
  29. ;
  30. ; Inputs:
  31. ;   libName = library name (text, library must be on path)
  32. ;   fileName = output file name (text, directory must be writable)
  33. ;
  34. ; Returns:
  35. ;   t if file contains cell names.
  36. ;   nil if error.
  37. ;*****************************************************************************
  38.     prog( ( i libId ofile )
  39.     unless( (ofile = outfile( fileName ))
  40.         error( strcat("Cannot open file " fileName))
  41.         return(nil)
  42.     ) ; unless
  43.     unless( (libId = dmFindLib( libName ))
  44.         error( strcat("Cannot open library " libName))
  45.         return(nil)
  46.     ) ; unless
  47.     foreach( i libId~>cells
  48.         fprintf( ofile "%s\n" i~>cellName )
  49.     ) ; foreach
  50.     close( ofile )
  51.     return( t )
  52.     ) ; prog
  53. ) ; procedure showCells
  54.  
  55. -- 
  56. *******************************************************************************
  57.     _/_/_/   _/_/_/_/    David Greenstein        A |\  Y
  58.    _/   _/  _/        Independent Consultant        --| o--
  59.   _/   _/  _/  _/_/    EDA Software Specialist          |/
  60.  _/   _/  _/    _/    green@netcom.com        INV(Y,A)
  61. _/_/_/   _/_/_/_/    Phone: (408)261-0287    (cell inv (view symbol ... ))
  62. -------------------------------------------------------------------------------
  63.