# Set RsRobtarget Orientation by quaternion

**URL:** <https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430>\
**Category:** RobotStudio\
**Created:** [September 28, 2011, 6:59pm UTC](https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430 "2011-09-28T18:59:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IRB120](https://avatars.discourse-cdn.com/v4/letter/i/bbce88/32.png) [@IRB120](https://tech-community.robotics.abb.com/u/IRB120)\
**Post date:** [September 28, 2011, 6:59pm UTC](https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430/1 "2011-09-28T18:59:58Z")

</div>

Hi,how can i set the RsRobtarget orientation as a quaternion?I tried with  
Quaternion q\_t3sx = new Quaternion(0.916670034199826,0.0811690875386569,0.241895443865017,-0.307594248752441);

target.Frame.Matrix.Quaternion.Add(q\_t3sx);

but the orientation still remains the default one.

---

<div class="post-metadata">

**Author:** ![jesbox](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jesbox](https://tech-community.robotics.abb.com/u/jesbox)\
**Post date:** [September 30, 2011, 8:56am UTC](https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430/2 "2011-09-30T08:56:12Z")

</div>

Hi there,  
Maybe IA’ve misunderstood your question but.

Is this what you are looking for?

VAR robtarget pRobtarget := [[…

pRobtarget.rot.q1 := 0.916670034199826;  
and so on…

---

<div class="post-metadata">

**Author:** ![IRB120](https://avatars.discourse-cdn.com/v4/letter/i/bbce88/32.png) [@IRB120](https://tech-community.robotics.abb.com/u/IRB120)\
**Post date:** [September 30, 2011, 10:48am UTC](https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430/3 "2011-09-30T10:48:59Z")

</div>

No, i was referring to the C# API and not to the Rapid Editor.Have you any idea about that?

---

<div class="post-metadata">

**Author:** ![jesbox](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jesbox](https://tech-community.robotics.abb.com/u/jesbox)\
**Post date:** [September 30, 2011, 11:19am UTC](https://tech-community.robotics.abb.com/t/set-rsrobtarget-orientation-by-quaternion/4430/4 "2011-09-30T11:19:52Z")

</div>

Oh,

Im sorry, I just read the question an not your code…

If it’s the PC SDK, my experince is that the functions you have in the rapid editor, You also can reach from the PC SDK.

I haveA’nt used the SDK enough to be absolutely sure…  
And I have no example code but…

In the namespace ABB.Robotics.Controllers.RapidDomain:  
You have the type “Robtarget” and to that a member called “Rot”.

I think that this is a similar function to the one in the Rapid editor.

Maybe itA’s worth a try…
