Look at the documentation for IGESControl_Writer.
It should have what you need.
Archived discussion
Export selected shapes
Is it possible to export selected shapes as iges file
on OCAF(OpenCASCADE Application Framework)?
Discussion
2 archived replies
Posts are displayed in their archived order.
Handle(TDocStd_Document) aDoc=...;
IGESCAFControl_Writer Writer;
Writer.Transfer(aDoc);
Writer.Write(aFileName);
I use IGESCAFControl_Writer to write all objects on my document;
but it will export all objects,
if i would like to export just selected objects,
do i need to create another TDocStd_Document,
and copy selected objects to it?