Reply

ST4 Upgrade ActiveX Preview Control Error

[ Edited ]

Morning All,

 

Just upgraded to ST4 from ST3 (both 64bit) and now my existing code doesn't compile, the error I'm getting is simply:

 

Error 13 Type 'AxSEPreviewLib.AxSEPreview' is not defined.

 

I thought I would just have to update the reference to the new ST4 folder but can't seem to find the right reference to the control?

 

All the code does is show SE files in a preview window.

 

Thanks in advance.

 

Alex.

 

Posted by: Alex Lush
Post date: 3/1/2012 5:35:40 AM

1 REPLY

Re: ST4 Upgrade ActiveX Preview Control Error

[ Edited ]

I think you should generate an interop DLL from SEPreview.tlb giving the interop DLL created a unique identity. Then deliver the interop assembly with your assembly. That way you don't rely on the file being delivered by Edge (or any changes that might cause an issue).

 

I believe ST4 has a GenEdgeInteropAssemblies.bat file under the sdk that generates interop assemblies. It does so for the commonly used .tlb files. You can modify it to do so for SEPreview.tlb. Just copy one of the lines, say for framewrk.tlb, and replace "framework" with "SEPreview" where you see the namespace entry. If you have reached into the program folder to reference the primary interop assembly there (looks like it since "Lib" is part of the name), the namespace you generate can avoid compile errors.

 

The line might look like this:

 

tlbimp %1\sepreview.tlb /out:%2\interop.SolidEdgePreview%3.dll /namespaceSmiley FrustratedolidEdgePreview /sysarray

 

You may have to change your namespace usage. The bat file will (by default) add the label to the namespace.

 

Here is an example to create you own interops in "c:\tmp\MyProject" with "AlexLush" providing for uniqueness.

 

GenEdgeInteropAssemblies "c:\program files\solid edge ST" c:\tmp\MyProject AlexLush

 

Posted by: R.D. Holland
Post date: 3/2/2012 12:47:11 PM