We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Difference between revisions of "Commands"

From LibreCAD wiki
Jump to: navigation, search
(Actions and Commands: added restrictions table)
(Actions and Commands: fixed a few errors // added a few entries // updated table structure to include tool names // updated all tables)
Line 14: Line 14:
 
== Actions and Commands ==
 
== Actions and Commands ==
  
You can press the space-bar or [Ctrl + M] to focus on the command line.
+
You can press the Space-bar or [Ctrl + M] to focus on the command line.
  
You can input a long or short command, or an alias you added to the librecad.alias file.
+
Press Enter after you input a command or an alias you added to the librecad.alias file.
  
The following information is from librecad/src/cmd/rs_commands.cpp
+
Developers (or the curious) can find the commands in [https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/cmd/rs_commands.cpp librecad/src/cmd/rs_commands.cpp]
  
 
=== Draw ===
 
=== Draw ===
Line 24: Line 24:
 
{| class="wikitable"
 
{| class="wikitable"
 
! scope="col" width="128px" | Action
 
! scope="col" width="128px" | Action
! scope="col" width="128px" | Long Commands
+
! scope="col" width="128px" | Tool
! scope="col" width="128px" | Short Commands
+
! scope="col" width="128px" | Commands
 
|-
 
|-
 
| DrawPoint  
 
| DrawPoint  
| point
+
| Points
| po
+
| po, point
 
|-
 
|-
 
| DrawLine  
 
| DrawLine  
| line
+
| Line - 2 Points
| l, li
+
| l, li, line
 
|-
 
|-
 
| DrawPolyline  
 
| DrawPolyline  
| polyline
+
| Polyline - Polyline
| pl
+
| pl, polyline
 
|-
 
|-
 
| DrawLineParallel  
 
| DrawLineParallel  
| offset, parallel
+
| Line - Parallel
| o, pa
+
| o, pa, offset, parallel
 
|-
 
|-
 
| DrawArc3P  
 
| DrawArc3P  
| arc
+
| Arc - 3 Points
| a, ar
+
| a, ar, arc
 
|-
 
|-
 
| DrawCircle  
 
| DrawCircle  
| circle
+
| Circle - Center, Point
| ci
+
| ci, circle
 
|-
 
|-
 
| DrawLineRectangle  
 
| DrawLineRectangle  
| rectangle
+
| Line - Rectangle
| rec, rect, rectang
+
| rec, rect, rectangle
 
|-
 
|-
 
| DrawMText
 
| DrawMText
 +
| Text - MText
 
| mtext
 
| mtext
 +
|-
 +
| DrawText
 +
| Text - Text
 
| text
 
| text
 
|}
 
|}
  
=== Zoom ===
+
=== View ===
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! scope="col" width="128px" | Action
 
! scope="col" width="128px" | Action
! scope="col" width="128px" | Long Commands
+
! scope="col" width="128px" | Tool
! scope="col" width="128px" | Short Commands
+
! scope="col" width="128px" | Commands
 
|-
 
|-
 
| ZoomRedraw
 
| ZoomRedraw
| redraw
+
| Redraw
| zr, rg, regen  
+
| zr, rg, regen, redraw
 
|-   
 
|-   
 
| ZoomWindow
 
| ZoomWindow
| zoom - window
+
| Window Zoom
 
| zw
 
| zw
 
|-
 
|-
 
| ZoomAuto  
 
| ZoomAuto  
| zoom - auto
+
| Auto Zoom
 
| za
 
| za
 
|-
 
|-
 
| ZoomPan  
 
| ZoomPan  
| zoom - pan
+
| Zoom Panning
 
| zp
 
| zp
 
|-
 
|-
 
| ZoomPrevious  
 
| ZoomPrevious  
| zoom - previous
+
| Previous View
 
| zv
 
| zv
 
|}
 
|}
Line 92: Line 96:
 
{| class="wikitable"
 
{| class="wikitable"
 
! scope="col" width="128px" | Action
 
! scope="col" width="128px" | Action
! scope="col" width="128px" | Long Commands
+
! scope="col" width="128px" | Tool
! scope="col" width="128px" | Short Commands
+
! scope="col" width="128px" | Commands
 
|-
 
|-
 
| EditUndo  
 
| EditUndo  
| undo
+
| Undo
| u
+
| u, undo, oo
 
|-
 
|-
 
| EditRedo  
 
| EditRedo  
| redo
+
| Redo
| r
+
| r, redo, uu
 
|-
 
|-
 
| EditKillAllActions  
 
| EditKillAllActions  
| kill
+
| ???
| k
+
| k, kill
 
|}
 
|}
  
 
=== Dimension ===
 
=== Dimension ===
 +
 
{| class="wikitable"
 
{| class="wikitable"
 
! scope="col" width="128px" | Action
 
! scope="col" width="128px" | Action
! scope="col" width="128px" | Long Commands
+
! scope="col" width="128px" | Tool
! scope="col" width="128px" | Short Commands
+
! scope="col" width="128px" | Commands
 
|-
 
|-
 
| DimAligned
 
| DimAligned
| dimension - aligned
+
| Aligned
 
| da
 
| da
 
|-
 
|-
 
| DimLinear
 
| DimLinear
| dimension - linear
+
| Linear
 
| dr
 
| dr
 
|-
 
|-
 
| DimLinearHor
 
| DimLinearHor
| dimension - horizontal
+
| Horizontal
 
| dh
 
| dh
 
|-
 
|-
 
| DimLinearVer
 
| DimLinearVer
| dimension - vertical
+
| Vertical
 
| dv
 
| dv
 
|-
 
|-
 
| DimLeader
 
| DimLeader
| dimension - leader
+
| Leader
 
| ld
 
| ld
 
|}
 
|}
  
=== Restrictions ===
+
=== Modify ===
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! scope="col" width="128px" | Action
 
! scope="col" width="128px" | Action
! scope="col" width="128px" | Long Commands
+
! scope="col" width="128px" | Tool
! scope="col" width="128px" | Short Commands
+
! scope="col" width="128px" | Commands
 
|-
 
|-
| RestrictNothing
+
| ModifyTrim
| restrict - nothing
+
| Trim
| rn
+
| xt, rm
 +
|-  
 +
| ModifyTrim2
 +
| Trim Two
 +
| tm
 
|-
 
|-
| RestrictOrthogonal
+
| ModifyMove
| restrict - orthogonal
+
| Move / Copy
| rr
+
| mv
 
|-
 
|-
| RestrictHorizontal
+
| ModifyBevel
| restrict - horizontal
+
| Bevel
| rh
+
| ch, fillet (bug)
 +
|-
 +
| ModifyMirror
 +
| Mirror
 +
| mi
 
|-
 
|-
| RestrictVertical
+
| ModifyRotate
| restrict - vertical
+
| Rotate
| rv
+
| ro
 +
|-
 +
| ModifyScale
 +
| Scale
 +
| sz
 +
|-
 +
| ModifyStretch
 +
| Stretch
 +
| ss
 +
|-
 +
| ModifyDelete
 +
| Deleted Selected
 +
| er
 +
|-
 +
| BlocksExplode
 +
| Explode
 +
| xp
 
|}
 
|}
  
=== Tool ===
+
=== Snap ===
  
 
{| class="wikitable"
 
{| class="wikitable"
| ToolRegenerateDimensions || dimregen
+
! scope="col" width="128px" | Action
|}
+
! scope="col" width="128px" | Tool
 
+
! scope="col" width="128px" | Commands
=== Modify ===
+
{| class="wikitable"
+
| ModifyTrim || xt, rm, modify - trim (extend)
+
|-
+
| ModifyTrim2 || tm, modify - multi trim (extend)
+
 
|-
 
|-
| ModifyMove || mv, modify - move
+
| SnapFree
 +
| Free Snap
 +
| os, sf
 
|-
 
|-
| ModifyBevel || ch, modify - bevel (chamfer)
+
| SnapGrid
 +
| Snap on Grid
 +
| sg
 
|-
 
|-
| ModifyMirror || mi, modify - mirror
+
| SnapEndpoint
 +
| Snap on Endpoints
 +
| se
 
|-
 
|-
| ModifyRotate || ro, modify - rotate
+
| SnapIntersection
 +
| Snap Intersection
 +
| si
 +
|-  
 +
| SnapCenter
 +
| Snap Center
 +
| sc
 
|-
 
|-
| ModifyScale || sz, modify - scale
+
| SnapMiddle
 +
| Snap Middle
 +
| sm
 
|-
 
|-
| ModifyStretch || ss, modify - stretch
+
| SnapOnEntity
 +
| Snap on Entity
 +
| np, sn
 
|-
 
|-
| ModifyDelete || er, modify - delete (erase)
+
| SnapDist
 +
| Snap Distance
 +
| sd
 
|-
 
|-
| EditUndo || oo, modify - undo (oops)
+
| RestrictNothing
|-
+
| Restrict Nothing
| EditRedo || uu, modify - redo
+
| rn
 
|-
 
|-
| BlocksExplode || xp, modify - explode
+
| RestrictOrthogonal
 +
| Restrict Orthogonal
 +
| rr
 +
|-
 +
| RestrictHorizontal
 +
| Restrict Horizontal
 +
| rh
 +
|-
 +
| RestrictVertical
 +
| Restrict Vertical
 +
| rv
 
|}
 
|}
  
=== Snap ===
+
=== Selection ===
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
| SnapFree || os, snap - none
+
! scope="col" width="128px" | Action
 +
! scope="col" width="128px" | Tool
 +
! scope="col" width="128px" | Commands
 
|-
 
|-
| SnapGrid || sg, snap - grid
+
| DeselectAll
 +
| Deselect All
 +
| tn
 
|-
 
|-
| SnapEndpoint || se, snap - end
+
| SelectAll
|-
+
| Select All
| SnapIntersection || si, snap - intersection
+
| sa
|-
+
| SnapCenter || sn, snap - center
+
|-
+
| SnapMiddle || sm, snap - middle
+
|-
+
| SnapOnEntity || np, snap - nearest point
+
 
|}
 
|}
  
=== Selection ===
+
=== Tool ===
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
| DeselectAll || tn, deselect - all
+
| ToolRegenerateDimensions || dimregen
 
|}
 
|}

Revision as of 23:34, 23 April 2015

Editorial remark: Some redundancy to A_short_manual_for_use_from_the_command_line

Command Alias File

You can define command aliases by changing the alias configuration file and restart LibreCAD.

Windows

  • C:\Users\[USERNAME]\AppData\Local\LibreCAD\librecad.alias

Mac

  • $HOME/Library/Application Support/LibreCAD/librecad.alias

Linux

  • $HOME/.local/share/data/LibreCAD/librecad.alias

Actions and Commands

You can press the Space-bar or [Ctrl + M] to focus on the command line.

Press Enter after you input a command or an alias you added to the librecad.alias file.

Developers (or the curious) can find the commands in librecad/src/cmd/rs_commands.cpp

Draw

Action Tool Commands
DrawPoint Points po, point
DrawLine Line - 2 Points l, li, line
DrawPolyline Polyline - Polyline pl, polyline
DrawLineParallel Line - Parallel o, pa, offset, parallel
DrawArc3P Arc - 3 Points a, ar, arc
DrawCircle Circle - Center, Point ci, circle
DrawLineRectangle Line - Rectangle rec, rect, rectangle
DrawMText Text - MText mtext
DrawText Text - Text text

View

Action Tool Commands
ZoomRedraw Redraw zr, rg, regen, redraw
ZoomWindow Window Zoom zw
ZoomAuto Auto Zoom za
ZoomPan Zoom Panning zp
ZoomPrevious Previous View zv

Edit

Action Tool Commands
EditUndo Undo u, undo, oo
EditRedo Redo r, redo, uu
EditKillAllActions  ??? k, kill

Dimension

Action Tool Commands
DimAligned Aligned da
DimLinear Linear dr
DimLinearHor Horizontal dh
DimLinearVer Vertical dv
DimLeader Leader ld

Modify

Action Tool Commands
ModifyTrim Trim xt, rm
ModifyTrim2 Trim Two tm
ModifyMove Move / Copy mv
ModifyBevel Bevel ch, fillet (bug)
ModifyMirror Mirror mi
ModifyRotate Rotate ro
ModifyScale Scale sz
ModifyStretch Stretch ss
ModifyDelete Deleted Selected er
BlocksExplode Explode xp

Snap

Action Tool Commands
SnapFree Free Snap os, sf
SnapGrid Snap on Grid sg
SnapEndpoint Snap on Endpoints se
SnapIntersection Snap Intersection si
SnapCenter Snap Center sc
SnapMiddle Snap Middle sm
SnapOnEntity Snap on Entity np, sn
SnapDist Snap Distance sd
RestrictNothing Restrict Nothing rn
RestrictOrthogonal Restrict Orthogonal rr
RestrictHorizontal Restrict Horizontal rh
RestrictVertical Restrict Vertical rv

Selection

Action Tool Commands
DeselectAll Deselect All tn
SelectAll Select All sa

Tool

ToolRegenerateDimensions dimregen