I am new to coding in Python for Abaqus, and I am trying to create a for loop, where I can create X number of instances based on a part, I have made. Furthermore, I would like to update the naming of the X instances.
Currently, when I manually create four instances based on the part CenMid, the code looks like this
mdb.models[panelName].rootAssembly.Instance(dependent=ON, name='CenMid-1',
part=mdb.models[panelName].parts['CenMid'])
mdb.models[panelName].rootAssembly.Instance(dependent=ON, name='CenMid-2',
part=mdb.models[panelName].parts['CenMid'])
mdb.models[panelName].rootAssembly.Instance(dependent=ON, name='CenMid-3',
part=mdb.models[panelName].parts['CenMid'])
mdb.models[panelName].rootAssembly.Instance(dependent=ON, name='CenMid-4',
part=mdb.models[panelName].parts['CenMid'])
This is the code, I would like to transform to a loop, so that I simply can choose X instances and X instances will be created with the respective name, instead of this "hard coding" solution.
Thank you in advance!