Changing attributes of my own interactive object

Hello, I have derivated a class from the ais_interactive_object. I can display it right now. But i just can't change attributes like material and color.. Do i have to redefine the setcolor and setmaterial functions ? What code do i have to put inside the brackets ? How do i can call these functions ?

I have tried this but without effect : redefinition of the function void CUser_Interactive_Object::SetColor(const Quantity_NameOfColor aColor) myDrawer->ShadingAspect()->SetColor(aColor);

Then i called it this way

Handle_AIS_InteractiveObject Current = myAISContext->SelectedInteractive() ; Handle_CUser_Interactive_Object currentobject = Handle(CUser_Interactive_Object)::DownCast(Current); if(!Current.IsNull()) { myAISContext->SetColor(Current,Quantity_NOC_MATRABLUE); //I tried this too Current->SetColor(Quantity_NOC_MATRABLUE); }

What am i doing wrong ????

Thanxs in advance

Msaaf Omar's picture

Those who wnat to know how to do it can contact me. Best regards. Omar Msaaf