AnsweredAssumed Answered

Library Automation: Problem with PartsEditorDlg (ErrorCode: H80040239)

Question asked by jens.radeloff on Nov 1, 2012
Latest reply on Nov 5, 2012 by jens.radeloff

Hi,

 

I'm just trying to automate readout and analysis of our CentralLibrary. In order to do this I've written a dotnet application. The application based on differnet vbscript source code examples.

 

Here the code:

Private Shared LibPathName As String
Private Shared ObjPartEditorDlg As New MGCPCBPartsEditor.PartsEditorDlg
Private Shared ObjPartLibrary As MGCPCBPartsEditor.PartsDB


Public Shared Function OpenMentorCentralLibPartEditor() As Boolean

     Try
          '---open CentralLib with Part Editor

          LibPathName = <Path to MentorCentralLib>

         ObjPartLibrary = ObjPartEditorDlg.OpenDatabaseEx(sFileName:=LibPathName, bReadOnly:=TRUE)

         

          OpenMentorCentralLibPartEditor = True

    

     Catch ex As Exception
          OpenMentorCentralLibPartEditor = False
     End Try
End Function

 

When running the result is an exception at codeline: "ObjPartLibrary = ObjPartEditorDlg.OpenDatabaseEx(sFileName:=LibPathName, bReadOnly:=TRUE)".

The exception tells me: (0x80040239): The Central Library is incorrect or not migrated

 

Then I'm doing the same with the CellEditorDlg the code works fine!!!

Here the code:

Private Shared LibPathName As String

Private Shared ObjCellEditorDlg As New CellEditorAddinLib.CellEditorDlg

Private Shared ObjCellLibrary As Object

 

Public Shared Function OpenMentorCentralLibCellEditor() As Boolean

     Try

           '---Open CentralLib with Cell Editor

           LibPathName = <Path to MentorCentralLib>

           ObjCellLibrary = ObjCellEditorDlg.OpenDatabase(LibPathName, True)

 

          OpenMentorCentralLibCellEditor = True

 

      Catch ex As Exception

          OpenMentorCentralLibCellEditor = False

      End Try

End Function

 

Thinks I tried:

- working with a vbscript (with the well known CreateObject-Methode) --> same failure

- Path to a Expedition PartDB.pdb instead of the CentralLib.lmc --> same failure

 

Has anyone an idea??

 

Thanks for help!!!

Jens

Outcomes