Hi,
the phenomenon you are encountering is the result of how the data of PythonPart elements is saved in an ALLPLAN drawing file. More on that in this article
Basically, a PythonPart element is saved in DF with two entries:
- definition - contains geometry
- placement - contains location
So when you have 100 identical PythonPart elements in a drawing file, their geometry is saved once. This saves a lot of disk space.
ALLPLAN needs to know, what PythonPart elements are identical and it is done with the help of a hash which is saved in the definition. The hash is generated solely based on parameter values.
What happens here:
- You created a PythonPart element with a hash XYZ
- You changed a hard coded value in the script (you didn't change any parameter -> hash stays the same)
- You placed the PythonPart element again. It has new geometry, but the same hash
- ALLPLAN finds the first PythonPart element and notices, the hash is the same, so it uses the definition of this PythonPart. It doesn't matter, that the definition contains different geometry. What matters is the hash
I hope that explains the phenomenon to you.
NOTE: creating a new PythonPart element creates placement and definition, but deleting it deletes only placement. It may happen, that there are definitions in the database, but no placements referring to it. Pressing CTRL+F5 removes unreferenced definitions.
Cheers,
Bart