Python: How to avoid using reference numbers ("Keys") -- or allocate them manually?
Python: How to avoid using reference numbers ("Keys") -- or allocate them manually?
(OP)
Hi,
When I create parts, reference points, planes, etc. Abaqus allocates random reference numbers, which are addressed by following commands to e.g. change the properties. For example: a.rootAssembly.datums[10].
Question 1: Is there a way to allocate these numbers manually rather than "randomly"? Or at least find out the number that is allocated directly after creating, e.g. the datum plane? The problem is that, when I change something at the beginning of my code, all the following numbers change.
Question 2: Using findAt, BoundingBox, etc. I can avoid using these numbers and address the feature geometrically. However, some features, such as datum planes, don't have the attribute findAt. How can I allocate these features without (knowing) the number?
Thanks so much!
When I create parts, reference points, planes, etc. Abaqus allocates random reference numbers, which are addressed by following commands to e.g. change the properties. For example: a.rootAssembly.datums[10].
Question 1: Is there a way to allocate these numbers manually rather than "randomly"? Or at least find out the number that is allocated directly after creating, e.g. the datum plane? The problem is that, when I change something at the beginning of my code, all the following numbers change.
Question 2: Using findAt, BoundingBox, etc. I can avoid using these numbers and address the feature geometrically. However, some features, such as datum planes, don't have the attribute findAt. How can I allocate these features without (knowing) the number?
Thanks so much!





RE: Python: How to avoid using reference numbers ("Keys") -- or allocate them manually?
CODE -->
>>> a = mdb.models['Model-1'].rootAssembly >>> x = a.DatumPlaneByPrincipalPlane(principalPlane=XYPLANE, offset=2.0) >>> print x ({'children': '', 'id': 5, 'isOutOfDate': False, 'name': 'Datum plane-2', 'offset': 2.0, 'parents': '', 'path': 'unknown', 'sketch': 'unknown'})RE: Python: How to avoid using reference numbers ("Keys") -- or allocate them manually?
Thank you so much!