Reply

How to open a Document silently in SolidEdge

[ Edited ]

 

Hi,

How can we open a document silently in SolidEdge, Silently means it should not be visible to the user.

Regards,

Avi

 

Posted by: rajesh panda
Post date: 7/17/2009 1:44:18 AM

13 REPLIES

RE: How to open a Document silently in SolidEdge

[ Edited ]

Hi,

 

you can try for example with GetObject("d:\test.par")

 

Regards,

jr

 

Posted by: JR
Post date: 7/17/2009 2:28:25 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

 

Thanks for the reply jr.

Can you please elaborate on how we can open a document silently (in invisible mode) . I am using C++

Regards,

Avi

 

Posted by: rajesh panda
Post date: 7/17/2009 2:39:49 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

Public Function CreateSEApp()

'Create Solid Edge instance

Set SEApp = CreateObject("SolidEdge.Application")

SEApp.Visible = FALSE

SEApp.DisplayAlerts = FALSE

End Function

 

Don't forget to reset the visibility and DisplayAlerts to True!

 

Posted by: Bill Ledbetter
Post date: 7/17/2009 2:40:36 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

 

Thanks Bill,

But the code given by you makes SolidEdge Application invisible.

I want to make the document invisible and not the SolidEdge application.

Regards,

Avi

 

Posted by: rajesh panda
Post date: 7/17/2009 3:11:51 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

Then all I can think of is minimizing the window in which the part lies.

 

Posted by: Bill Ledbetter
Post date: 7/17/2009 3:15:57 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

 

Bill,

How can we do that ?

Regards,

Avi

 

Posted by: rajesh panda
Post date: 7/20/2009 2:09:12 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

'Create Solid Edge instance

Set SEApp = CreateObject("SolidEdge.Application")

SEApp.DisplayAlerts = FALSE

 

'Open Document

Set NewAssy = seApp.Documents.Open("C:\Drawings\Model.par")

'Hide active window

SEApp.ActiveWindow.WindowState = 1

 

'Do required actions

 

'Restore Window

SEApp.ActiveWindow.WindowState = 2

 

'Reset Display alerts and release objects

SEApp.DisplayAlerts=TRUE

SEApp=Nothing

 

Posted by: Bill Ledbetter
Post date: 7/20/2009 2:37:08 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

Avi,

You can also make the document related windows invisible. (VB code untested)

 

Dim oWin as Window

for each oWin in SEApp.ActiveDocument.Windows

oWin.Visible = False

next

 

Regards,

Julian

 

Posted by: Julian Guillo
Post date: 7/21/2009 1:01:11 AM

RE: How to open a Document silently in SolidEdge

[ Edited ]

 

Julian,

I triend the solution given by you. But Windows and WindowState both are properties at the application level and hence we cannot control the visibility of a particular document using these properties.

If we make WindowState = 1 or Window.Visible = false, then whole application is minimised and not a particular document.

Regards,

Avi

 

Posted by: rajesh panda
Post date: 7/22/2009 2:28:41 AM