Created lines disapear

Hi, All,

I use LineDriver to create several lines on certain plane. After that that, I want to select them for Extrusion. But When I click any vertex, edge, and face, neural section button. These lines dispear. Following is the example of edge selection function.

//Set edges selection mode
void CMyView::OnSelEdges()

Does anyone has this expericens? Thanks in advance!


Paul Jimenez's picture

Most likely you created the shape in a Local Context and didn't tell the AISContext to keep it. Once the context is closed, all shapes added to it are removed.

Wang Chris's picture

Thanks. You are correct. Because I selected a face with local context open as datum plane before, and didn't close it when generated these lines.

But I now find I cannot retrieve these lines after close the document. Because there is no TNaming_NamedShape attribute saved in the OCAF tree. I don't know how does it happen.


Wang Chris's picture

From the OCAF tree, I find there is no attribute of "TNaming_NamedShape" for the "Line", while "Box" and "Cylinder" which I use sample code generated has the attribute of "TNaming_NamedShape" with value "SOLID PRIMITIVE".

I don't know how has it been generated?


Wang Chris's picture

I got it. It is because I forgot to register the line driver with driver table.