Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Solidworks API Woes

Posted on 2010-11-22
1
Medium Priority
?
1,967 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

730 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