Trouble with extracting product names from STEP files

Hello everyone,

I'm trying to extract product names from STEP files, but, I always fail. I tried with following steps:

Read STEP file using STEPCAFControl_Reader reader, set its name mode to true (STEPCAFControl_Reader::SetNameMode(true)) and called transfering STEPCAFControl_Reader::Transfer(Handle(TDocStd_Document document)). Then I tried to get names of products from document->GetNames(), but it crashed.

Next idea that came to me was to use STEPCAFControl_Reader::ReadNames​(), but, I don't have idea how to get 3rd and 4th argument for it (from class derived from STEPCAFControl_Reader). I thought that names in document are populated during transfer during Transfer(document) call.

Does anyone have idea how to extract product names?

Thanks in advance,

Nenad.

Shamsher's picture