# Moving and rotating blocks via Command Line

**URL:** <https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81>\
**Category:** Support\
**Created:** [August 26, 2026, 9:01pm UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81 "2026-08-26T21:01:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy2K](https://discourse.librecad.org/user_avatar/discourse.librecad.org/andy2k/32/76_2.png) [@Andy2K](https://discourse.librecad.org/u/Andy2K)\
**Post date:** [August 26, 2026, 9:01pm UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/1 "2026-08-26T21:01:55Z")

</div>

Is there a way of moving and rotating blocks via the command line?

OK - I found that once selected, the block can be moved and rotated from the command line (_mv_ and _ro_), and the way to select the block by a command is to have the block as the only entity on a level. Then make that level the only one visible, and then Select All (command is _sa_). The block can then be manipulated from the command line.

So the real question is, can the layers be made visible, or hidden, from the command line?

---

<div class="post-metadata">

**Author:** ![flywire](https://discourse.librecad.org/user_avatar/discourse.librecad.org/flywire/32/24_2.png) [@flywire](https://discourse.librecad.org/u/flywire)\
**Post date:** [August 27, 2026, 8:57am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/2 "2026-08-27T08:57:18Z")

</div>

> [@Andy2K](#):
>
> can the layers be made visible, or hidden, from the command line?

No, use layer widget.

---

<div class="post-metadata">

**Author:** ![sand1024](https://discourse.librecad.org/user_avatar/discourse.librecad.org/sand1024/32/28_2.png) [@sand1024](https://discourse.librecad.org/u/sand1024)\
**Post date:** [August 28, 2026, 2:04pm UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/3 "2026-08-28T14:04:07Z")

</div>

well, yes and no.  
actually in 2.2.2-alpha there is support of a couple of commands in command line that are related to layers (yet support is very limited so far).

**Commands for layers creation and activation**

Two simple commands were added to let management of layers via script file (this addresses [#2092](https://github.com/LibreCAD/LibreCAD/issues/2092))

1. **cslayer** - activates layer with specified name

2. **cnlayer** - creates and activates layer with given name

@Andy2K

Which specific layer’s related actions you’d like be supported via command line and for which use cases?

---

<div class="post-metadata">

**Author:** ![Andy2K](https://discourse.librecad.org/user_avatar/discourse.librecad.org/andy2k/32/76_2.png) [@Andy2K](https://discourse.librecad.org/u/Andy2K)\
**Post date:** [August 29, 2026, 10:31pm UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/4 "2026-08-29T22:31:13Z")

</div>

Thanks, sand1024, cslayer would go a long way to being able to realize my project in LibreCAD - with, of course, its inverse - to deactivate a specific layer.

The other feature I would be looking for is to assign a variable to a point, such as the intersection of a radius with the circumference - say, for example, PointA - and that variable can then be used in other commands, say, for example to draw a line between two such variables - line;PointA;PointB;

How big a task would it be to produce such a function? I ask this before creating a topic for this item.

---

<div class="post-metadata">

**Author:** ![flywire](https://discourse.librecad.org/user_avatar/discourse.librecad.org/flywire/32/24_2.png) [@flywire](https://discourse.librecad.org/u/flywire)\
**Post date:** [August 31, 2026, 6:30am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/5 "2026-08-31T06:30:17Z")

</div>

> [@sand1024](#):
>
> 1. **cslayer** - activates layer with specified name
> 
> 2. **cnlayer** - creates and activates layer with given name

Seems it would have been more appropriate as:

1. **anlayer** - activates layer with specified name

I suppost a **d** prefix could be used to deactivate layers.

---

<div class="post-metadata">

**Author:** ![sand1024](https://discourse.librecad.org/user_avatar/discourse.librecad.org/sand1024/32/28_2.png) [@sand1024](https://discourse.librecad.org/u/sand1024)\
**Post date:** [September 2, 2026, 8:02am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/6 "2026-09-02T08:02:51Z")

</div>

well, as for supporting point variables - well, I’ve planned something similar.

However, simple variables (i.e double values) are already supported. Cmd widget uses internally muParser library -[](https://beltoforion.de/en/muparser/features.php)[Feature Overview of the muparser math parser library](https://beltoforion.de/en/muparser/features.php)

## And it’s possible to define variable first as

**User-defined variables.**

- unlimited in number
- definable at parser runtime by the parser: `abc=123`
- assigning variables in terms of other variables is possible

* * *

And later refer it.

So instead of storing point (i.e (x,y) pair) as single variable - for now you may rely on 2 variables (for x and y), and so on.

Yet that area will be improved in one of nearest updates.

---

<div class="post-metadata">

**Author:** ![sand1024](https://discourse.librecad.org/user_avatar/discourse.librecad.org/sand1024/32/28_2.png) [@sand1024](https://discourse.librecad.org/u/sand1024)\
**Post date:** [September 2, 2026, 8:04am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/7 "2026-09-02T08:04:54Z")

</div>

oh, and one more thing.

For feature requests and bug reports, it’s better to use the project’s tracker on GitHub - [Issues · LibreCAD/LibreCAD · GitHub](https://github.com/LibreCAD/LibreCAD/issues) and report them directly there.

---

<div class="post-metadata">

**Author:** ![sand1024](https://discourse.librecad.org/user_avatar/discourse.librecad.org/sand1024/32/28_2.png) [@sand1024](https://discourse.librecad.org/u/sand1024)\
**Post date:** [September 2, 2026, 8:06am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/8 "2026-09-02T08:06:29Z")

</div>

I think I’ll add UI configurator for commands in one of update. and yes, current commands naming should be revised and cleaned up.

---

<div class="post-metadata">

**Author:** ![flywire](https://discourse.librecad.org/user_avatar/discourse.librecad.org/flywire/32/24_2.png) [@flywire](https://discourse.librecad.org/u/flywire)\
**Post date:** [September 2, 2026, 8:52am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/9 "2026-09-02T08:52:00Z")

</div>

> [@sand1024](#):
>
> UI configurator for commands

[`librecad.alias`](https://docs.librecad.org/en/latest/guides/cmdline.html#command-aliases) configuration file ??

---

<div class="post-metadata">

**Author:** ![sand1024](https://discourse.librecad.org/user_avatar/discourse.librecad.org/sand1024/32/28_2.png) [@sand1024](https://discourse.librecad.org/u/sand1024)\
**Post date:** [September 3, 2026, 11:13am UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/10 "2026-09-03T11:13:16Z")

</div>

yes, that alias file seems to be unknown to lots of users, plus manual editing of it could be error prone. In general, there are room for improvement of internal actions management, so most probably editing of such mapping will be part of such improvement.

---

<div class="post-metadata">

**Author:** ![Andy2K](https://discourse.librecad.org/user_avatar/discourse.librecad.org/andy2k/32/76_2.png) [@Andy2K](https://discourse.librecad.org/u/Andy2K)\
**Post date:** [September 3, 2026, 2:58pm UTC](https://discourse.librecad.org/t/moving-and-rotating-blocks-via-command-line/81/11 "2026-09-03T14:58:48Z")

</div>

Wow!

There’s a lot of stuff to process here!

Give me a couple of days or so to get my head around this and I’ll get back to you 🙃
