4 Replies Latest reply on Jul 12, 2016 4:30 AM by christopher.branch

    Library Manager Exit or Quit issue

    tehte

      In Library Manager application startup script below, I realize that Library Manager Task ID application still exist even I already quit Library Manager application. I used the same startup script below for DxDesigner and Expedition applications. Both applications quit or exit completely without Task ID in Windows Task Manager. Is this a bug of Exit functionality in Library Manager? Any workaround you can advise to kill Library Manager application in Windows Task Manager?

       

      Option Explicit

      Scripting.DontExit = True

      Scripting.Globals.Data("ApplicationStartup") = ScriptEngine

        • 1. Re: Library Manager Exit or Quit issue
          Satoru

          Hi,

           

          This issue is known from before.

          This issue is fixed by VX.1.

          dts0100617695

           

          Please try an attached script, if you are using EE7.9.4 or EE7.9.5.

           

          Regards,

          Satoru

          1 of 2 people found this helpful
          • 2. Re: Library Manager Exit or Quit issue
            tehte

            Hi Satoro,

             

            Yes, I am using EE7.9.4. Unfortunately, my company is not ready with VX yet. It looks like I have to survive without using the Standard Library Manager Events method as below. Pretty sad to hear this was a bug for EE7.9.4. Any possible Mentor provide EE7.9.4 update on this or can you point up which binary file(s) cause the bug? Maybe I can just copy the binary file(s) from VX1 to EE7.9.4. Thank you in advance for your advise!

             

             

            Option Explicit

            Scripting.DontExit = True

            Scripting.Globals.Data("ApplicationStartup") = ScriptEngine

             

            Dim appID : appID = "LibraryManager.Application"

            Dim app : set app = GetObject(, appID)

             

            ' Attach Standard Library Manager events to the application

            Call Scripting.AttachEvents(app, "libOpenEvents")

             

            Sub libOpenEvents_OpenLibrary()

                 bla bla bla

            End Sub

            1 of 1 people found this helpful
            • 3. Re: Library Manager Exit or Quit issue
              Satoru

              Hi,

               

              Now, the status of this defect is "Close".

              A sample script is the workaround which I got by this defect.

               

              I think that a possibility that update will be released is low since this defect has a workaround.

              First of all, please register on SupportNet or contact the support center of your region.

               

              Regards,

              Satoru

              • 4. Re: Library Manager Exit or Quit issue
                christopher.branch

                Hi I Am usin Expedition VX1.2
                I got as well issues to exit a script.

                It is a script to log changes made i a cell.

                 

                 

                The script works fine for the first cell which gets changed but on the second one i get two qestions to add a log message. Means the sript startet in the first cell is still active.

                 

                Option Explicit

                 

                ' Get the application object

                Dim pcbAppObj

                Dim pcbDocObj

                 

                 

                Set pcbAppObj = Application                ' Get the application object.

                Set pcbDocObj = pcbAppObj.ActiveDocument   ' Get the active document

                 

                ' Add any type libraries to be used.

                Scripting.AddTypeLibrary("MGCPCB.ExpeditionPCBApplication")

                 

                ' Create the file system object

                Dim fileSysObj

                Set fileSysObj = CreateObject("Scripting.FileSystemObject")

                 

                ' Add Event handler

                Call Scripting.AttachEvents(pcbDocObj, "pcbDocObj")

                 

                'Cell Name

                Dim CellPath, LogPath, strUser

                CellPath = pcbDocObj.FullName

                LogPath =  Mid(CellPath, 1, Len(CellPath) - 3 )

                strUser = CreateObject("WScript.Network").UserName

                 

                'MsgBox LogPath

                 

                '

                Scripting.DontExit = True

                 

                '--------------------------------------

                '   Event Handlers for document

                '--------------------------------------

                Sub  pcbDocObj_OnClosed ()

                    msgBox "Close"

                    'set fileSysObj = nothing

                    set pcbAppObj = nothing

                    set pcbDocObj = nothing

                    Scripting.DontExit = false

                end Sub

                 

                 

                Sub  pcbDocObj_OnSave ()

                'Write Log to File

                'MsgBox LogPath

                if (fileSysObj.FileExists(LogPath & "txt")) Then

                    'msgBox "exist1"

                    Dim myLine, myFile, line, myTemp, lineNum

                    Set myFile = fileSysObj.OpenTextFile(LogPath & "txt", 1, True)

                    Set myTemp = fileSysObj.OpenTextFile(LogPath & "tmp", 2, True)

                    lineNum = 1

                   

                    Do While Not myFile.AtEndofStream

                        line = myFile.ReadLine

                       

                        Select Case lineNum

                        Case 1

                            myTemp.WriteLine(line)

                        Case 2

                            'MsgBox Mid (line, 8, 3)'Debug.WriteLine("Between 6 and 8, inclusive")

                            Dim tes

                            tes = Mid (line, 8, 3)

                            myTemp.WriteLine("Index: " & tes + 1)

                        Case 3

                            myTemp.WriteLine("Last Cell Modification: " & Now())

                        Case 4

                            myTemp.WriteLine("Last Edited by: " & strUser)

                        case 5

                            myTemp.WriteLine ("__________________________________________________________________________________________")

                        case else

                            myTemp.WriteLine (line)

                        End Select

                    lineNum = lineNum + 1

                    Loop

                   

                    ' Get new Log message

                    Dim LogMessage

                    LogMessage = InputBox("Pleas log cell changes     min. 5 characters required","Cell Log")

                    'if (LogMessage = "")Then

                    '    MsgBox "Leer"

                    'end if

                   

                    'MsgBox Len(LogMessage)

                    'User needs to log the Cell change

                    While Len(LogMessage) <=4

                    MsgBox "Message length min. 5 characters"

                    LogMessage = InputBox("Pleas log cell changes","Cell Log")

                    Wend

                   

                    'Write new modification log

                    myTemp.WriteLine ("__________________________________________________________________________________________")

                    myTemp.WriteLine ("#" & tes + 1)

                    myTemp.WriteLine ("#Modification: " & Now())

                    myTemp.WriteLine ("#Edited by: " & strUser)

                    myTemp.WriteLine ("#" & LogMessage)

                 

                 

                    myFile.close

                    myTemp.close

                    fileSysObj.DeleteFile(LogPath & "txt")

                    fileSysObj.MoveFile LogPath & "tmp", LogPath & "txt"

                else

                    Dim EditFile

                    Set EditFile = fileSysObj.CreateTextFile(LogPath & "txt", 1)

                 

                    'Write header and first index message

                    EditFile.WriteLine(pcbDocObj.Name)

                    EditFile.WriteLine ("Index: 1")

                    EditFile.WriteLine ("Last Cell Modification: " & Now())

                    EditFile.WriteLine ("Last Edited by: " & strUser)

                    EditFile.WriteLine ("__________________________________________________________________________________________")

                    EditFile.WriteLine ("#1")

                    EditFile.WriteLine ("#Modification: " & Now())

                    EditFile.WriteLine ("#Edited by: " & strUser)

                    EditFile.WriteLine ("#New Cell created")

                    EditFile.close

                end If

                End Sub   

                 

                Dose any one see a mistake or is it a bugg?

                 

                Regards

                Christopher