How can rotate and translate a component at the same time ?

Discussion in 'SolidWorks' started by Mike Domingue, Feb 8, 2004.

  1. I have written VB code using the Solidworks API and Drag operator.

    My goal is to move a component round a curved part. However, it does
    not move as it should.

    I have defined a Maths transform that includes both a rotation and
    transformation.
    However, we I run the program it moves the component but the rotation
    is not round the axis I set. Instead it rotates around the assembly
    origin (0, 0, 0)

    I have checked the solidworks help on using the Mathtransform object
    and I have successfully used

    Set swXform = swMathUtil.CreateTransformRotateAxis(Rot_Origin,
    Rot_Axis, Rad_Angle)

    which rotates a component around a given origin.

    I have also used the object below to translate objects

    Set swXform = swMathUtil.CreateTransform((v3Dform))

    How can I use these combinations of objects and APIs to create a move
    that both translates and rotates an object around a origin different
    from the Assembly origin (0,0,0)?
     
    Mike Domingue, Feb 8, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.