94710
Structural
- May 16, 2007
- 21
I wrote a C++ post-processing program (I copied instructions written in abaqus documentation):
and I get :
Can someone help me?
Code:
#include <odb_API.h>
int ABQmain(int argc, char **argv)
{
//Open the output database used by the tutorial.
odb_Odb& odb = openOdb("viewer_tutorial.odb");
//Create a variable that refers to the last frame of the first step.
odb_Step& step = odb.steps()["Step-1"];
odb_SequenceFrame& allFramesInStep = step.frames();
int numFrames = allFramesInStep.size();
odb_Frame& lastFrame = allFramesInStep[numFrames-1];
//Create a variable that refers to the displacement 'U' in the last frame of the first step.
odb_FieldOutput& displacements =
lastFrame.fieldOutputs().get("U");
//Create a variable that refers to the node set 'PUNCH' in the part instance'PART-1–1' :
odb_Instance& instance =
odb.rootAssembly().instances()["PART-1-1"];
odb_Set& nodeSet =
instance.nodeSets["PUNCH"];
//Create a variable that refers to the displacement of the node set in the last frame of the first step:
odb_FieldOutput myDisplacements =
displacements.getSubset(nodeSet);
//close odb
odb.close();
return 0;
}
and I get :
Code:
C:\Documents and Settings\alorenzom\Documenti\HC3FEM\AbC++Api>abaqus make job=ex
periment user=experiment.cpp
ABAQUS JOB experiment
Begin Compiling User Post-Processing Program
6/22/2007 11:37:50 AM
Compiling: C:\Documents and Settings\alorenzom\Documenti\HC3FEM\AbC++Api\experim
ent.cpp
experiment.cpp
C:\Documents and Settings\alorenzom\Documenti\HC3FEM\AbC++Api\experiment.cpp(34)
: error C2475: 'odb_DiscreteEntity::nodeSets' : forming a pointer-to-member req
uires explicit use of the address-of operator ('&') and a qualified name
C:\Documents and Settings\alorenzom\Documenti\HC3FEM\AbC++Api\experiment.cpp(34)
: error C2475: 'odb_DiscreteEntity::nodeSets' : forming a pointer-to-member req
uires explicit use of the address-of operator ('&') and a qualified name
C:\Documents and Settings\alorenzom\Documenti\HC3FEM\AbC++Api\experiment.cpp(34)
: error C2107: illegal index, indirection not allowed
ABAQUS Error: Problem during compilation - C:\Documents and Settings\alorenzom\D
ocumenti\HC3FEM\AbC++Api\experiment.cpp
The ABAQUS Make execution procedure exited with errors
Can someone help me?