Context: I am trying to make a script in Abaqus that will automatically create partitions between vertices for all faces. The partitioning won't be perfect, but the users will be able to delete the extra partitioning easily.
Problem:
v1 looks like a dictionary
({'featureName': 'Solid extrude-1', 'index': 1, 'instanceName': None, 'isReferenceRep': False, 'pointOn': ((10.0, -10.0, 20.0),)})
so I tried to sort it by its indices (line 5)
How do I get the indices i.e. 'index':1 of a vertex type object in ABAQUS?
>>> p = mdb.models[myString].parts[myPart]
>>> f = p.faces
>>> pickedFaces = f[:]
>>> v1, e1, d1 = p.vertices, p.edges, p.datums
>>> pickedFaces_r=sorted(pickedFaces, key = lambda k:k['index'], reverse=True)
#reverse picked faces due to additional faces and nodes problem
TypeError: 'Face' object has no attribute '__getitem__'
My attempt at debugging
>>> print(v1[1])
({'featureName': 'Solid extrude-1', 'index': 1, 'instanceName': None, 'isReferenceRep':
False, 'pointOn': ((10.0, -10.0, 20.0),)})
#It looks like a dictionary so I thought it was one.
>>> print(v1[1].get['index'])
**AttributeError: 'Vertex' object has no attribute 'get'**
>>> a=v1[1]
>>> print(a.get['index'])
**AttributeError: 'Vertex' object has no attribute 'get'**
>>> print(a.values())
**AttributeError: 'Vertex' object has no attribute 'values'**
>>> print(type(a))
<type 'Vertex'>