AnsweredAssumed Answered

Interop and "I" clarification please.

Question asked by Martin Beaudry on Sep 29, 2010
Latest reply on Oct 5, 2010 by Martin Beaudry

Hello 3D friends,

 

I am somewhat new to API but really close to grasping vb.net in SolidWorks. Some things are still cloudy. Can someone please clarify the following?

 

2 things.

 

1.

In the object browser there is a namespace called SldWorks and another one called SolidWorks.Interop.sldworks. What is the difference? Does this have anything to do with Solidworks being COM based and me wanting to do VB.net? Which do I use?

 

2.

In the object browser under the namespace SolidWorks.Interop.sldworks i have a class named ModelDoc2

In the online help under the namespace SolidWorks.Interop.sldworks i have a class named IModelDoc2 (notice the "I"). Every single class has an "I" I think it's for interface... If so, What's an interface and how do i use it? I never see that in the coding samples.

 

Hyperlink to online help:

http://help.solidworks.com/2010/English/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IModelDoc2.html?id=9d9c749187c84026aa1b3313bffa9814#Pg0

 

I find the api help not very good for beginners.When you blend in .NET/COM,vba, swp macros, 32bit, 64bit... it can get confusing.

 

Thank you.

 

Martin

Outcomes