#include <TDataStd_Name.hxx>
#include <climits>
+#ifndef WIN32
+#include <sys/stat.h>
+#endif
#ifdef WIN32
# define _separator_ '\\'
TDF_Label anObjLab = aGroupLab.NewChild();
TCollection_ExtendedString aName(theFeature->data()->getName().c_str());
TDataStd_Name::Set(anObjLab, aName);
- AddToRefArray(aGroupLab.FindChild(1), anObjLab); // reference to names is on the first sub
+ TDF_Label aGrLabChild = aGroupLab.FindChild(1);
+ AddToRefArray(aGrLabChild, anObjLab); // reference to names is on the first sub
// event: feature is added
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_CREATED);
int Model_Document::size(const string& theGroupID)
{
Handle(TDataStd_ReferenceArray) aRefs;
- if (groupLabel(FEATURES_GROUP).FindAttribute(TDataStd_ReferenceArray::GetID(), aRefs))
+ if (groupLabel(theGroupID).FindAttribute(TDataStd_ReferenceArray::GetID(), aRefs))
return aRefs->Length();
// group is not found
return 0;