Labels ?

Hi !

How do I delete a TDF_Label from a TDocStd_Document ?

I have looked both into the docs and the header files, but I have not found any way to delete them.

Mikael

Mikhail KAZAKOV's picture

Hi, Mikael! Labels in the Application Framework are the persistant keys for the attributes manipulation. Label is like the address in the memory. You may attach some attributes (TDF_Attribute classes tree) to the label and remove attributes from the label. Each of the attribute has specific GUID, which is unique for the certain type of TDF_Attribute descendant. There is one important rule. On a label it may be only one attribute with one ID attached. It means, that You can attach as much as You want attributes to the label, but each of attribute has to have different GUID. That allows You the exact identification of each of attribute inside Your model. It's impossible to delete the Label from the data model. Label is the persistant storage of the attributes only. You can create as much labels as You need, but You can't delete any.

Best wishes.

Mikhail.