A C# add-in problem: The property Manager Page is declared in a separate DLL

December 2, 2009
Usually while creating a SolidWorks Add-in project, it is more convenient to move the Property Manager Page Interfaces to separate DLL-library.

However, sometimes an "Invalid Cast Exception" message appears in such .NET-applications.

The problem here is the visibility of the assembly. The DLL must be COM-visible. Go to Project Properties -> Assembly Information and then check the "Make Assembly COM-visible" box.

Another issue that can cause this exception is a class access modifier. The PMPage handler class must be declared 'Public' in order to avoid this problem.

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

AttachmentSize
amcb_api_tip_02.flv10.39 MB