Problem with start SE in VB.NET

 

Hi Jason,

I used syntaxe from Programmer's Guide from SE ST for start SE. See

following code.

Problem is during run program that SE doesnt' started -> error is on

line: objApp = Activator.CreateInstance(objType)

Error message: "Instance interface cannot create."

Could you help me?

Vaclav BlahnikPrivate Sub ProcessFile(ByVal filename As String)Dim objApp As SolidEdgeFramework.Application = NothingDim document As Object = NothingDim objType As TypeDim pocitadlo as Byte = 0If pocitadlo = 0 Then Try objType = Type.GetTypeFromProgID("SolidEdge.Application") objApp = Activator.CreateInstance(objType) ' there is error objApp.Visible = True Catch ex As Exception Console.WriteLine(ex.Message) Finally If Not (objApp Is Nothing) Then Marshal.ReleaseComObject(objApp) objApp = Nothing End If End TryEnd IfobjApp.DisplayAlerts = Falsedocument = objApp.Documents.Open(filename)End Sub

 

Posted by: Vaclav Blahnik
Post date: 10/1/2008 3:02:35 AM

3 REPLIES

RE: Problem with start SE in VB.NET

 

What version of VB.NET are you using?  I've seen this problem a long time ago with VB.NET 2003 (.NET Framework v1.1).

You might .zip up your solution and attach it to a reply so that I can see your entire setup.

 

Posted by: Jason Newell
Post date: 10/1/2008 7:39:01 AM

RE: Problem with start SE in VB.NET

 

Yes, I have .NET 2003 and Framework 1.1 and Framework 2.0.

Zip is attached.

 

Posted by: Vaclav Blahnik
Post date: 10/1/2008 8:52:36 AM

RE: Problem with start SE in VB.NET

 

Hi Jason,

I have instaled VS 2005 now and it works fine.

Thanks for your thought.

Vaclav

 

 

Posted by: Vaclav Blahnik
Post date: 10/23/2008 5:08:31 AM