icantdrive55
Mechanical
Hello,
New to this forum but not to ABAQUS. I am in the very early stages of learning python and am attempting to write a script that will read and print the element labels (and eventually the connectivity) for a specified element set (EPOWER) from an odb. There is an example in the manuals similar to what I'm attempting, but I was unable to get it to work for my specific case. My python script is as follows:
---------------
from odbAccess import *
from abaqusConstants import *
from textRepr import *
import math
import sys, os
import numpy.oldnumeric as Numeric
import profile
from abaqusExceptions import excTyValStr
# Specify the odb filename (w/o .odb extension)
odb = openOdb('Job-1.odb')
ElemSetData = odb.rootAssembly.elementSets['EPOWER']
# Extract the connectivity for all elements in EPOWER
prettyPrint(ElemSetData.elements,3)
for iele in ElemSetData.elements:
print iele.label
---------------------------------
The error I get is:
AttributeError: 'OdbMeshElementArray' object has no attribute 'label'
The prettyPrint statement clearly shows that the attribute label is present. Any help with what is probably a rookie error would be appreciated.
Regards,
Scott
New to this forum but not to ABAQUS. I am in the very early stages of learning python and am attempting to write a script that will read and print the element labels (and eventually the connectivity) for a specified element set (EPOWER) from an odb. There is an example in the manuals similar to what I'm attempting, but I was unable to get it to work for my specific case. My python script is as follows:
---------------
from odbAccess import *
from abaqusConstants import *
from textRepr import *
import math
import sys, os
import numpy.oldnumeric as Numeric
import profile
from abaqusExceptions import excTyValStr
# Specify the odb filename (w/o .odb extension)
odb = openOdb('Job-1.odb')
ElemSetData = odb.rootAssembly.elementSets['EPOWER']
# Extract the connectivity for all elements in EPOWER
prettyPrint(ElemSetData.elements,3)
for iele in ElemSetData.elements:
print iele.label
---------------------------------
The error I get is:
AttributeError: 'OdbMeshElementArray' object has no attribute 'label'
The prettyPrint statement clearly shows that the attribute label is present. Any help with what is probably a rookie error would be appreciated.
Regards,
Scott