Ejemplo n.º 1
0
def OpenLibrary(libname):
    ns=openaccess22.oaNativeNS()
    slibname=openaccess22.oaScalarName(ns,libname)

    # set mode to apped
    oas=openaccess22.oaString("lib.defs")
    liblist=openaccess22.oaLibDefList.static_get(oas,'r')

    found=0
    # We only check top level members for the entry
    for libdefmem in liblist.getMembersIter():
      if (libdefmem.getType().oaTypeEnum()!=openaccess22.oacLibDefType): continue
      sname=openaccess22.oaScalarName()
      libdefmem.getLibName(sname)
      sname.get(ns,oas)
      name=str(oas)
      if (name==libname):
        ostr=openaccess22.oaString()
        libdefmem.getLibPath(ostr)
        libpath=str(ostr)
        found=1
        break
    liblist.destroy()
    if (not found):
      return None
     
    lib=openaccess22.oaLib.static_find(slibname)
    if (not lib):
      lib=openaccess22.oaLib.static_open(slibname,libpath)
    access=openaccess22.oaLibAccessLevelEnum(openaccess22.oacReadLibAccessLevel)
    access=openaccess22.oaLibAccess(access)
    lib.getAccess(access)
    return lib
Ejemplo n.º 2
0
    def PickView(self, *v):
        if self.mInPickLibrary:
            return
        if self.mInPickCell:
            return
        ns = openaccess22.oaNativeNS()
        libtext = self.mLibrary.get()
        libName = openaccess22.oaScalarName(ns, libtext)
        lib = OpenLibrary(libtext)
        if lib == None:
            return
        cellName = openaccess22.oaScalarName(ns, self.mCell.get())
        cell = openaccess22.oaCell.static_find(lib, cellName)
        if cell == None:
            return
        viewName = openaccess22.oaScalarName(ns, self.mView.get())
        design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
        if design == None:
            return

        self.mInView = 1
        self.EmptyModule()
        self.mModuleNames.append(" -Design-")
        self.mModuleNames.append(" -TopBlock-")
        self.mModuleNames.append(" -TopModule-")
        self.mModuleNames.append(" -TopOccurrence-")
        s = openaccess22.oaString()
        for mod in design.getModulesIter():
            mod.getName(ns, s)
            self.mModuleNames.append(str(s))
        self.mModule.setvalues(self.mModuleNames)
        design.close()
        self.mInView = 0
Ejemplo n.º 3
0
 def AllObjects(self):
   l=[]
   ns=openaccess22.oaNativeNS()
   s=openaccess22.oaString()
   for obj in self.mDesign.getNetsIter(openaccess22.oacNetIterAll):
     l.append(obj)
   return l
Ejemplo n.º 4
0
 def PickView(self,*v):
   if (self.mInPickLibrary): return
   if (self.mInPickCell): return
   ns=openaccess22.oaNativeNS()
   libtext=self.mLibrary.get()
   libName=openaccess22.oaScalarName(ns,libtext)
   lib=OpenLibrary(libtext)
   if (lib==None): return
   cellName=openaccess22.oaScalarName(ns,self.mCell.get())
   cell=openaccess22.oaCell.static_find(lib,cellName)
   if (cell==None): return
   viewName=openaccess22.oaScalarName(ns,self.mView.get())
   design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
   if (design==None):
     return
   
   self.mInView=1 
   self.EmptyModule()
   self.mModuleNames.append(' -Design-')
   self.mModuleNames.append(' -TopBlock-')
   self.mModuleNames.append(' -TopModule-')
   self.mModuleNames.append(' -TopOccurrence-')
   s=openaccess22.oaString()
   for mod in design.getModulesIter():
     mod.getName(ns,s)
     self.mModuleNames.append(str(s))
   self.mModule.setvalues(self.mModuleNames)
   design.close()
   self.mInView=0
Ejemplo n.º 5
0
 def AllObjects(self):
     l = []
     ns = openaccess22.oaNativeNS()
     s = openaccess22.oaString()
     for obj in self.mDesign.getNetsIter(openaccess22.oacNetIterAll):
         l.append(obj)
     return l
Ejemplo n.º 6
0
 def OpenDesign(self, data):
     ns = openaccess22.oaNativeNS()
     try:
         self.mData = None
         lib = OpenLibrary(data[0])
         libName = openaccess22.oaScalarName(ns, data[0])
         cellName = openaccess22.oaScalarName(ns, data[1])
         viewName = openaccess22.oaScalarName(ns, data[2])
         design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
         if design:
             if data[3] == " -Design-":
                 self.mDesign = design
             elif data[3] == " -TopBlock-":
                 self.mDesign = design.getTopBlock()
             elif data[3] == " -TopModule-":
                 self.mDesign = design.getTopModule()
             elif data[3] == " -TopOccurrence-":
                 self.mDesign = design.getTopOccurrence()
             else:
                 modName = openaccess22.oaScalarName(ns, data[3])
                 self.mDesign = openaccess22.oaModule.static_find(design, modName)
             # self.mCloseFun=design.close
         self.mData = self.mDesign
     except:
         traceback.print_exc()
Ejemplo n.º 7
0
def OpenLibrary(libname):
    ns = openaccess22.oaNativeNS()
    slibname = openaccess22.oaScalarName(ns, libname)

    # set mode to apped
    oas = openaccess22.oaString("lib.defs")
    liblist = openaccess22.oaLibDefList.static_get(oas, "r")

    found = 0
    # We only check top level members for the entry
    for libdefmem in liblist.getMembersIter():
        if libdefmem.getType().oaTypeEnum() != openaccess22.oacLibDefType:
            continue
        sname = openaccess22.oaScalarName()
        libdefmem.getLibName(sname)
        sname.get(ns, oas)
        name = str(oas)
        if name == libname:
            ostr = openaccess22.oaString()
            libdefmem.getLibPath(ostr)
            libpath = str(ostr)
            found = 1
            break
    liblist.destroy()
    if not found:
        return None

    lib = openaccess22.oaLib.static_find(slibname)
    if not lib:
        lib = openaccess22.oaLib.static_open(slibname, libpath)
    access = openaccess22.oaLibAccessLevelEnum(openaccess22.oacReadLibAccessLevel)
    access = openaccess22.oaLibAccess(access)
    lib.getAccess(access)
    return lib
Ejemplo n.º 8
0
 def OpenDesign(self,data):
   ns=openaccess22.oaNativeNS()
   try:
     self.mData=None
     lib=OpenLibrary(data[0])
     libName=openaccess22.oaScalarName(ns,data[0])
     cellName=openaccess22.oaScalarName(ns,data[1])
     viewName=openaccess22.oaScalarName(ns,data[2])
     design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
     if (design):
       if (data[3]==' -Design-'):  
         self.mDesign=design
       elif (data[3]==' -TopBlock-'):  
         self.mDesign=design.getTopBlock()
       elif (data[3]==' -TopModule-'):  
         self.mDesign=design.getTopModule()
       elif (data[3]==' -TopOccurrence-'):  
         self.mDesign=design.getTopOccurrence()
       else:
         modName=openaccess22.oaScalarName(ns,data[3])
         self.mDesign=openaccess22.oaModule.static_find(design,modName)
       #self.mCloseFun=design.close
     self.mData=self.mDesign
   except:
     traceback.print_exc()
Ejemplo n.º 9
0
 def PickCell(self, *v):
     if self.mInPickLibrary:
         return
     ns = openaccess22.oaNativeNS()
     try:
         s = self.mLibrary.get()
     except:
         return
     lib = OpenLibrary(s)
     if lib == None:
         return
     try:
         s = openaccess22.oaScalarName(ns, self.mCell.get())
     except:
         return
     cell = openaccess22.oaCell.static_find(lib, s)
     if cell == None:
         return
     self.mInPickCell = 1
     self.EmptyView()
     s = openaccess22.oaString()
     for cv in cell.getCellViewsIter():
         view = cv.getView()
         view.getName(ns, s)
         self.mViewNames.append(str(s))
     self.mView.setvalues(self.mViewNames)
     self.mInPickCell = 0
Ejemplo n.º 10
0
 def ObjectName(self,obj):
   ns=openaccess22.oaNativeNS()
   s=openaccess22.oaString()
   if (obj.isOccObject()):
     obj.getPathName(ns,s)
   else:
     obj.getName(ns,s)
   return str(s)
Ejemplo n.º 11
0
 def ObjectName(self, obj):
     ns = openaccess22.oaNativeNS()
     s = openaccess22.oaString()
     if (obj.isOccObject()):
         obj.getPathName(ns, s)
     else:
         obj.getName(ns, s)
     return str(s)
Ejemplo n.º 12
0
 def trace_module_list(self, cmd, names):
     data = self.validate(cmd, names)
     if len(data) == 1:
         ns = openaccess22.oaNativeNS()
         modName = openaccess22.oaScalarName(ns, data[0])
         module = openaccess22.oaModule.static_find(self.mDesign.getDesign(), modName)
         if module:
             self.mDesign = module
             if self.mFirstObj == None:
                 self.mFirstObj = self.mDesign
Ejemplo n.º 13
0
 def FindObject(self,name):
   ns=openaccess22.oaNativeNS()
   name=openaccess22.oaName(ns,name)
   typname=self.mDesign.getType().oaTypeEnum()
   if (typname==openaccess22.oacBlockType):
     return oaNet.static_find(self.mDesign,name)
   if (typname==openaccess22.oacModuleType):
     return oaModNet.static_find(self.mDesign,name)
   if (typname==openaccess22.oacOccurrenceType):
     return oaOccNet.static_find(self.mDesign.getTopOccurrence(),name)
   return None
Ejemplo n.º 14
0
 def FindObject(self, name):
     ns = openaccess22.oaNativeNS()
     name = openaccess22.oaName(ns, name)
     typname = self.mDesign.getType().oaTypeEnum()
     if (typname == openaccess22.oacBlockType):
         return oaNet.static_find(self.mDesign, name)
     if (typname == openaccess22.oacModuleType):
         return oaModNet.static_find(self.mDesign, name)
     if (typname == openaccess22.oacOccurrenceType):
         return oaOccNet.static_find(self.mDesign.getTopOccurrence(), name)
     return None
Ejemplo n.º 15
0
def getInstCellviewNames(inst):
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  l=[]
  inst.getLibName(ns,s)
  l.append(str(s))
  inst.getCellName(ns,s)
  l.append(str(s))
  inst.getViewName(ns,s)
  l.append(str(s))
  return l
Ejemplo n.º 16
0
 def trace_occ_list(self, cmd, names):
     data = self.validate(cmd, names)
     if len(data) == 1:
         ns = openaccess22.oaNativeNS()
         name = openaccess22.oaSimpleName(ns, data[0])
         inst = openaccess22.oaOccInst.static_find(self.mDesign.getTopOccurrence(), name)
         if inst:
             occ = inst.getMasterOccurrence()
             if occ:
                 self.mDesign = occ
                 if self.mFirstObj == None:
                     self.mFirstObj = self.mDesign
Ejemplo n.º 17
0
 def trace_topocc_list(self, cmd, names):
     data = self.validate(cmd, names)
     if len(data) == 3:
         ns = openaccess22.oaNativeNS()
         libName = openaccess22.oaScalarName(ns, data[0])
         cellName = openaccess22.oaScalarName(ns, data[1])
         viewName = openaccess22.oaScalarName(ns, data[2])
         design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
         if design:
             self.mDesign = design.getTopOccurrence()
             if self.mFirstObj == None:
                 self.mFirstObj = self.mDesign
Ejemplo n.º 18
0
def getCellviewNames(design):
  design=design.getDesign()
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  l=[]
  design.getLibName(ns,s)
  l.append(str(s))
  design.getCellName(ns,s)
  l.append(str(s))
  design.getViewName(ns,s)
  l.append(str(s))
  return l
Ejemplo n.º 19
0
def getModuleNames(module):
  design=module.getDesign()
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  l=[]
  design.getLibName(ns,s)
  l.append(str(s))
  design.getCellName(ns,s)
  l.append(str(s))
  design.getViewName(ns,s)
  l.append(str(s))
  module.getName(ns,s)
  l.append(str(s))
  return l
Ejemplo n.º 20
0
 def trace_designmodule_list(self, cmd, names):
     data = self.validate(cmd, names)
     if len(data) == 4:
         ns = openaccess22.oaNativeNS()
         libName = openaccess22.oaScalarName(ns, data[0])
         cellName = openaccess22.oaScalarName(ns, data[1])
         viewName = openaccess22.oaScalarName(ns, data[2])
         modName = openaccess22.oaScalarName(ns, data[3])
         design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
         if design:
             module = openaccess22.oaModule.static_find(design, modName)
             if module:
                 self.mDesign = module
                 if self.mFirstObj == None:
                     self.mFirstObj = self.mDesign
Ejemplo n.º 21
0
 def PickLibrary(self,*v):
   ns=openaccess22.oaNativeNS()
   try:
     s=self.mLibrary.get()
   except:
     return
   lib=OpenLibrary(s)
   if (lib==None): return
   self.mInPickLibrary=1
   self.EmptyCell()
   s=openaccess22.oaString()
   for cell in lib.getCellsIter():
     cell.getName(ns,s)
     self.mCellNames.append(str(s))
   self.mCell.setvalues(self.mCellNames)
   self.mInPickLibrary=0
Ejemplo n.º 22
0
 def PickLibrary(self, *v):
     ns = openaccess22.oaNativeNS()
     try:
         s = self.mLibrary.get()
     except:
         return
     lib = OpenLibrary(s)
     if lib == None:
         return
     self.mInPickLibrary = 1
     self.EmptyCell()
     s = openaccess22.oaString()
     for cell in lib.getCellsIter():
         cell.getName(ns, s)
         self.mCellNames.append(str(s))
     self.mCell.setvalues(self.mCellNames)
     self.mInPickLibrary = 0
Ejemplo n.º 23
0
def GetLibraryList():
    ns=openaccess22.oaNativeNS()

    # set mode to apped
    oas=openaccess22.oaString("lib.defs")
    liblist=openaccess22.oaLibDefList.static_get(oas,'r')

    result=[]
    # We only check top level members for the entry
    for libdefmem in liblist.getMembersIter():
      if (libdefmem.getType().oaTypeEnum()!=openaccess22.oacLibDefType): continue
      sname=openaccess22.oaScalarName()
      libdefmem.getLibName(sname)
      sname.get(ns,oas)
      name=str(oas)
      result.append(name)
    return result
Ejemplo n.º 24
0
def getDesObjectRepr(obj):
  if (obj.isBlockObject()):
    s='oaBlock: %s'%getCellviewFullname(obj)
  elif (obj.isModObject()):
    s='oaModule: %s'%getModuleFullname(obj)
  elif (obj.isOccObject()):
    s='oaOccurrence: %s '%getCellviewFullname(obj)
    oinst=obj.getOccInst()
    if (oinst):
      ss=openaccess22.oaString()
      ns=openaccess22.oaNativeNS()
      oinst.getPathName(ns,ss)
      s+=str(ss)
    else:
      s+='.'
  else:
    s=str(obj)
  return s  
Ejemplo n.º 25
0
def GetLibraryList():
    ns = openaccess22.oaNativeNS()

    # set mode to apped
    oas = openaccess22.oaString("lib.defs")
    liblist = openaccess22.oaLibDefList.static_get(oas, "r")

    result = []
    # We only check top level members for the entry
    for libdefmem in liblist.getMembersIter():
        if libdefmem.getType().oaTypeEnum() != openaccess22.oacLibDefType:
            continue
        sname = openaccess22.oaScalarName()
        libdefmem.getLibName(sname)
        sname.get(ns, oas)
        name = str(oas)
        result.append(name)
    return result
Ejemplo n.º 26
0
    def __init__(self, design, empty=0):
        self.mDir = 2
        self.mMaxDepth = 0
        self.mReport = []
        self.mDesign = design
        self.mNS = openaccess22.oaNativeNS()
        self.mFirstObj = None

        mode = "a"
        if empty:
            mode = "w"
        self.mFp = None
        filename = "oaTracer.log"
        if filename:
            try:
                self.mFp = open(filename, mode)
                # print "[Open tracer.log]"
            except:
                pass
Ejemplo n.º 27
0
 def PickCell(self,*v):
   if (self.mInPickLibrary): return
   ns=openaccess22.oaNativeNS()
   try:
     s=self.mLibrary.get()
   except:
     return
   lib=OpenLibrary(s)
   if (lib==None): return
   try:
     s=openaccess22.oaScalarName(ns,self.mCell.get())
   except:
     return
   cell=openaccess22.oaCell.static_find(lib,s)
   if (cell==None): return
   self.mInPickCell=1
   self.EmptyView()
   s=openaccess22.oaString()
   for cv in cell.getCellViewsIter():
     view=cv.getView()
     view.getName(ns,s)
     self.mViewNames.append(str(s))
   self.mView.setvalues(self.mViewNames)
   self.mInPickCell=0
Ejemplo n.º 28
0
def getCellviewName(design):
  design=design.getDesign()
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  design.getCellName(ns,s)
  return str(s)
Ejemplo n.º 29
0
def getOccInstOccFullname(inst):
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  inst.getPathName(ns,s)
  return str(s)
Ejemplo n.º 30
0
def getInstModuleFullname(inst):
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  inst.getMaster().getName(ns,s)
  return str(s)
Ejemplo n.º 31
0
  def ProcessStdArgs(self):
    if (len(self.mArgs)<1): 
       return None

    if (self.mArgs[0]=='-topblock'):
      if (len(self.mArgs)<4):
          print "topblock requires: -topblock libName cellName viewName"
          return (data,commands)
      ns=openaccess22.oaNativeNS()
      try:
        lib=OpenLibrary(self.mArgs[1])
        libName=openaccess22.oaScalarName(ns,self.mArgs[1])
        cellName=openaccess22.oaScalarName(ns,self.mArgs[2])
        viewName=openaccess22.oaScalarName(ns,self.mArgs[3])
        design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        if (design!=None):
          #self.mCloseFun=design.close
          self.mDesign=design.getTopBlock()
          self.mData=self.mDesign
        return 1
      except:
        traceback.print_exc()

    if (self.mArgs[0]=='-topmodule'):
      if (len(self.mArgs)<4):
          print "topmodule requires: -topmodule libName cellName viewName"
          return (data,commands)
      ns=openaccess22.oaNativeNS()
      try:
        lib=OpenLibrary(self.mArgs[1])
        libName=openaccess22.oaScalarName(ns,self.mArgs[1])
        cellName=openaccess22.oaScalarName(ns,self.mArgs[2])
        viewName=openaccess22.oaScalarName(ns,self.mArgs[3])
        self.mDesign=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        if (design!=None):
          #self.mCloseFun=design.close
          self.mDesign=self.mDesign.getTopModule()
          self.mData=self.mDesign
        return 1
      except:
        traceback.print_exc()

    if (self.mArgs[0]=='-topocc'):
      if (len(self.mArgs)<4):
          print "topocc requires: -topocc libName cellName viewName"
          return (data,commands)
      ns=openaccess22.oaNativeNS()
      try:
        lib=OpenLibrary(self.mArgs[1])
        libName=openaccess22.oaScalarName(ns,self.mArgs[1])
        cellName=openaccess22.oaScalarName(ns,self.mArgs[2])
        viewName=openaccess22.oaScalarName(ns,self.mArgs[3])
        self.mDesign=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        if (design!=None):
          #self.mCloseFun=design.close
          self.mDesign=self.mDesign.getTopOccurrence()
          self.mData=self.mDesign
        return 1
      except:
        traceback.print_exc()

    if (self.mArgs[0]=='-module'):
      if (len(self.mArgs)<5):
          print "module requires: -module libName cellName viewName modName"
          return (data,commands)
      ns=openaccess22.oaNativeNS()
      try:
        self.mData=None
        lib=OpenLibrary(self.mArgs[1])
        libName=openaccess22.oaScalarName(ns,self.mArgs[1])
        cellName=openaccess22.oaScalarName(ns,self.mArgs[2])
        viewName=openaccess22.oaScalarName(ns,self.mArgs[3])
        modName=openaccess22.oaScalarName(ns,self.mArgs[4])
        design=openaccess22.oaDesign.static_open(libName,cellName,viewName,'r')
        if (design!=None):
          module=openaccess22.oaModule.static_find(design,modName)
          if (module):
            #self.mCloseFun=design.close
            self.mDesign=module
            self.mData=self.mDesign
        return 1
      except:
        traceback.print_exc()

    elif (self.mArgs[0]=="-pick"):
      self.mPickMode=1
      return 1
      
    return None
Ejemplo n.º 32
0
def getInstCellviewName(inst):
  s=openaccess22.oaString()
  ns=openaccess22.oaNativeNS()
  inst.getCellName(ns,s)
  return str(s)
Ejemplo n.º 33
0
    def ProcessStdArgs(self):
        if len(self.mArgs) < 1:
            return None

        if self.mArgs[0] == "-topblock":
            if len(self.mArgs) < 4:
                print "topblock requires: -topblock libName cellName viewName"
                return (data, commands)
            ns = openaccess22.oaNativeNS()
            try:
                lib = OpenLibrary(self.mArgs[1])
                libName = openaccess22.oaScalarName(ns, self.mArgs[1])
                cellName = openaccess22.oaScalarName(ns, self.mArgs[2])
                viewName = openaccess22.oaScalarName(ns, self.mArgs[3])
                design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                if design != None:
                    # self.mCloseFun=design.close
                    self.mDesign = design.getTopBlock()
                    self.mData = self.mDesign
                return 1
            except:
                traceback.print_exc()

        if self.mArgs[0] == "-topmodule":
            if len(self.mArgs) < 4:
                print "topmodule requires: -topmodule libName cellName viewName"
                return (data, commands)
            ns = openaccess22.oaNativeNS()
            try:
                lib = OpenLibrary(self.mArgs[1])
                libName = openaccess22.oaScalarName(ns, self.mArgs[1])
                cellName = openaccess22.oaScalarName(ns, self.mArgs[2])
                viewName = openaccess22.oaScalarName(ns, self.mArgs[3])
                self.mDesign = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                if design != None:
                    # self.mCloseFun=design.close
                    self.mDesign = self.mDesign.getTopModule()
                    self.mData = self.mDesign
                return 1
            except:
                traceback.print_exc()

        if self.mArgs[0] == "-topocc":
            if len(self.mArgs) < 4:
                print "topocc requires: -topocc libName cellName viewName"
                return (data, commands)
            ns = openaccess22.oaNativeNS()
            try:
                lib = OpenLibrary(self.mArgs[1])
                libName = openaccess22.oaScalarName(ns, self.mArgs[1])
                cellName = openaccess22.oaScalarName(ns, self.mArgs[2])
                viewName = openaccess22.oaScalarName(ns, self.mArgs[3])
                self.mDesign = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                if design != None:
                    # self.mCloseFun=design.close
                    self.mDesign = self.mDesign.getTopOccurrence()
                    self.mData = self.mDesign
                return 1
            except:
                traceback.print_exc()

        if self.mArgs[0] == "-module":
            if len(self.mArgs) < 5:
                print "module requires: -module libName cellName viewName modName"
                return (data, commands)
            ns = openaccess22.oaNativeNS()
            try:
                self.mData = None
                lib = OpenLibrary(self.mArgs[1])
                libName = openaccess22.oaScalarName(ns, self.mArgs[1])
                cellName = openaccess22.oaScalarName(ns, self.mArgs[2])
                viewName = openaccess22.oaScalarName(ns, self.mArgs[3])
                modName = openaccess22.oaScalarName(ns, self.mArgs[4])
                design = openaccess22.oaDesign.static_open(libName, cellName, viewName, "r")
                if design != None:
                    module = openaccess22.oaModule.static_find(design, modName)
                    if module:
                        # self.mCloseFun=design.close
                        self.mDesign = module
                        self.mData = self.mDesign
                return 1
            except:
                traceback.print_exc()

        elif self.mArgs[0] == "-pick":
            self.mPickMode = 1
            return 1

        return None
Ejemplo n.º 34
0
 def ObjectName(self,obj):
   ns=openaccess22.oaNativeNS()
   s=openaccess22.oaString()
   obj.getName(ns,s)
   return str(s)