# LeadThrough mode programmatically (Rapid or RWS) - Linear/Cartesian mode

**URL:** <https://tech-community.robotics.abb.com/t/leadthrough-mode-programmatically-rapid-or-rws-linear-cartesian-mode/11966>\
**Category:** RobotStudio\
**Tags:** setleadthrough, leadthrough, rws, rapid-code, cobots\
**Created:** [June 30, 2025, 1:52pm UTC](https://tech-community.robotics.abb.com/t/leadthrough-mode-programmatically-rapid-or-rws-linear-cartesian-mode/11966 "2025-06-30T13:52:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KenM](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@KenM](https://tech-community.robotics.abb.com/u/KenM)\
**Post date:** [June 30, 2025, 1:52pm UTC](https://tech-community.robotics.abb.com/t/leadthrough-mode-programmatically-rapid-or-rws-linear-cartesian-mode/11966/1 "2025-06-30T13:52:23Z")

</div>

I know I can set LeadThrough via a rapid command “SetLeadThrough \on” but when doing this it is in all axis’ mode. Is it possible to set it in “Linear/cartesian” mode instead?

I do see LeadThrough is also available to be set in RWS but there is no clear example on the implementation. I appreciate any solutions to this as I want the robot motion to be constrained for my purposes.
