What can we help you with today?

Log in and chat with an Applications Engineer now! Check out our chat button in the bottom right corner!

What can we help you with today?

Log in and chat with an Applications Engineer now! Check out our chat button in the bottom right corner!

E3 problem with COM connection

Comments

7 comments

  • Official comment
    Admin
    Admin

    That is the correct way to close the COM object with VB.Net

    Also we suggest setting the job object to '0'.

  • Permanently deleted user
    Permanently deleted user

    once your script/application has control, E3 doesn't behave like you would expect. once the application/script terminates then E3 will function normally.

    i've seen that problem with the red check box disappearing too. we would have to shutdown and restart E3. i had thought that one of our E3 scripts was throwing an an unhandled exception and so the script wasn't terminating correctly. i didn't have time to look into it.

    what is it you're trying to accomplish by interacting with the project tree?

    Was this Helpful?

    0
  • Permanently deleted user
    Permanently deleted user
    once your script/application has control, E3 doesn't behave like you would expect. once the application/script terminates then E3 will function normally.


    Not all time... and (but i'm not sure) especially when are running multiple session of E3

    what is it you're trying to accomplish by interacting with the project tree?

    Only connect E3 trought Dispatcher ( CreateObject("CT.Dispatcher") ), GetE3ByProcessId, CreateJobObject, Job.GetName and JOB.GetAttributeValue

    (At now, i just have a vb script and now i want to port it into vb.net)


    In most (my) cases i run multiple sessions of E3 and i want to select which session the program must be connected.

    Was this Helpful?

    0
  • Permanently deleted user
    Permanently deleted user

    I think i have found a solution

    Imports System.Runtime.InteropServices


    Marshal.ReleaseComObject(E3Object)

    Was this Helpful?

    0
  • Permanently deleted user
    Permanently deleted user

    First of destroy application or dispatcher object or is the same?

    Was this Helpful?

    0
  • Permanently deleted user
    Permanently deleted user

    I have make some test... not enough Marshal.ReleaseComObject if multiple E3 sessions are running... ( but probably are my mistake...)
    For this reason, i have make a slave dialog form that manage the connection, and when connected in main form

    1) Close Dialog
    2) Dispose the dialog form object
    3) Force the Garbage Collector

    In this case all E3 sessions has no problems.
    I have tried to use GC without dialog (in the main form) but in this case the last executed E3 session have problem...

    Was this Helpful?

    0
  • Admin
    Admin

    If you are using the dispatcher to handle more than one running E3 session then you must make sure you cliose the correct session with the Marshal.

    You can do this by getting the process id through the Dispatcher COM.

    Was this Helpful?

    0

Please sign in to leave a comment.