SolidEdge ST4 C++ AddIn compiling with MP01 installed

 

Hi All,

 

I have just spent a day trying to get my C++ Addin to build with SolidEdge ST4 (32bit) and keep hitting problems with importing the type libraries.

 

I have now tracked down my problem using a clean VM and SolidEdge ST4 (with no service packs) and being able to compile our code, but as soon as MP01 is installed I get this compiler error when importing the part.tlb:

 

error C4772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder

 

Just wondering if anyone else has seen the problem so far?

 

Thanks,

Chris.

 

 

Posted by: chris mann
Post date: 11/3/2011 9:58:58 AM

4 REPLIES

RE: SolidEdge ST4 C++ AddIn compiling with MP01 installed

i am also working on c++ Addin fo SE Customization,better to import LIBID's rather than importing tlb file...

 

Posted by: prasad k
Post date: 11/3/2011 6:52:38 PM

RE: SolidEdge ST4 C++ AddIn compiling with MP01 installed

/* SEInstallDataLib Type Library */

#import "libid:42E04299-18A0-11D5-BBB2-00C04F79BEA5"

 

/* SolidEdgeFramework Type Library */

#import "libid:8A7EFA3A-F000-11D1-BDFC-080036B4D502" exclude ("UINT_PTR", "LONG_PTR") rename ("GetOpenFileName", "SEGetOpenFileName")

 

/* SolidEdgeFrameworkSupport Type Library */

#import "libid:943AC5C6-F4DB-11D1-BE00-080036B4D502"

 

/* SolidEdgeGeometry Type Library */

#import "libid:3E2B3BE1-F0B9-11D1-BDFD-080036B4D502"

 

/* SolidEdgePart Type Library */

#import "libid:8A7EFA42-F000-11D1-BDFC-080036B4D502"

 

/* SolidEdgeAssembly Type Library */

#import "libid:3E2B3BD4-F0B9-11D1-BDFD-080036B4D502"

 

 

/* SolidEdgeDraft type Library */

#import "libid:3e2b3bdc-f0b9-11d1-bdfd-080036b4d502"

 

//// TODO: reference additional headers your program requires here

//#import "libid:8A7EFA3A-F000-11D1-BDFC-080036B4D502" exclude ("UINT_PTR", "LONG_PTR") rename ("GetOpenFileName", "SEGetOpenFileName")

//#import raw_interfaces_only, raw_native_types, named_guids,rename ("_IApplicationAuto", "Application")

//#import raw_interfaces_only, raw_native_types, named_guids,

//#import raw_interfaces_only, raw_native_types, named_guids

//#import raw_interfaces_only, raw_native_types, named_guids

//#import raw_interfaces_only, raw_native_types, named_guids

do the following steps

1.import the .tlb file and compile,then you get the .tlh file(comment out the LIBID's first)

2.comment out the import .tlb statement and then compile with the LIBID,it will automatically updates the .tlh files

 

 

regards

Prasad

 

Posted by: prasad k
Post date: 11/3/2011 9:39:02 PM

RE: SolidEdge ST4 C++ AddIn compiling with MP01 installed

Prasad,

 

Thanks for the response and suggestions.

 

However, I'm not sure this is really solving the problem.

 

I have got a small sample set of code to build now, but only by running a full rebuild, accepting the error message, then running a second build (and ensuring the solution is not cleaned inbetween!)

 

But, if I check the part.tlh file that is generated, it still contains the original problem entry:

 

long GetSize ( );

// Method 'GetForm' not emitted because of invalid return type: __missing_type__

VARIANT_BOOL GetVisible ( );

 

All that is happening is that it fails to build first time round, then on second build finds the existing .tlh file and so does not try to recreate it.

A comparison between the part.tlh file generated by MP00 compared to MP01 shows the problem lines as:

 

enum SolidEdgeFrameworkSupport::Geom2dFormConstants Form;

__missing_type__ Form;

 

Yet, other lines do reference to SolidEdgeFrameworkSupport without problem!

 

This only occurs after an upgrade to MP01 though, so I guess I'll have to log it with Siemens and see what happens!

 

Thanks,

Chris.

 

Posted by: chris mann
Post date: 11/4/2011 1:27:37 AM

RE: SolidEdge ST4 C++ AddIn compiling with MP01 installed

Hi Chris,

I don't know if this is the case, but consider that I think the framework of ST4 and ST4MP1 is different. I had some similar problems (I use VB.NET) and I had to recompile using the .NET 4 (for ST4 without MP1 I could do it with .NET 3.5 without problems).

I hope this can help

 

Posted by: Giancarlo
Post date: 11/10/2011 10:46:23 PM