Hello,
It seems that something has changed in SolidWorks API.
Attached is a sat file with 2 entity attribute informations on face.
The following code to get the attributes from the loaded document doesn't work any longer in SolidWorks 2009 SP4 ( it used to work with previous release and even with SP0 ! )
::SolidWorksLib::IFeaturePtr feature = partDoc->IFirstFeature();
while ( feature != NULL )
{
const CString featureType = static_cast
if ( featureType == /*swTnAttribute*/_T( "Attribute" ) )
{
::SolidWorksLib::IAttributePtr attribute = feature->GetSpecificFeature2();
// process the attribute object
}
feature = feature->IGetNextFeature();
}
With SolidWorks 2009 SP4, there is no feature with Attribute type name in the loaded part doc.
Is there something wrong, or is there an alternative method to get the entity attribute.
Best regards
Jean-Robert
SolidworksApi macros