IEntity or IEntity on VS 2008

Migrating a plugin from 2005 to 2008 VS, and ran into issueswith the IEntity used in SolidWorks and the one used in Windows'sAPI. This causes all sort of communication errors in the app.Things like "cannot define GUID for type IEntity" becomes a commonerror.

What's the strategy here?
We're trying to use a rename in the stdafx.h and rename IEntity toIEntityNew to see if this solves the problem for us.

Any hints or ideas about our dilemma?

SolidworksApi macros
Comments 3
SF
SF 2008-10-13
This is what namespaces are invented for; to resolve theconflict replace the entries of IEntity withSldWorks.IEntity
SF
SF 2013-05-16

Luke, sorry replying old discussion, but still related to the topic.

I wonder how to renaming IEntity if the code is using solidworks #include "amapp.h" instead namespace. Because the code I was working with using a lot of LPENTITY type from amapp.h which is conlicted with Windows API.

AT
AT 2013-05-16

Just rename the IEntity to something like ISWEntity while importing the SolidWorks type library. Refer this topic: http://help.solidworks.com/2013/English/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IEntity.html

____________________________________________________

Regards,

Artem Taturevych, Application Engineer at Intercad (Australia)

translationXpert – add-in to translate SolidWorks models

LinkedIn SolidWorks API Education Group