PeterP1
Materials
- Mar 27, 2009
- 9
Hello!
I'd like to assign each element on an edge to a set. It's quite easy to get access to the element objects and to adress each element object by the intenal labels. The problem is that for set definitions tupels are needed and not objects. Therefore, the following code leads to an error message: "found MeshElement, expecting Tuple"
Does anyone know a solution to this problem?
c1=mdb.models['Model-1'].rootAssembly
c1.Set(elements=c1.sets['Edge'].elements, name='Elements')
for i in range(len(c1.sets['Elements'].elements)):
c1.Set(elements=c1.sets['Edge'].elements, name='Element'+str(i))
I'd like to assign each element on an edge to a set. It's quite easy to get access to the element objects and to adress each element object by the intenal labels. The problem is that for set definitions tupels are needed and not objects. Therefore, the following code leads to an error message: "found MeshElement, expecting Tuple"
Does anyone know a solution to this problem?
c1=mdb.models['Model-1'].rootAssembly
c1.Set(elements=c1.sets['Edge'].elements, name='Elements')
for i in range(len(c1.sets['Elements'].elements)):
c1.Set(elements=c1.sets['Edge'].elements, name='Element'+str(i))