When do I use the TDataStd_Directory attribute ?

Hi !

I guess the topic says it all, what is the TDataStd_Directory class used for, can someone give an example of when it would be useful and for what ?


Sergey RUIN's picture

Hi Mikael!

Here's a short example of using TDataStd_Directory attribute:

// Setting TDataStd_Directory to a label

Handle(TDataStd_Directory) directory = TDataStd_Directory::New(aLabel);

// Creating a new sub directory of the given directory

Handle(TDataStd_Directory) newdirectory = TDataStd_Directory::AddDirectory(directory);

// Creating a new label in directory

TDF_Label newlabel = TDataStd_Directory::MakeObjectLabel(newdirectory);