This occurs in A2plus, using python on selected part and constraints.
So First.
I have a group containing 3 imported Parts.
Those parts have constraints between themselves
I select all the parts and constraints in the group, as per picture Then I create a copy of the selected elements (copy and paste od "Duplicate Selection" command in the Edit Menu) The copied parts have wrong constraints : the constraints point to the original elements in the group Group
To try to have the constraint correcly repluged to the right parts I tried to run this code:
Code: Select all
obj1=FreeCADGui.Selection.getSelection()[0]
obj2=FreeCADGui.Selection.getSelection()[1]
obj1.Object1=obj1.ParentTreeObject.Name
obj1.Object2=obj2.Name
...
Unfortunately this code does not work as expected:
Yes, i am able to replug the constraint correctly
BUT randomly, some of the original constraints are modified too
In the below example, I selected the constraint axisCoincident_001__tubo_MEDIO_Corrente_002 and the part tubo_MEDIO_Corrente_002
And as per picture, the constraint axisCoincident_001__tubo_BASSO_Corrente_001 has been modified too
Any explanation will be welcome, on why the code does not work
Thank You