Solid edge windows process gone?

Creator
Creator

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... 

 

Thanks! 

 

Matt

 

6 REPLIES

Re: Solid edge windows process gone?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

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.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Solid edge windows process gone?

Creator
Creator

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!

 

Thanks again,

 

Matt

Re: Solid edge windows process gone?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

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.

  • I'm running Windows 10 Pro x64.
  • UAC is set to the second tic from the top (Recommended).
  • My windows login is in the local administrator group.
  • I simply launch Solid Edge x64 & Visual Studio 2015, both without explicitly using "Run as Administrator".
  • Marshal.GetActiveObject() works as expected.

If anyone can identify exactly what is causing the issue, I would love to hear the details of why.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Solid edge windows process gone?

Esteemed Contributor
Esteemed Contributor

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?


Thanks,
Ken

Production: ST9 MP10
Testing: ST10 MP3

Re: Solid edge windows process gone?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

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().

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Solid edge windows process gone?

Esteemed Contributor
Esteemed Contributor

What about using "GetObject()"?


Thanks,
Ken

Production: ST9 MP10
Testing: ST10 MP3