If you enjoy trying to spot bugs in the API, with unexpected behaviour: checkout the Tekla API.
The following does not move the object. Can you discern why?
// set up second beam_moved_geometrically
Beam beam2manuallyTransformed = beamFactory(startPointFactory(), endPointFactory(), "2"); // orange class string
beam2manuallyTransformed.Insert();
Matrix matrix = BeamExtensions.FromObjectToObjectTransformationMatrix(cs1, cs2);
Operation.MoveObject(beam2manuallyTransformed, cs1, cs2);
beam2manuallyTransformed.Modify();
beam2manuallyTransformed.Select(); // update memory
model.CommitChanges();// set up second beam_moved_geometrically
Beam beam2manuallyTransformed = beamFactory(startPointFactory(), endPointFactory(), "2"); // orange class string
beam2manuallyTransformed.Insert();
Matrix matrix = BeamExtensions.FromObjectToObjectTransformationMatrix(cs1, cs2);
Operation.MoveObject(beam2manuallyTransformed, cs1, cs2);
beam2manuallyTransformed.Modify(); // <----------------------------------- THIS IS THE CULPRIT! - Remove it!
beam2manuallyTransformed.Select(); // update memory
model.CommitChanges();So you have transformed an object. But it is not moving. Why not?
You called Modify. And that negates the entire operation. In fairness to Tekla, they do have a note in the documentation:
Note that the object is moved and updated in the view so ModelObject.Modify() is not needed. Call Modify() only after the object's data has been updated with the ModelObject.Select() method.