
Mon, 11/04/2019 - 12:55
Hi,
I have the following content in my STEP file:
#14=PRESENTATION_LAYER_ASSIGNMENT('1',
'{052BF154-476B-4C88-8FBB-936FDCD2AF3D}',(#62568,#37507,#62569,#393,#37508,
#37509,#37510,#37511,#37512,#37513,#62570,#62571,#62572,#37514));
I'm using the XCAFDoc_DocumentTool::LayerTool to read the layers:
Handle(XCAFDoc_LayerTool) myLayers = XCAFDoc_DocumentTool::LayerTool(hDoc->Main());
myLayers->GetLayerLabels(layers);
for (int i = 1; i < layers.Length(); ++i)
{
// const Standard_GUID nameGuid("TDataStd_Name");
Handle(TDataStd_Name) nameAttr = new TDataStd_Name();
Handle(XCAFDoc_GraphNode) graphNodeAttr = new XCAFDoc_GraphNode();
graphNodeAttr->SetGraphID("efd212e8-6dfd-11d4-b9c8-0060b0ee281b");
auto l = layers.Value(i);
l.FindAttribute(nameAttr->ID(), nameAttr);
bool found = l.FindAttribute(graphNodeAttr->ID(), graphNodeAttr);
LOG_INFO("nb label children: " << l.NbChildren());
LOG_INFO("nb label attributes: " << l.NbAttributes());
LOG_INFO("name: " << nameAttr->Get());
LOG_INFO("nb graph node children: " << graphNodeAttr->NbChildren());
}
I can read the layer name and "content" just fine. But the PRESENTATION_LAYER_ASSIGNMENT entity also includes a description field.
I need to read that description field. How can I do that?
Thank you for your help,
Tue, 11/05/2019 - 09:46
Answering my own question after a few hours poking around in the OpenCascade code: