Please help me. Change Attribute of Line type

Hi. i can't solve this problem by myself. so i have question.

i got the object of Handle(TPrsStd_AISPresentation) using Set() method like below example.

Handle(TPrsStd_AISPresentation) prs = TPrsStd_AISPresentation::Set(ResultLabel.FindChild(7), TNaming_NamedShape::GetID());

In document, it's possible to set the property(material, color, transparancy, width) using member function of TPrsStd_AISPresentation. But there is no method about changing type of object, In my case, change Aspect_TOL_SOLID to Aspect_TOL_DASH.

so, i write the code like below.

Handle(AIS_InteractiveObject) Complementary;
Handle(TPrsStd_Driver) driver;
if (TPrsStd_DriverTable::Get()->FindDriver(prs7->GetDriverGUID(), driver)){
if (driver->Update (ResultLabel.FindChild(7), Complementary)){
Handle(Prs3d_LineAspect) PLA = new Prs3d_LineAspect(Quantity_NOC_GRAY, Aspect_TOL_DASH, 1);
Handle(AIS_Drawer) TestDrawer = Complementary->Attributes();


It's working. but there is an important problem. when i undo, Complemenatry object is not erased.

Could you help me?? very very important problem to me.


Forum supervisor's picture

Dear yeon cheol,
You got this effect (after applying undo), because you took action in circumvention of the OCAF document agreement. OCAF framework (which supports undo/redo mechanism) was not informed about your complementary actions.
The mentioned additional service (changing type of object) is not implemented yet and is not supported by OCAF framework at the moment. So, you can do it by yourself or make a request for the dedicated customer support via

shudolf's picture

Thanks, Supervisor. I understand clearly. :-)