Moving and rotating blocks via Command Line

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?

No, use layer widget.

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)

  1. cslayer - activates layer with specified name

  2. cnlayer - creates and activates layer with given name

    It’s described there (description of PR) - Misc fixes 1 by sand1024 · Pull Request #2114 · LibreCAD/LibreCAD · GitHub

@Andy2K

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

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.

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.

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 - Feature Overview of the muparser math parser library

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.

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 and report them directly there.

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

librecad.alias configuration file ??

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.

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 :upside_down_face: