C# and SolidEdge ST

 

Hello all,

Ihave utils as separate C# .dll. Right now I have (for me) quite a big problem - what is the best way how to can use utils for both ST and pre-ST versions of SolidEdge? For example I have an util setDocAttr(application, attrName, attrValue)

{

  and here is something like if doc is part ....

  but for ST is there additionaly if doc is syncPart...

  which is not possible to compile for pre-ST versions

 I expect that someting like in C is possible

if(application.GiveMePleaseVersion.isEqual( "ST")

{

#define CURRENT_VERSION_IS_ST

}

and then

#ifdef  CURRENT_VERSION_IS_ST

 if doc is syncPart...

#else

...

#endif

Thank you for any advise

 

Jara

 

Jara

 

Posted by: Jara Ctverak
Post date: 2/23/2009 7:49:25 PM

3 REPLIES

RE: C# and SolidEdge ST

Jara,

 

The best approach is to use the SolidEdgeDocument interface and check the Type property. This will tell you what type of document that you're dealing with and you can code accordingly. If you must check version, you can use the SEInstallData API.

 

Posted by: Jason Newell
Post date: 2/23/2009 8:54:09 PM

RE: C# and SolidEdge ST

 

 Hello Jason,

 

yes I am using the SolidEdgeDocumentInterface for recognising of doc type but it do not solve it because I am usimg the same utilities for version 20 and version ST and when I am compiling the program for version 20 it finishes with errors because Sync.. doc types are not known for this version. That is why I am doing it as

 

#define CURRENT_VERSION_ST

....

 

 

#if

CURRENT_VERSION_STpublicstringgetPartAttr(SolidEdgePartSync.PartDocumentpartDoc, StringattrName) {}

#endif

but I have to comment and uncomment manualy this #define ... according to version I am compiling. Is there any possibility to do it automatically?

 

Thanks

Jara

 

Posted by: Jara Ctverak
Post date: 2/23/2009 9:33:44 PM

RE: C# and SolidEdge ST

Jara,

 

I don't see why you would be compiling two different versions of your application. Typically you would want to build for the greatest version. That build will work for all Solid Edge releases.

 

Posted by: Jason Newell
Post date: 3/3/2009 6:41:08 AM