STEPCAFControl_Writer

Hello

please can anyone explain to me how to write or read a file.stp (opencascade version 05)
I traied by
WS = XSControl_WorkSession();
writer = STEPCAFControl_Writer( WS.GetHandle(), False );
writer.Transfer(aCompound, STEPControl_AsIs);

status = writer.Write(aCompound.filename);
but a message of error C2065: 'WS' : undeclared identifier
error C2065: 'XSControl_WorkSession' : undeclared identifier
error C2065: 'STEPCAFControl_Writer' : undeclared identifier
best Regards

Göran Barz's picture

You can find an example for writing a step file in the open cascade documentation (step.pdf, page 42), but if I look at your question, maybe you should learn C++ first.

1. The include files are missing. Add

#include
#include

at the beginning of your cpp-file.

2. The type of the variable WS is not declared. You should use

XSControl_WorkSession WS;