Place Part in ST2???????????

[ Edited ]



I'm trying to programmically place a part interactively in ST2 using VB.NET.

I'm using seApp.StartCommand(sePlacePartCommand) , passing the filename in the onPlacePartUI event.

This always used to work OK before. Not now, in ST2.... Good old Siemens. I get this message in SE....


Any other way of doing this, or suppressing this silly message?


David Rothan



Posted by: Dave Rothan
Post date: 5/18/2010 2:00:06 AM


RE: Place Part in ST2???????????

[ Edited ]

Missed one vital step in my half-asleep state...


Wasn't setting my FileEvents object to seApp.FileUIEvents.


Done that, but now get:


"Unable to cast COM object of type 'System.__ComObject' to interface type 'SolidEdgeFramework.FileUIEvents'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{351BD72F-2103-3431-80F5-417185F2168F}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."


Any clues?


Posted by: Dave Rothan
Post date: 5/18/2010 2:15:48 AM

RE: Place Part in ST2???????????

[ Edited ]

Sorted.. Needed to use ISEFileUIEvents_Event instead.


Can someone explain the subtle, yet confusing differences between ISEFileUIEvents_Event and FileUIEvents? In fact what the mystery is behind all of the ISE prefixed events and their significance?


Posted by: Dave Rothan
Post date: 5/18/2010 2:28:51 AM

RE: Place Part in ST2???????????

[ Edited ]

^ that's what I'm also interrested in!


Jason once told me, too to alwase use the "ISE...._Events" with ...

but why?


Posted by: Linus Hechinger
Post date: 5/18/2010 11:08:53 PM

RE: Place Part in ST2???????????

[ Edited ]

OK, for the benefit of others, this is what I did:


Dim seApp As SolidEdgeFramework.Application

Dim WithEvents seFileUIEvents As SolidEdgeFramework.ISEFileUIEvents_Event


Sub PlaceInSE()


seApp = GetObject(, "SolidEdge.Application")


seFileUIEvents = seApp.ApplicationEvents




End Sub


Private Sub seFileUIEvents_OnPlacePartUI(ByRef Filename As String, ByRef AppendToTitle As String) Handles seFileUIEvents.OnPlacePartUI


Filename = "C:\TestPart.par"


End Sub


Posted by: Dave Rothan
Post date: 5/18/2010 11:34:12 PM