Can anyone think of a reason solidedge.exe would stop showing in task manager under background processes or windows processes?
SE ST8, Windows 10, Visual Studio 2015 (Interop.SolidEdge v109.1)
I open SE and it works fine, but try to connect with Marshall.GetActiveObject("SolidEdge.Application") it's not finding it, and as I said, there is no process running (other than under Apps it does show 'Solid Edge')
If I tell it to start if not running, it actually DOES start a Solidedge.exe process.. but doen't load the GUI...
Solved! Go to Solution.
I believe I've seen Marshal.GetActiveObject() fail under some UAC situations. As a test, I would temporarily turn it off and try again. If that's the case, then running your .exe or Visual Studio if debugging, as Administrator should get it working again.
If you start Solid Edge via the API, it does not show a window by default. That is WAD. You simply call Application.Visible = true.
Thank you Jason for the quick response. I checked and UAC is off already, and I run Visual Studio as admin.. but you led me down the right path.. it was Solid Edge I had to Run as Admin.. that seems to have fixed it. Not sure what changed to cause that requirement, but at least it's working!
I wish I understood this issue better so that I could document it and speak on it. Like I said, I remember running into it and thinking how weird it was but we need to have a clear understanding of the exact scenario that it occurs.
I just tested again on my machine and I am not currently having the issue as described.
If anyone can identify exactly what is causing the issue, I would love to hear the details of why.
I'm using "CreateObject("SolidEdge.Application")" in VS 2015 and not having any issues... Should I be using "Marshal" or was that a temporary workaround for some gap from the early .NET days?
CreateObject() [or Activator.CreateIntance()] is how you create a new instance of Solid Edge in .NET land. If that's what you're trying to accomplish in your code, there is nothing to change.
He was asking about connecting to an already running instance of Solid Edge. You do that with Marshal.GetActiveObject().