I am trying to open step file in SolidEdge using API but, I dont want display alert (choose how to open file ".asm/.par etc") while opening step file.
I tried using "application.DisplayAlerts = false;" but its giving "unspecified" exception.
Use the OpenWithTemplate method:
AssemblyDocument doc = app.Documents.OpenWithTemplate(@"D:\TMP\carrier.stp", @"C:\Program Files\Siemens\Solid Edge 2019\Template\ISO Metric\iso metric assembly.asm") as AssemblyDocument;
I am actually trying to open file in hidden mode. I was using Open() method to open .stp file in hidden mode by using 2nd parameter of Open() method named "DocRelationAutoServer".
Is there a way to open file in hidden mode and avoid display alerts?
Dependend on what you are going to do with the STEP file later, you may open it in another instance of SE which is NOT visible.
Inside the active session, you will always see (also for a short moment) the window of the new document, even if you hide the created window immediately. The ScreenUpdating and Interactive properties do NOT help here!
To avoid the document from being visible, you may HIDE SE temporarily while you are loading the STEP file and hiding the new window. Then, you could show SE again.
Other than these options, I can't see a direct way like for the Open method.