RobotStudio event

Transform i VBA RS 3.0

Options

When i use the transfom function i transfer from world coordinate.

when i recive my transform.x and transform.y

y= xpos of part and x = yPos

How do transfer from USC or localpos.

 

Best regards Klaus

 

 

Best Regards

Klaus Soenderhegn
www.cadalysator.dk

Comments

  • John Wiberg
    Options

    Hi Klaus,

    I would put a little more effort into describing my problem if I where you. image I had to read your post 3 times before I understood what you where asking for.image

    'How to create objects in relative orientations
    Sub CreateTargetInLocalX()
        Dim tgt1 As Target
        Dim tgt2 As Target
        Dim tfmT As New Transform

        Set tgt1 = ActiveStation.Targets.Add
        tgt1.Transform.z = 1
        tgt1.Transform.Ry = UnitToAPI(rsQuantityAngle, 45)
       
        ActiveStation.UCS = tgt1
        Set tgt2 = ActiveStation.Targets.Add
        tfmT.z = ActiveStation.UCS.OffsetTransform.z + 0.5
        tgt2.OffsetTransform = tfmT
        ActiveStation.UCS = ActiveStation
    End Sub

    image