Hi, I have this code intended to open an existing solid edge assembly from a running instance of solid edge. But it does not open it at all and it gives me no error message. Please Help.
publicvoid openDocument(string fileName, string  args)
SolidEdgeFramework.Application application = null;
SolidEdgeFramework.Documents documents = null;
// Connect to running Solid Edge Instance
application = (SolidEdgeFramework.Application)
documents = application.Documents;
catch (System.Exception ex)
System.Windows.Forms.MessageBox.Show(string.Concat("Error Opening Solid Edge File ", ex.ToString()));
Solved! Go to Solution.
My first guess is that you have multiple Edge.exe's open and don't realize it. If you look in task manager, check to see how many there are. I've fallen into this trap myself and feel silly after I realize what's happening. Let's start with that and go from there.
But it does not open it at all and it gives me no error message
This is a solved question, but the above remark got me curious. So I went ahead and created a hidden Edge.exe using CreateObject.
Then run the code in question followed by making Edge.exe visible using Visible = True
I found the code had actually opened the file and found this to be useful in batch processing where SE can be kept invisible and files opened and processed.
A doubt though - will keeping SE invisible still let me process the files in batch mode ?
Are there any known APIs or commands which won't work when SE is hidden.
I recall past discussions about certain APIs not working as expected when Application.Visible = False but I don't remember the specifics. My suggestion is to just try it both ways and see if you get the expected results.
If i'm not wrong, Save as PDF needs that Application is visible to work.
Apart from that i don't remember other issues with application not visible.