A short manual for use from the command line

From LibreCAD wiki
Jump to: navigation, search

Written by Stano Sitar. WORK IN PROGRESS


Introduction

This is intended for AutoCAD veterans that are trained in using commandline and for people that want to draw by entering commands. This can be faster and/or more precise than drawing using exclusively mouse and icons.

LibreCAD is designed with emphasis on mouse-clicking input, and some options can be at the moment only selected by clicking, not by typing on commandline.

Where did I get material for writing this very short manual?

Well, I saw that there was no suitable material apart from the Qcad manual that is copyrighted and can't be used as a base for LibreCAD manual. So I have downloaded source code from http://librecad.org/cms/home/from-source/linux.html and found file rs_commands.cpp that listed all the commands. Then I proceed to try all the commands out in LibreCAD keeping notes. I have lots of experience with other CAD programs, especially with AutoCAD so I tried some obvious possibilities, like relative and angular coordinates.

Using the Commandline

For LibreCad ver. 1.x.y you have to press Ctrl+M to get to the commandline editing mode, in Version 2.x.y you can also press space.

You can also click on line next to Command: prompt at the bottom of the screen.

When the Commandline is active and ready to get characters typed on keyboard the Command: prompt at the bottom of the screen turns blue. So now when you press a key you are entering commands.

You press Escape key to leave commandline and another Escape to cancel what you have written on the commandline.

It is possible to enter partial command, like cir and press Tab to have the command completed to circle. If you type too short segment of command, such as c and press Tab, you get prompted ch, circle to show you that the command segment you typed in isn't unique and to show you what are possible completitions.

Many commands prompt you on commandline asking for further input. They tell you what input they expect - a point for example - and list other possibilities in the square bracket. For example if you type command polyline and draw at least two segments you get prompted Specify next point or [undo/close]. This means that the program is expecting a point (from commandline or by clicking on drawing area), or you can select Undo or Close option. You can do that by typing on commandline of by clicking on buttons on context toolbar called Tool Options.

When there is some value already set and valid, for example when you use command offset, the current value is in sharp brackets, like so: Specify distance <5> or select entity or [Through]. So you see that value for offset is 5 and you can either set a new value by typing it into commandline or using Tool Options toolbar or you can start drawing parallel entities.

Every command I describe below has a long format and a short format. For example command for drawing a line has three formats:
line
li
l
To use the long format line you have to activate the commandline by clicking on the commandline or by pressing Ctrl+M (on LibreCAD 2 also by pressing space)
To use the two letter format li you do not have to activate the commandline. Just type li and LibreCAD displays the prompt. If you wish to continue drawing with just mouse input, you click on drawing to enter the point, or click on the tools palette to select the snap mode or whatever. If you wish to continue using keyboard input you have to activate the commandline by clicking on the commandline or by pressing Ctrl+M (on LibreCAD 2 also by pressing space).

Drawing entities

Drawing a point

point
po
Specify location
You type point or po on the commandline. LibreCad prompts you to with "Specify Location".

The main toobar on the left changes to the snap selection where you can select icons for Free positioning, Snap to grid, Snap to Enpoints and so on.

After selecting apropriate snapping option on the main toolbar you can respond by clicking with the mouse on drawing area to enter points.

Or you can use commandline to select an option like sc - snap to center, sn - snap none, sg - snap grid and then proceed with clicking with the mouse on drawing area to enter points. See chapter Snapping for all the options that can be entered from the commandline.

Or you can enter points using following syntax

10,20[enter] - to place point at coordinates x=10, y=20 from the origin - point x=0, y=0

@30,40[enter] - to place point at coordinates that are at distance x=30, y=40 from the last drawn point. So when I draw two points 10,20 and then @30,40 the first point is locted at the x=10, y=20 and the second at x=10+30=40 and y=20+40=60.

50<45[enter] - to place point at the distance 50 from origin, at 45 angle degree. The positive x axis is at 0 degrees, the positive y axis is at 90 degrees. So degrees are measured at counter clockwise direction from horizontal.

@ 60<15[enter] - to place point at the distance 60 at 15 angle degree from the last drawn point.

Line from rs_commands.cpp: "point", RS2::ActionDrawPoint; "po", RS2::ActionDrawPoint;

Drawing a line

line
li
l
Specify first point
Specify next point
Specify next point or [undo]
You type line or li or l on the commandline. LibreCad prompts you to with "Specify first point".

The main toobar on the left changes to the snap selection where you can select icons for Free positioning, Snap to grid, Snap to Enpoints and so on.

After selecting apropriate snapping option on the main toolbar you can respond by clicking with the mouse on drawing area to enter point.

Or you can use commandline to select an option like sc - snap to center, sn - snap none, sg - snap grid and then proceed with clicking with the mouse on drawing area to enter point. See chapter Snapping for all the options that can be entered from the commandline.

Or you can enter points from commandline using syntax described in Drawing a point

After you enter a point, LibreCAD propmts for "specify next point" and you finish drawing the first line in "chain" by entering a point by mouse or keyboard.

For the next point LibreCAD prompts you "specify next point or [undo]". Here you can continue to draw next segment of line, or undo the previous segment. When you type in undo or u LibreCAD un-does the last segment (and will complain "Unknown command: u" - which is clearly a bug.). You can also use Ctrl-z shortcut.

If there are at least two segments drawn, the prompt for line is specify next point or [undo/close] and you can "close" the line - draw a segment to the point where you started. To finish drawing lines you press [Esc]

Please notice, that line is different from polyline. They are drawn in a very similar manner, but when you want to edit a line - copy, delete or move, you have to select all segments of line one-by-one. Multiple segments are just individual lines. With polyline - all segments are one entity that can be selected with one click.

Line from rs_commands.cpp: "line", RS2::ActionDrawLine; "ln", RS2::ActionDrawLine; "l", RS2::ActionDrawLine;

Drawing a polyline

polyline
Specify first point
Specify next point
Specify next point or [undo]
You type polyline on the commandline. LibreCad prompts you to with "Specify first point".

You draw polyline exactly as you would draw a line (see above). The only difference is that all the segments of polyline are a single entity.

Line from rs_commands.cpp: "polyline", RS2::ActionDrawPolyline;

Drawing a line or other entity with an offset

offset
o
Specify distance <1> or select entity ot [Through]
You type offset or o on the commandline. LibreCad prompts you to with "Specify distance <1> or select entity ot [Through]". You can enter number from commandline or using Tool Options toolbar, you can select Through option. The default action is to click near an entity, indicating what side you wish to place the offset on. Offset works on lines, polylines (but only on one segment), circles, arcs, polygons (but only on one segment). Offset doesn't work on ellipses, bezier curves (here it kinda-sorta works but not the way you might expect)

Line from rs_commands.cpp: "offset", RS2::ActionDrawLineParallel; "o", "offset", RS2::ActionDrawLineParallel;

Drawing parallel lines

parallel
par
Specify distance <1> or select entity ot [Through]
You type parallel or par on the commandline.

This seems to be the same functionality as offset command.


Line from rs_commands.cpp: "parallel", RS2::ActionDrawLineParallel; "par", "parallel", RS2::ActionDrawLineParallel;


Drawing an arc

arc
a
Specify startpoint or [center]
Specify second point
Specify endpoint
or
Specify startpoint or [center]
center Specify center
Specify redius
Specify start angle
Specify end angle or [Angle/Chord length]
You type arc or a on the commandline. LibreCAD propmts you "Specify startpoint or [center]". Here you can enter point for center, either by clicking on screen or by typing coordinates or type center and enter center. If you enter start point you are prompted to enter second and third point. LibreCAC draws an arc from the first point through the second point to the third one. If you select "center" you are prompted to enter a center and then radius. After entering radius you are prompted for the starting point. Arcs drawn by center - radius - start point method always go counterclockwise from the start point.

Line from rs_commands.cpp: "arc", RS2::ActionDrawArc3P; "a", RS2::ActionDrawArc3P;

Drawing a circle

circle
ci
Specify center
Specify radius
You type circle or ci on the commandline. LibreCAD propmts you "Specify center". Here you can enter point for center, either by clicking on screen or by typing coordinates or type center and enter center. LibreCAC then prompts you for a radius. Please note than when you use toolbar, there are more possibilities for drawing a circle. Center and point, center and radius (that you enter using tool options toolbar), two opposite points, three points (LibreCAD draws a circle circumscribed to the triangel) and finally Concentric option (that is really just a parallel command in disguise).

Line from rs_commands.cpp: "circle", RS2::ActionDrawCircle; "ci", RS2::ActionDrawCircle;

Drawing a rectangle

rectangle
rec
rectang
Specify first corner
Specify second corner
You type rectangle or rectang or rec on the commandline. LibreCAD propmts you "Specify first corner". Here you can enter point for one of the corners of the rectangle, either by clicking on screen or by typing coordinates. LibreCAD then prompts you for an opposite corner.

Line from rs_commands.cpp: "rectangle", RS2::ActionDrawLineRectangle; "rec", RS2::ActionDrawLineRectangle; "rectang", RS2::ActionDrawLineRectangle;

Drawing a text object

text
Specify insertion point
You type text on the commandline. LibreCAD presents a dialog box, where you can select Font, Height, Line spacing, Alignment, and Angle of the text. You type the desired text to the multiline edit box. Above the edit box there are icons that will let you clear, copy or paste text, save text to file or load it from file. Under the edit box there are droplists to help you with entering symbols, such as diameter or unicode characters. After filling in the dialog box, you are presented with prompt "Specify insertion point". You specify a point using any of the above described ways. After entering the point, the text is inserted in place and you are prompted again to "Specify insertion point".

Line from rs_commands.cpp: "text", RS2::ActionDrawText;


Zooming

Redrawing the screen

regen
rg
zr
You type regen or rg or zr (abbreviation of the Zoom Regen command) on the commandline. LibreCAD redraws the screen. You can use this command, or appropriate icon from the View toolbar to tell LibreCAD to redraw the screen.

Line from rs_commands.cpp: "regen", RS2::ActionZoomRedraw; "rg", "zoom - redraw", RS2::ActionZoomRedraw; "zr", "zoom - redraw", RS2::ActionZoomRedraw;

Zooming using mousewheel

When zooming in and out around the drawing you will most probably use mainly mousewheel. Just point the cursor to the desired detail and scroll the mousewheel forward to zoom in. Scroll the mousewheel backward to zoom out of the drawing

Zooming keyboard shortcuts

Just like in the original Photoshop and also in Firefox and chroome browsers you can use keyboard shortcuts Ctrl + + and Ctrl + - to zoom in and out of the drawing. This is different than using a mousewheel, because this zoom is always centered in the center of the screen.

Zooming into selected area of the drawing

zw
Specify the first edge
the second edge
You type zw (abbreviation of the Zoom Window command) on the commandline. LibreCAD prompts you to specify the first edge and then the second edge. Then it displays the selected area on the entire drawing window. This is a very traditional way of viewing the drawing details dating many many years back to the times before AutoCAD 10 was released. Nowadays it is often quicker and more comfortable to use mouse with a wheel and zoom in and out by using scrollwheel. By pressing the scrollwheel (or a middle button on mouse) you can also pan around the drawing.

Line from rs_commands.cpp: "za", "zoom - auto", RS2::ActionZoomWindow;

Zooming to display entire drawing

za
the command has no further prompt
You type za (abbreviation of the Zoom All command) on the commandline. LibreCAD sets the zoom factor so that you can see your entire drawing - all the entities.

Line from rs_commands.cpp: "za", "zoom - auto", RS2::ActionZoomAuto;


Zooming to the previous view

zv
the command has no further prompt
You type za (abbreviation of the Zoom preVious command) on the commandline. LibreCAD sets the zoom factor so that you "undo" the last zoom.

Line from rs_commands.cpp: "zv", "zoom - previous", RS2::ActionZoomPrevious;

Panning using mousewheel

When zooming and panning around, the quickest and the most convenient way is to use the mousewheel. Just press it down and you can pan around the drawing in realtime. This is very effective when combined with mousewheel zoom in and zoom out functionality.

Panning

zp
click and drag to pan zoom
You type zp (abbreviation of the ZoomPan command) on the commandline. LibreCAD prompts you to click and drag to pan. This is a very traditional way of panning around the drawing dating many many years back to the times before AutoCAD 10 was released. This command has the big disadvantage that after one grab and drag you are out of the command. So it is much more convenient to use mouse with a wheel and pan with the wheel pressed down you can also zoom in and out by using scrollwheel.

Line from rs_commands.cpp: "zp", "zoom - pan", RS2::ActionZoomPan;


Edit commands

kill

kill
k
the command has no further prompt
I can't figure out what this command does. Please edit this Wiki if you have any idea what it does.

"kill", RS2::ActionEditKillAllActions; "k", RS2::ActionEditKillAllActions;

Undo and Redo using keyboard shortcuts

You can use Ctrl+z and Ctrl+y to undo and redo changes. This is quicker and more convenient than using the next two commands.

Undo

undo
u
the command has no further prompt
You type undo on the commandline. LibreCAD reverts the last change you have made to the drawing. You can repeat the undo command, and every time you use it it takes you one step back through the history of your drawing/edit. Unlike other programs (AutoCAD) the undo command doesn't revert the zoom and pan commands.

"undo", RS2::ActionEditUndo; "u", "undo", RS2::ActionEditUndo;


Redo

redo
r
the command has no further prompt
You type undo on the commandline. LibreCAD cancels the last undo you have made. When you use the undo, it is easy to do one step too much undo. Using redo you can revert undo. This lets you go back and forth in the edit history.

"redo", RS2::ActionEditRedo; "r", RS2::ActionEditRedo;


drawing dimensions

LibreCad has tools that make drawing dimensions much easier. To modify the default dimensions you can change the preferences. Click on the Drawing menu and select Current drawing preferences. A dialog panel will appear. In the preferences dialog panel select tab Dimensions. Here you can set:

  • text height - this is the height of the text of the dimension
  • extension line extension - this is the distance that extension line goes over the dimension line
  • extension line offset - this is the distance between the beginning of the extension line and the object you are dimensioning. This is important for the readability of the outline of the drawn object.
  • extension line gap - this is the distance between the text and the dimension line
  • arrow size

Drawing aligned dimension

da
Specify first extension line origin
Specify second extension line origin
Specify dimension line location
You type da (abbreviation for Dimension Aligned) on the commandline. LibreCAD propmts you "Specify first extension line origin". Here you can enter point for the first extension line origin, either by clicking on screen or by typing coordinates typically you use some snap to place the dimension exactly on the point you wish to dimension. LibreCAC then prompts you for the second extension line origin. After specifying the second extension line origin you are propmted for dimesnion line location.
Aligned dimension runs parallel to the line between the two extension line origins.
You use Aligned dimension when you need to indicate the length of the line that runs at the angle. You can also use it for horizontal or vertical lines, but for that you have specialized commands - see below.
You are not given a chance to select a line and have it dimensioned automatically like you can with the AutoCAD.
After issuing command da or clicking on icon or menu you can set other options on the Tool Options toolbar:

  • switch on the optional leader (such as diameter sign)
  • enter your own text for dimension
  • select the optional leader - diameter, plus/minus sign ...
  • enter upper and lower tolerances

"da", "dimension - aligned", RS2::ActionDimAligned; "da", RS2::ActionDimAligned;

Drawing Linear dimension

dr
Specify first extension line origin
Specify second extension line origin
Specify dimension line location
You type dr (abbreviation for Dimension lineaR) on the commandline. LibreCAD propmts you "Specify first extension line origin". Here you can enter point for the first extension line origin, either by clicking on screen or by typing coordinates typically you use some snap to place the dimension exactly on the point you wish to dimension. LibreCAC then prompts you for the second extension line origin. After specifying the second extension line origin you are propmted for dimesnion line location.
Linear dimension runs parallel to the line between the two extension line origins.
You use Linear dimension when you need to indicate the length under specific angle. You have to set the angle from the Tool Options toolbar. You can also use it for horizontal or vertical lines, but for that you have specialized commands - see below.
You are not given a chance to select a line and have it dimensioned automatically like you can with the AutoCAD.
After issuing command da or clicking on icon or menu you can set other options on the Tool Options toolbar:

  • switch on the optional leader (such as diameter sign)
  • enter your own text for dimension
  • select the optional leader - diameter, plus/minus sign ...
  • enter upper and lower tolerances
  • enter the angle for the dimension.

"dr", "dimension - linear", RS2::ActionDimLinear; "dr", RS2::ActionDimLinear;

Drawing horizontal dimension

dh
Specify first extension line origin
Specify second extension line origin
Specify dimension line location
You type dh (abbreviation for Dimension Horizontal) on the commandline. LibreCAD propmts you "Specify first extension line origin". Here you can enter point for the first extension line origin, either by clicking on screen or by typing coordinates typically you use some snap to place the dimension exactly on the point you wish to dimension. LibreCAC then prompts you for the second extension line origin. After specifying the second extension line origin you are propmted for dimesnion line location.
Horizontal dimension runs parallel to the x axis.
You use Aligned dimension when you need to indicate the length under specific angle. You have to set the angle from the Tool Options toolbar. You can also use it for horizontal or vertical lines, but for that you have specialized commands - see below.
You are not given a chance to select a line and have it dimensioned automatically like you can with the AutoCAD.
After issuing command da or clicking on icon or menu you can set other options on the Tool Options toolbar:

  • switch on the optional leader (such as diameter sign)
  • enter your own text for dimension
  • select the optional leader - diameter, plus/minus sign ...
  • enter upper and lower tolerances
  • enter the angle for the dimension.

"dh", "dimension - horizontal", RS2::ActionDimLinearHor; "dh", RS2::ActionDimLinearHor;

"dv", "dimension - vertical", RS2::ActionDimLinearVer; "dv", RS2::ActionDimLinearVer;

"ld", "dimension - leader", RS2::ActionDimLeader; "ld", RS2::ActionDimLeader;

// tools: "dimregen", RS2::ActionToolRegenerateDimensions;

modifying the entities

"tm", "modify - multi trim (extend", RS2::ActionModifyTrim2; "tm", RS2::ActionModifyTrim2;

"xt", "modify - trim (extend", RS2::ActionModifyTrim; "xt", RS2::ActionModifyTrim;

"rm", "modify - trim", RS2::ActionModifyTrim; "rm", RS2::ActionModifyTrim;

"mv", "modify - move", RS2::ActionModifyMove; "mv", RS2::ActionModifyMove;

"ch", "modify - bevel (chamfer", RS2::ActionModifyBevel; "ch", RS2::ActionModifyBevel;

"mi", "modify - mirror", RS2::ActionModifyMirror; "mi", RS2::ActionModifyMirror;

"ro", "modify - rotate", RS2::ActionModifyRotate; "ro", RS2::ActionModifyRotate;

"sz", "modify - scale", RS2::ActionModifyMove; "sz", RS2::ActionModifyMove;

"ss", "modify - stretch", RS2::ActionModifyStretch; "ss", RS2::ActionModifyStretch;

"er", "modify - delete (erase", RS2::ActionModifyDelete; "er", RS2::ActionModifyDelete;

"oo", "modify - undo (oops", RS2::ActionEditUndo; "oo", RS2::ActionEditUndo;

"uu", "modify - redo", RS2::ActionEditRedo; "uu", RS2::ActionEditRedo;

"xp", "modify - explode", RS2::ActionBlocksExplode; "xp", RS2::ActionBlocksExplode;

Snapping to geometry or grid

"os", "snap - none", RS2::ActionSnapFree; "os", RS2::ActionSnapFree;

"sc", "snap - center", RS2::ActionSnapCenter; "sc", RS2::ActionSnapCenter;

"sd", "snap - distance", RS2::ActionSnapDist; "sd", RS2::ActionSnapDist;

"se", "snap - end", RS2::ActionSnapEndpoint; "se", RS2::ActionSnapEndpoint;

"sf", "snap - free", RS2::ActionSnapFree; "sf", RS2::ActionSnapFree;

"sg", "snap - grid", RS2::ActionSnapGrid; "sg", RS2::ActionSnapGrid;

"si", "snap - intersection", RS2::ActionSnapIntersection; "si", RS2::ActionSnapIntersection;

"sm", "snap - middle", RS2::ActionSnapMiddle; "sm", RS2::ActionSnapMiddle;

"sn", "snap - nearest", RS2::ActionSnapOnEntity; "sn", RS2::ActionSnapOnEntity;

"np", "snap - nearest point", RS2::ActionSnapOnEntity; "np", RS2::ActionSnapOnEntity;

Selecting objects

"sa", "Select all", RS2::ActionSelectAll; "sa", RS2::ActionSelectAll;

"tn", "Deselect all", RS2::ActionDeselectAll; "tn", RS2::ActionDeselectAll;


// Below is only code copied from rs_commands.cpp to work as reference for writing manual:

   // draw:
   if (c==tr("po", "point")) {
       ret = RS2::ActionDrawPoint;
   } else if (c==tr("li", "line")) {
       ret = RS2::ActionDrawLine;
   } else if (c==tr("pa", "parallel")) {
       ret = RS2::ActionDrawLine;
   } else if (c==tr("re", "rectangle")) {
       ret = RS2::ActionDrawLineRectangle;
   } else if (c==tr("rp", "regular polygon")) {
       ret = RS2::ActionDrawLinePolygon;
   } else if (c==tr("ci", "circle")) {
       ret = RS2::ActionDrawCircle;
   } else if (c==tr("c2", "2 point circle")) {
       ret = RS2::ActionDrawCircle2P;
   } else if (c==tr("c3", "3 point circle")) {
       ret = RS2::ActionDrawCircle3P;
   } else if (c==tr("ar", "arc")) {
       ret = RS2::ActionDrawArc;
   } else if (c==tr("a3", "3 point arc")) {
       ret = RS2::ActionDrawArc3P;
   } else if (c==tr("ep", "ellipse")) {
       ret = RS2::ActionDrawEllipseAxis;
   } else if (c==tr("tx", "text") || c==tr("mt", "text")) {
       ret = RS2::ActionDrawText;
   }

// dimensions:

   else if (c==tr("da", "dimension - aligned")) {
       ret = RS2::ActionDimAligned;
   } else if (c==tr("dh", "dimension - horizontal")) {
       ret = RS2::ActionDimLinearHor;
   } else if (c==tr("dv", "dimension - vertical")) {
       ret = RS2::ActionDimLinearVer;
   } else if (c==tr("dr", "dimension - linear")) {
       ret = RS2::ActionDimLinear;
   } else if (c==tr("ld", "dimension - leader")) {
       ret = RS2::ActionDimLeader;

}

   // zoom:
   else if (c==tr("rd", "redraw")) {
       ret = RS2::ActionZoomRedraw;
   } else if (c==tr("zw", "zoom - window")) {
       ret = RS2::ActionZoomWindow;
   } else if (c==tr("za", "zoom - auto")) {
       ret = RS2::ActionZoomAuto;
   } else if (c==tr("zi", "zoom - in")) {
       ret = RS2::ActionZoomIn;
   } else if (c==tr("zo", "zoom - out")) {
       ret = RS2::ActionZoomOut;
   } else if (c==tr("zp", "zoom - pan")) {
       ret = RS2::ActionZoomPan;
   } else if (c==tr("zv", "zoom - previous")) {
       ret = RS2::ActionZoomPrevious;
   }

// snap: else if (c==tr("os", "snap - none")) { ret = RS2::ActionSnapFree;

   } else if (c==tr("sc", "snap - center")) {
       ret = RS2::ActionSnapCenter;
   } else if (c==tr("se", "snap - end")) {
       ret = RS2::ActionSnapEndpoint;
   }else if (c==tr("sf", "snap - free")) {
       ret = RS2::ActionSnapFree;
   } else if (c==tr("sg", "snap - grid")) {

ret = RS2::ActionSnapGrid; } else if (c==tr("si", "snap - intersection")) { ret = RS2::ActionSnapIntersection; } else if (c==tr("sm", "snap - middle")) { ret = RS2::ActionSnapMiddle;

   } else if (c==tr("sn", "snap - nearest")) {
       ret = RS2::ActionSnapOnEntity;
   } else if (c==tr("np", "snap - nearest point")) {

ret = RS2::ActionSnapOnEntity; }

// layer: else if (c==tr("fr*", "layers - freeze all")) { ret = RS2::ActionLayersFreezeAll; } else if (c==tr("th*", "layers - defreeze all")) { ret = RS2::ActionLayersDefreezeAll; }

// selection: else if (c==tr("tn", "Deselect all")) { ret = RS2::ActionDeselectAll; }

// modify: else if (c==tr("ch", "modify - bevel (chamfer)")) { ret = RS2::ActionModifyBevel; } else if (c==tr("tm", "modify - multi trim (extend)")) { ret = RS2::ActionModifyTrim2; } else if (c==tr("xt", "modify - trim (extend)")) { ret = RS2::ActionModifyTrim; } else if (c==tr("rm", "modify - trim")) { ret = RS2::ActionModifyTrim; } else if (c==tr("mv", "modify - move")) { ret = RS2::ActionModifyMove; } else if (c==tr("mi", "modify - mirror")) { ret = RS2::ActionModifyMirror; } else if (c==tr("ro", "modify - rotate")) { ret = RS2::ActionModifyRotate; } else if (c==tr("sz", "modify - scale")) { ret = RS2::ActionModifyMove; } else if (c==tr("ss", "modify - stretch")) { ret = RS2::ActionModifyStretch; } else if (c==tr("er", "modify - delete (erase)")) { ret = RS2::ActionModifyDelete; } else if (c==tr("oo", "modify - undo (oops)")) { ret = RS2::ActionEditUndo; } else if (c==tr("uu", "modify - redo")) { ret = RS2::ActionEditRedo; } else if (c==tr("xp", "modify - explode") || c==tr("ex", "modify - explode")) { ret = RS2::ActionBlocksExplode; }


   if (cmd=="angle") {
       return tr("angle");
   } else if (cmd=="close") {
       return tr("close");
   } else if (cmd=="chord length") {
       return tr("chord length");
   } else if (cmd=="columns") {
       return tr("columns");
   } else if (cmd=="columnspacing") {
       return tr("columnspacing");
   } else if (cmd=="factor") {
       return tr("factor");
   } else if (cmd=="length") {
       return tr("length");
   } else if (cmd=="length1") {
       return tr("length1");
   } else if (cmd=="length2") {
       return tr("length2");
   } else if (cmd=="number") {
       return tr("number");
   } else if (cmd=="radius") {
       return tr("radius");
   } else if (cmd=="rows") {
       return tr("rows");
   } else if (cmd=="rowspacing") {
       return tr("rowspacing");
   } else if (cmd=="text") {
       return tr("text");
   } else if (cmd=="through") {
       return tr("through");
   } else if (cmd=="trim") {
       return tr("trim");
   } else if (cmd=="undo") {
       return tr("undo");
   } else if (cmd=="back") {
       return tr("back");
   }


   if (cmd=="angle") {
       if (strl==tr("angle") || strl==tr("ang", "angle") ||
               strl==tr("a", "angle")) {
           return true;
       }
   } else if (cmd=="center") {
       if (strl==tr("center") || strl==tr("cen", "center") ||
               strl==tr("c", "center")) {
           return true;
       }
   } else if (cmd=="chord length") {
       if (strl==tr("length", "chord length") ||
               strl==tr("l", "chord length")) {
           return true;
       }
   } else if (cmd=="close") {
       if (strl==tr("close") ||
               strl==tr("c", "close")) {
           return true;
       }
   } else if (cmd=="columns") {
       if (strl==tr("columns") || strl==tr("cols", "columns") ||
               strl==tr("c", "columns")) {
           return true;
       }
   } else if (cmd=="columnspacing") {
       if (strl==tr("columnspacing", "columnspacing for inserts") ||
               strl==tr("colspacing", "columnspacing for inserts") ||
               strl==tr("cs", "columnspacing for inserts")) {
           return true;
       }
   } else if (cmd=="factor") {
       if (strl==tr("factor") || strl==tr("fact", "factor") ||
               strl==tr("f", "factor")) {
           return true;
       }
   } else if (cmd=="help") {
       if (strl==tr("help") || strl==tr("?", "help")) {
           return true;
       }
   } else if (cmd=="length") {
       if (strl==tr("length", "length") ||
               strl==tr("len", "length") ||
               strl==tr("l", "length")) {
           return true;
       }
   } else if (cmd=="length1") {
       if (strl==tr("length1", "length1") ||
               strl==tr("len1", "length1") ||
               strl==tr("l1", "length1")) {
           return true;
       }
   } else if (cmd=="length2") {
       if (strl==tr("length2", "length2") ||
               strl==tr("len2", "length2") ||
               strl==tr("l2", "length2")) {
           return true;
       }
   } else if (cmd=="number") {
       if (strl==tr("number") ||
               strl==tr("num", "number") ||
               strl==tr("n", "number")) {
           return true;
       }
   } else if (cmd=="radius") {
       if (strl==tr("radius") ||
               strl==tr("r", "radius")) {
           return true;
       }
   } else if (cmd=="reversed") {
       if (strl==tr("reversed", "reversed arc") ||
               strl==tr("rev", "reversed arc") ||
               strl==tr("r", "reversed arc")) {
           return true;
       }
   } else if (cmd=="rows") {
       if (strl==tr("rows") || strl==tr("r", "rows")) {
           return true;
       }
   } else if (cmd=="rowspacing") {
       if (strl==tr("rowspacing", "rowspacing for inserts") ||
               strl==tr("rs", "rowspacing for inserts")) {
           return true;
       }
   } else if (cmd=="text") {
       if (strl==tr("text") ||
               strl==tr("t", "text")) {
           return true;
       }
   } else if (cmd=="through") {
       if (strl==tr("through") ||
               strl==tr("t", "through")) {
           return true;
       }
   } else if (cmd=="undo") {
       if (strl==tr("undo") ||
               strl==tr("u", "undo")) {
           return true;
       }
   } else if (cmd=="back") {
       if (strl==tr("back") ||
               strl==tr("b", "back")) {
           return true;
       }
   }