×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Abaqus C++ API to access an ODB

Abaqus C++ API to access an ODB

Abaqus C++ API to access an ODB

(OP)
I wrote a C++ post-processing program (I copied instructions written in abaqus documentation):

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?

RE: Abaqus C++ API to access an ODB

See:

odb_Set& nodeSet =  instance.nodeSets["PUNCH"];

try

odb_Set& nodeSet = instance.nodeSets()["PUNCH"];


instead.

RE: Abaqus C++ API to access an ODB

(OP)
Sorry for my stupidity!

Thank you so much

RE: Abaqus C++ API to access an ODB

(OP)
It may be another of my stupid questions ... but I don't know how can I execute my c++ post processing program now that I have my .exe and .obj files.

RE: Abaqus C++ API to access an ODB

Maybe using the command prompt ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources