79634521

Date: 2025-05-22 20:55:03
Score: 0.5
Natty:
Report link

This issue can be resolved by using the .SetComponents method instead of .Move, as it provides the correct behavior in this context. The .Move method applies a relative transformation based on the part’s current position, while .SetComponents sets the absolute position of the part with respect to the global axis system.



Dim arrayOfVariantOfDouble1(11)
arrayOfVariantOfDouble1(0) = XCoord(0)
arrayOfVariantOfDouble1(1) = XCoord(1)
arrayOfVariantOfDouble1(2) = XCoord(2)

arrayOfVariantOfDouble1(3) = YCoord(0)
arrayOfVariantOfDouble1(4) = YCoord(1)
arrayOfVariantOfDouble1(5) = YCoord(2)

arrayOfVariantOfDouble1(6) = ZCoord(0)
arrayOfVariantOfDouble1(7) = ZCoord(1)
arrayOfVariantOfDouble1(8) = ZCoord(2)

arrayOfVariantOfDouble1(9) = Position(0)
arrayOfVariantOfDouble1(10) = Position(1)
arrayOfVariantOfDouble1(11) = Position(2)

Dim productToMoveObject As Object
Set productToMoveObject = productToMove.Position
productToMoveObject.SetComponents arrayOfVariantOfDouble1
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: balla.zoltan