Update of identical PythonParts¶
After a PythonPart has been changed, Allplan checks within the drawing file for PythonParts with the same name and the same original parameter values. If such PythonParts are found, the following message appears:
Depending on the button clicked, the identical PythonParts are updated.
In some cases it makes sense to exclude parameters from the identical check, because these parameter are e.g. only needed for the placement of the PythonPart inside the model. An example is shown in the files
…\etc\Examples\PythonParts\BasisExamples\IdenticalRotatedPlate.pyp…\etc\PythonPartsExampleScripts\BasisExamples\IdenticalRotatedPlate.py
In this example, a plate can be placed by rotation angles. If all parameters are used for an identical check, plates with identical geometry, but not identical rotation angles will not be found as Identical PythonParts. To avoid this, parameters can be excluded from the identical check by adding the tag
<ExcludeIdentical>False</ExcludeIdentical>
to the parameters.
In addition, the local transformation of the PythonPart, e.g. by the rotation angles, must be included in a local placement matrix of the PythonPart. Further information can be found in the example files.