Solved

Solidworks API Woes

Posted on 2010-11-22
1
1,920 Views
Last Modified: 2013-12-04
Hello,

I am having problems with the Solidworks 2010 API... I downloaded the SDK but I noticed on install it is giving me no options at all. Then when I try to use the wizard to create a project the c# options are not available (oddly only C++ has any solidworks options).

So I tried to directly bring in the 3 .tlb files listed here: http://help.solidworks.com/2010/English/api/sldworksapiprogguide/Overview/Using_SolidWorks_C__Add-In_Wizard_to_Create_C__Add-In.htm?id=20e09cfafe034f35a42c9e4784652402

When I do that I can bring the references in by directly browsing to the solidworks directory or by the COM manager.  However when I do this I still cannot use any of the solidworks functions, not even the using statements are recognized.

In conclusion: Help!

Edit:
 I un-registered and re-registered the .tlb files and no luck.

Also here is an image which may shed some light on the issue
http://mytheral.squarespace.com/storage/visual_studio.PNG

Edit2:
on compile I get these errors:

Error    1    The type or namespace name 'SolidWorks' could not be found (are you missing a using directive or an assembly reference?)    C:\Documents and Settings\...\My Documents\Visual Studio 2008\Projects\ClassLibrary2\Class1.cs    19    7    Solidworks_Plugin
Error    2    The type or namespace name 'SolidWorks' could not be found (are you missing a using directive or an assembly reference?)    C:\Documents and Settings\...\My Documents\Visual Studio 2008\Projects\ClassLibrary2\Class1.cs    20    7    Solidworks_Plugin
Error    3    The type or namespace name 'SolidWorks' could not be found (are you missing a using directive or an assembly reference?)    C:\Documents and Settings\...\My Documents\Visual Studio 2008\Projects\ClassLibrary2\Class1.cs    21    7    Solidworks_Plugin
Error    4    'SldWorks' is a 'namespace' but is used like a 'type'    C:\Documents and Settings\jacob.j.shaffer\My Documents\Visual Studio 2008\Projects\ClassLibrary2\Class1.cs    94    16    Solidworks_Plugin

edit3:
 also as an example if I use "using SolidWorks.Interop.sldworks;" or "using Interop.sldworks;" or even just "using sldworks;" it gives me the exact same error. Got the idea to try this from looking at the object browser... which the methods appear to be in there without the initial "SolidWorks".
0
Comment
Question by:eXMytheral
1 Comment
 

Accepted Solution

by:
eXMytheral earned 0 total points
ID: 34197268
Turns out that the fix was importing the libraries from .Net instead of browsing directly to the .tlb files. Teach me to trust the installation docs which said that VS would sort out which version I needed.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question