Solved

Solidworks API Woes

Posted on 2010-11-22
1
1,945 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to copy file 14 91
Converting PHP triple des decrypt to c# 9 171
Adjust the codes 3 63
C# How to display the first five answers that have smallest value? 16 43
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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