Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

User Attribute and Handle

Bayard's picture

I'd like to create a user attribute TUserAttribute in OCAF which inherits from TDF_Attribute, as described in OCAF user manual.

To add it in the OCAF Tree, the TDF_Label::Add( ) take a Handle_TDF_Attribute in parameter. When I try to code :

Handle(TUserAttribute) myUserAttribute;
myUserAttribute = new TUserAttribute();
myLabel.AddAttribute (myUserAttribute);

I get 'Handle_TUserAttribute' C2065 : undeclared identifier.

Do have I necessarily to create also Handle_TUserAttribute class ?
Like in Handle_TDataStdName.hxx : DEFINE_STANDARD_HANDLE(TDataStd_Name,TDF_Attribute) ..

Thank you for your answer.