0 Replies Latest reply on Aug 19, 2014 10:30 AM by Alan Thomason

    Aligning part in an assembly to origin and planes

    Alan Thomason

      The following entry in the API help section explains how to align parts to the assembly.  This is useful to set a starting point.

      2012 SolidWorks API Help - Align Assembly Component to Assembly Origin and Planes Example (VBA)


      The minute hand and hour hand in the following example reset where I wish them to be, but not the pendulum. 


      The following lines are those that I thought would reorient to zero...

          Set swComp = swAssy.GetComponentByName("Pendulum-1")

          Set swPform = swMathUtil.CreateTransform(Nothing)   ' create unit transform

          swComp.Transform2 = swPform


      Thanks in advance...