E3 problem with COM connection
Hi to all, i'm just creating a new tool (trought COM interface) with VB.NET.
When i connect my program with E3 the right click on Project name into Component Windows not work,
and if i click on pages checkbox the page are viewed but the red check on checkbox are not viewed.
I use E3.Series 2011; Build 2011 - 1010; Version 12, 2011, 1010, 0 64 bit
Thanks.
Ettore
Was this Helpful?
-
Official comment
That is the correct way to close the COM object with VB.Net
Also we suggest setting the job object to '0'.
-
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 -
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 -
I think i have found a solution
Imports System.Runtime.InteropServices
Marshal.ReleaseComObject(E3Object)Was this Helpful?
0 -
First of destroy application or dispatcher object or is the same?
Was this Helpful?
0 -
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 -
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.
Comments
7 comments