I'm new to working with solid edge through the API and am becoming more familiar with using Visual Studio and VB as I go, however, I don't have a great deal of experience there.
Problem: Errors encountered when opening a .par file; sometimes it works, other times is doesn't. I don't have a good feel for why the error would occur inconsistently.
Here is a little bit about my system
SE references: SolidEdgeFileProperties, SolidEdgeFramework, SolidEdgeFrameworkSupport
version of MS VB 2010 Express: 10.0.30319
OS: Windows XP, 32-bit (Recently installed Service Pack 3)
Note SE installation was performed prior to upgrade to SP3
Some of my .NET components installed (not sure If I should remove some of these):
MS .NET framework 2.0 SP2
MS .NET framework 3.0 SP2
MS .NET framework 3.5 SP1
MS .NET framework 4 Client Profile
MS .NET framework 4 Extended
MS .NET framework 4 Multi-Targeting Pack
SE ST2 Version: 102.00.0504
Here is a mwe code:
Imports System.Runtime.InteropServices Module Module1 Sub Main() Dim objApp As SolidEdgeFramework.Application = Nothing Dim objDocs As Object Dim objDoc As Object Try objApp = GetObject(, "SolidEdge.Application") Catch Try objApp = CreateObject("SolidEdge.Application") Catch Console.WriteLine("Could not connect to SolidEdge.") End Try End Try ' ensure that application is visible; set the `Visible' property to true objApp.Visible = True 'Access the Documents collection object. objDocs = objApp.Documents 'Open an existing document. objDoc = objDocs.Open("F:\hwlib\lowsidetable\floorboarduniq
ue.par") End Sub End Module
Note that I have tried opening files located on an external drive F:, as well as, local C:
I have attached a few of the error messages.
Any comments or suggestions are greatly appreciated.
Posted by: Chris L'Esperance
Post date: 10/14/2012 2:08:06 PM
Welcome to the forums and community. This issue is covered in the SDK help. There are 2 ways to access the SDK help.
[li]The SDK help is installed locally on every machine that has Solid Edge. If you have Solid Edge open, click the "Help Index" button on the top right of the application to expand the pane. Then click the "Programming with Solid Edge" link.[/li]
[li]The SDK help is also available online at [url=http://www.solidedge.com/api]www.solidedge.com/api
Once you're into the SDK help, navigate to "Programmer's Guide" -> "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors".
Hope this helps.
Posted by: Jason Newell
Post date: 10/15/2012 12:13:39 AM