Reply

How to invoke SolidEdge using C#

[ Edited ]

Hi Everyone,

    I am a Newbie to customization of SolidEdge. I am using C# as coding language. I need to invoke SolidEdge and can be done by

 

 type = Type.GetTypeFromProgID("SolidEdge.Application");

 seApp = (SolidEdgeFramework.Application)Activator.CreateInstance(type); seApp.Visible = true;

 

But what if i had more than one version of SolidEdge installed in my System and i wanted to invoke a particular version (Assume that i am having the SolidEdge Executable path for each version).

 

Thanks in Advance,

Regards

 

Venkata Ramesh V

 

Posted by: Venkata Ramesh Virodhula
Post date: 6/28/2011 11:48:20 PM

6 REPLIES

RE: How to invoke SolidEdge using C#

[ Edited ]

Venkata,

 

that's not possible since all Solid Edge COM objects are registered version neutral. The utility MakeCurrVer.exe (under the program folder of each Solid Edge installation) is the only way to "switch" between different versions of Solid Edge installed on a single system.

 

 

Posted by: Wolfgang Kunert
Post date: 6/29/2011 10:01:45 PM

RE: How to invoke SolidEdge using C#

[ Edited ]

Thanks for the reply Wolfgang. So if i opened two different versions in my system then used

 

seApp = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");

 

to which version it will connects to ?

 

(I don't have two installations in my system, so i am not able to check this. So first tell me one thing will it be possible  to open two different versions of SolidEdge in any system at a time , atleast manually by clicking the exe files)

 

Thanks & Regards

Venkata Ramesh V

 

Posted by: Venkata Ramesh Virodhula
Post date: 6/30/2011 12:33:41 AM

RE: How to invoke SolidEdge using C#

[ Edited ]

Venkata,

 

as i already said, only one Solid Edge installation is current (the last one installed). To make another installed version current you have to execute the tool MakeCurrVer.exe from within the program folder of the Solid Edge version you want to make the current version.

 

 

Posted by: Wolfgang Kunert
Post date: 6/30/2011 1:21:21 AM

RE: How to invoke SolidEdge using C#

[ Edited ]

I just wanted to mention that Dan Staples said at the last event that support for MakeCurrVer.exe was being discontinued.  The recommended approach is to use virtual machines if you need to run different versions of Solid Edge.

 

 

Posted by: Jason Newell
Post date: 6/30/2011 1:57:30 AM

RE: How to invoke SolidEdge using C#

[ Edited ]

Thanks wolfgang & jason for making things clear 

 

Posted by: Venkata Ramesh Virodhula
Post date: 6/30/2011 2:38:51 AM

RE: How to invoke SolidEdge using C#

[ Edited ]

Hi Jason and all,

I had a query since long time, not yet resolved. it is

1. I am exporting *.dft file to *.dxf file, where in i need to change sheet options from "Active sheet only" to "All sheets" . Here i came to know that there is no API to handle this thing, so i wrote my configuration file but the problem is

I need to change the default CAD CONFIGURATION FILE (SEACAD.INI) location to point to my configuration file (which i wrote with required settings). How i can do this from C# coding.

 

2. While importing the *.IGS file, SolidEdge is not automatically recognising the actual file (i.e *.PAR or *.ASM) and so its asking me like open with which template. So i thought of using "OPENWITHTEMPLATE" but the problem is how can i find whether the given .IGS file is an *.ASM or *.PAR . (I opened the *.igs file in Text editor, i found that there are extensions like ".SLDPRT" or ".SLDASM" if that *.igs file is exported by SOLIDWORKS where as if that *.igs file is exported by SOLIDEDGE i didnt found any tags that can differentiate as PART OR ASSEMBLY File). So how i do this from C# coding. (or what are the tags that differentiate the IGS file as PART or ASSEMBLY).

NoteI tried opening this *.IGS File which is exported from SOLIDEDGE in SOLIDWORKS, it is not asking me for the template but is opening automatically with the required template, which means there should be some tags different in both PART and ASSEMBLY - *.IGS files. can you tell me that tags please. )

 

3. Finally Exporting files to *.STP file,where in i need to change the TRANSLATE OPTIONS to "EXPORTAP214". how to do this in C#.

 

 

Any help in this regard worth appreciated.

Thanks in advance

 

Venkata Ramesh V

 

 

Posted by: Venkata Ramesh Virodhula
Post date: 7/13/2011 8:56:25 PM