.. index:: single: Command Line Command Line ============ The command line strip at the bottom of the window serves two purposes: 1. **Output** — IQcad writes operation prompts, results, and messages here. 2. **Input** — type a command alias and press **Enter** to activate a tool or run an operation. While a tool is active, the command line shows the current prompt (e.g. *"Specify start point:"*). Type coordinates as ``X,Y`` and press **Enter** to supply a precise point. .. index:: single: Command Suggestions single: Autocomplete Command Suggestions -------------------- As soon as you start typing at an idle ``Command:`` prompt, a suggestion popup opens below the input box (AutoCAD-style), listing matching commands as **name (aliases) — description**. Matches are ordered exact name/alias hits first, then name/alias prefixes, then plain substring matches, each group alphabetical and case-insensitive; up to 8 rows show at once with the rest reachable by scrolling. - **Up / Down** — move the highlight between suggestions. - **Enter** — run the highlighted command, or submit the typed text as-is if nothing is highlighted. - **Tab** — fill the input with the highlighted (or first) suggestion without running it, so you can keep editing or add options. - **Esc** — dismiss the popup first; press again to clear the input. - **Click** a row to run that command immediately. The popup only appears while the command line is idle — it stays out of the way during an active tool's sub-prompts (e.g. ``PEDIT``'s option letters). It has no on/off setting; it is always available. .. index:: single: Command Reference Command Reference ----------------- .. index:: single: Drawing Commands Drawing Commands ~~~~~~~~~~~~~~~~ .. index:: single: LINE (command) single: POLYLINE (command) single: MULTILINE (command) single: ARC (command) single: CIRCLE (command) single: ELLIPSE (command) single: SPLINE (command) single: RECTANGLE (command) single: HATCH (command) single: TEXT (command) single: MLEADER (command) single: POINT (command) single: XLINE (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``LINE`` - ``L`` - Start the Line tool. * - ``POLYLINE`` - ``PL``, ``PLINE`` - Start the Polyline tool. * - ``MULTILINE`` - ``ML`` - Start the Multiline tool. * - ``ARC`` - ``A`` - Start the Arc tool. * - ``CIRCLE`` - ``C`` - Start the Circle tool. * - ``ELLIPSE`` - ``EL`` - Start the Ellipse tool. * - ``SPLINE`` - ``SP`` - Start the Spline tool. * - ``RECTANGLE`` - ``REC`` - Start the Rectangle tool. * - ``HATCH`` - ``H`` - Start the Hatch tool. * - ``TEXT`` - ``T`` - Start the Text tool. * - ``MLEADER`` - ``MLD`` - Prompt for label text, then start the Multileader tool. * - ``POINT`` - ``P``, ``PT`` - Start the Point tool. * - ``XLINE`` - ``XL`` - Start the XLine (infinite construction line) tool. .. index:: single: Modify Commands Modify Commands ~~~~~~~~~~~~~~~ .. index:: single: ERASE (command) single: MOVE (command) single: COPY (command) single: ROTATE (command) single: SCALE (command) single: OFFSET (command) single: MIRROR (command) single: TRIM (command) single: EXTEND (command) single: CHAMFER (command) single: FILLET (command) single: BREAK (command) single: JOIN (command) single: ALIGN (command) single: DIVIDE (command) single: MEASURE (command) single: ARRAY (command) single: PEDIT (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``ERASE`` - ``E`` - Erase selected objects. If nothing selected, prompts "Select objects:" — pick then right-click to confirm. * - ``MOVE`` - ``M`` - Move selected objects. * - ``COPY`` - ``CO`` - Copy selected objects. * - ``ROTATE`` - ``RO`` - Rotate selected objects. * - ``SCALE`` - ``SC`` - Scale selected objects. * - ``OFFSET`` - ``O`` - Offset an entity by distance or through point. Supports Line, Circle, Arc, XLine, Polyline, Ellipse, Spline, Rectangle. Options: ``T`` = through, ``E`` = erase source, ``U`` = undo. Phantom preview shown. * - ``MIRROR`` - ``MI`` - Mirror selected objects. * - ``TRIM`` - ``TR`` - Two-phase: select cutting edges (or ``ALL``), then click objects to trim. * - ``EXTEND`` - ``EX`` - Two-phase: select boundary edges, then click the end of a line to extend. * - ``CHAMFER`` - ``CHA`` - Pick two lines to chamfer. ``D`` sub-option sets distances (``$CHAMFERA`` / ``$CHAMFERB``). * - ``FILLET`` - ``F`` - Pick two lines to fillet. ``R`` sub-option sets radius (``$FILLETRAD``). * - ``BREAK`` - ``BR`` - Break an entity between two points. ``F`` = re-pick first point, ``@`` = break at a single point with no gap. * - ``JOIN`` - ``J`` - Join lines, arcs and polylines that touch into a single entity. * - ``ALIGN`` - ``AL`` - Align objects using 1–2 source/destination point pairs, with optional scaling. * - ``DIVIDE`` - ``DIV`` - Place point entities dividing an entity into N equal segments. * - ``MEASURE`` - ``ME`` - Place point entities along an entity at a fixed interval. * - ``ARRAY`` - ``ARR`` - Rectangular, polar or path array of selected objects. * - ``PEDIT`` - ``PE`` - Edit a polyline. Sub-options: Close/Open, Join, Width, Edit vertex (Next/Prev/Move/Insert/Delete/Straighten), Spline, Decurve, Reverse. Converts Lines, Arcs and Circles to polylines (a circle becomes a closed three-vertex polyline, start point repeated as the end point, with bulge 1 on both halves). .. index:: single: Super Tools Commands Super Tools Commands ~~~~~~~~~~~~~~~~~~~~ See :doc:`../super_tools/index` for full descriptions. .. index:: single: FLATTEN (command) single: PLSIMPLIFY (command) single: PLGETZ (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``FLATTEN`` - — - Set Z = 0 on selected objects (or the whole drawing). * - ``PLSIMPLIFY`` - ``PLSIM`` - Simplify polyline vertices (Douglas–Peucker); prompts for tolerance. * - ``PLGETZ`` - ``PGZ`` - Get Z from surface/PC on polylines and lines (multi-select). * - ``BESTFITLINE`` - ``BFL`` - Best-fit 3D line through selected points/vertices. .. index:: single: View Commands View Commands ~~~~~~~~~~~~~ .. index:: single: ZOOM (command) single: PAN (command) single: REGEN (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``ZOOM`` - ``Z`` - Sub-options: ``E`` = extents, ``W`` = window, ``+`` / ``-`` = in/out. * - ``PAN`` - — - Activate real-time pan (middle-mouse drag). * - ``REGEN`` - — - Force a full redraw of the canvas. .. index:: single: Settings Commands Settings Commands ~~~~~~~~~~~~~~~~~ .. index:: single: UNITS (command) single: SETVAR (command) single: LAYERS (command) single: MAKELAYER (command) single: CURRENTLAYER (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``UNITS`` - — - Opens a multi-step wizard to set linear units, precision, and angular units. * - ``SETVAR LTSCALE`` - ``SV`` - Set the global linetype scale factor (``$LTSCALE``). * - ``LAYERS`` - ``LA`` - Opens the Layer Manager dialog. * - ``MAKELAYER`` - — - Create a layer from the command line. Usage: ``MAKELAYER name [color]``. Colour is either an AutoCAD Color Index (1–255) or a named shortcut (``RED`` / ``YELLOW`` / ``GREEN`` / ``CYAN`` / ``BLUE`` / ``MAGENTA`` / ``WHITE``). Defaults to white when omitted. Use this for scripted layer setup; the GUI ``LAYERS`` dialog covers the rest of the management workflow. * - ``CURRENTLAYER`` - ``CLAYER`` - Set the active drawing layer. Usage: ``CURRENTLAYER name``. Frozen layers are refused. .. index:: single: Inquiry Commands Inquiry Commands ~~~~~~~~~~~~~~~~ .. index:: single: LIST (command) single: ID (command) single: DIST (command) single: AREA (command) single: ANGLE (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``LIST`` - ``LI`` - List selected object properties. * - ``ID`` - — - Click a point — report its world X, Y, Z. * - ``DIST`` - ``DI`` - Measure distance between two points. * - ``AREA`` - ``AA`` - Measure area (pick points or select object). * - ``ANGLE`` - ``AN`` - Measure angle (vertex + two points). .. index:: single: Surface Commands Surface Commands ~~~~~~~~~~~~~~~~ .. index:: single: CREATESURFACE (command) single: ADDSURFACEPOINTS (command) single: ADDSURFACEENTITIES (command) single: REBUILDSURFACE (command) single: ADDSURFACEBOUNDARY (command) single: DELETESURFACE (command) single: DECIMATESURFACE (command) single: SURFACEPROPERTIES (command) single: SPOTELEV (command) single: ADDCONTOURLABEL (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``CREATESURFACE`` - ``CS`` - Create a TIN surface. If survey points exist they are triangulated automatically; otherwise an empty surface is created for later population. * - ``ADDSURFACEPOINTS`` - ``ASP`` - Add all survey points in the drawing to a named surface and build/rebuild the TIN. * - ``ADDSURFACEENTITIES`` - ``ASE`` - Add selected drawing objects (3DFace, Line, Polyline, Point) to a surface. * - ``REBUILDSURFACE`` - ``RS`` - Rebuild an existing surface TIN from current survey points. * - ``ADDSURFACEBOUNDARY`` - ``ASB`` - Add a boundary to a surface (select a closed polyline). * - ``DELETESURFACE`` - — - Delete a surface by name. * - ``DECIMATESURFACE`` - ``DS`` - Decimate (simplify) a TIN surface. * - ``SURFACEPROPERTIES`` - — - Display surface statistics. * - ``SPOTELEV`` - ``SE`` - Place a spot elevation label on a surface. * - ``ADDCONTOURLABEL`` - ``ACL`` - Place contour labels along surface contour lines. .. index:: single: Alignment Commands Alignment Commands ~~~~~~~~~~~~~~~~~~ .. index:: single: ALIGNMENT (command) single: ALIGNREVERSE (command) single: ALIGNPROPS (command) single: ALIGNFROMPOLYLINE (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``ALIGNMENT`` - ``ALG`` - Create a horizontal alignment by picking PI points. * - ``ALIGNREVERSE`` - — - Reverse the direction of an alignment. * - ``ALIGNPROPS`` - — - Display alignment properties in the command line. * - ``ALIGNFROMPOLYLINE`` - ``AFP`` - Create an alignment from a polyline. .. index:: single: Profile Commands Profile Commands ~~~~~~~~~~~~~~~~ .. index:: single: QUICKPROFILE (command) single: CREATEPROFILEVIEW (command) single: DESIGNPROFILE (command) single: PROFILEPROPS (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``QUICKPROFILE`` - ``QP`` - Quick profile along a line or polyline. * - ``CREATEPROFILEVIEW`` - ``CPV`` - Create profile view from alignment + surface. * - ``DESIGNPROFILE`` - ``DP`` - Create design profile (vertical alignment) in profile view. * - ``PROFILEPROPS`` - — - Display profile view properties. .. index:: single: Cross-Section Commands Cross-Section Commands ~~~~~~~~~~~~~~~~~~~~~~ .. index:: single: CREATESECTIONSHEET (command) single: CREATESECTIONSHEETDLG (command) single: EARTHWORKVOLUMES (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``CREATESECTIONSHEET`` - ``CSS`` - Create a cross-section sheet from alignment + surfaces (command-line wizard; retained for scripting and power users). * - ``CREATESECTIONSHEETDLG`` - ``CSSD`` - Open the **Create Section Sheet** dialog — a two-tab modal GUI that gathers all parameters at once: alignment, one or more surfaces each with a per-surface line color, station interval, left/right width, optional station range (From / To), columns and rows per sheet, optional cut/fill base + comparison surfaces with cut/fill colors, and advanced display settings (vertical exaggeration, grid major/minor intervals and colors, auto-fit elevation band, area labels, title). After clicking OK the user picks an insertion point on the canvas and the sheet(s) are created. Per-surface colors, cut/fill colors, grid settings, title, and station range are saved in the ``.iqz`` file and survive alignment edits and resample. The ``CSS`` command-line wizard is retained unchanged. This command is also reached via the **Civil → Section Sheet** ribbon button. * - ``EARTHWORKVOLUMES`` - ``EWV`` - Compute earthwork volume table (average end area method). .. index:: single: Coordinate Transformation Commands Coordinate Transformation Commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. index:: single: CSTRANSFORM (command) single: RUBBERSHEET (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``CSTRANSFORM`` - ``CST`` - Global coordinate transformation (Helmert, Affine, Polynomial). * - ``RUBBERSHEET`` - ``RBS`` - Non-uniform rubber-sheet transformation (Linear or Smooth TPS). .. index:: single: Layout Commands Layout Commands ~~~~~~~~~~~~~~~ .. index:: single: LAYOUT (command) single: MVIEW (command) single: PAGESETUP (command) single: PLOTPDF (command) single: PLOT (command) single: PLOTALL (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``LAYOUT`` - ``LO`` - Sub-options: ``N`` = new, ``D`` = delete, ``L`` = list, ``S`` = set active. * - ``MVIEW`` - ``MV`` - Create a viewport in paper space (must be on a Layout tab). * - ``PAGESETUP`` - — - Open page setup dialog for the active layout. * - ``PLOTPDF`` - ``PDF`` - Export the active layout to PDF (``EXPORTPDF`` is the older equivalent). * - ``PLOT`` - ``PRINT`` - Open the Print dialog (Ctrl+P). * - ``PLOTALL`` - — - Export all layouts to a multi-page PDF. .. index:: single: Scripting Commands Scripting Commands ~~~~~~~~~~~~~~~~~~ .. index:: single: SCRIPT (command) .. list-table:: :header-rows: 1 :widths: 20 15 65 * - Command - Alias - Action * - ``SCRIPT`` - ``SCR`` - Run a ``.scr`` text file of commands. ``SCRIPT`` with no arguments opens a file picker; ``SCRIPT `` runs the file directly. See :doc:`/parts/sdk/01_scripting` for the file format, examples for each entity type, and limitations. .. _entering-coordinates: .. index:: single: Entering Coordinates Entering Coordinates -------------------- When a tool is active and waiting for a point you can type a coordinate at the command line instead of clicking on the canvas. The same five forms work for every drawing tool — ``LINE``, ``CIRCLE``, ``ARC``, ``POLYLINE``, ``RECTANGLE``, ``ELLIPSE``, ``POINT``, ``SPLINE``, ``HATCH``, and the rest: - **Absolute 2D:** ``X,Y`` — e.g. ``100,50``. Z inherits from the previously-entered point (or 0 if this is the first input). - **Absolute 3D:** ``X,Y,Z`` — e.g. ``100,50,12.5``. - **Relative:** ``@dX,dY[,dZ]`` — e.g. ``@10,0`` (10 units to the right of the last point). - **Polar relative:** ``@distance`` — loads the named file directly. Relative paths are resolved against the working directory. Quote the path if it contains spaces, e.g. ``SCRIPT "C:\Project Setup\boilerplate.scr"``. You can also reach the same workflow from **Tools → Run Script…**. .. index:: single: File format File format ~~~~~~~~~~~ Plain UTF-8 text: - Lines starting with ``;`` are comments (leading whitespace allowed). - **Spaces inside a line act like Enter** — the line is split into whitespace-separated tokens and each token is fed to the dispatcher in turn. Matches AutoCAD's script convention. - **A blank line acts like a right-click** — it finishes the active drawing tool (POLYLINE / LINE chain / SPLINE / etc.). At the empty ``Command:`` prompt with no tool running, a blank line is a no-op. - A double-quoted string (``"…"``) is one token even if it contains spaces — useful for file paths. The surrounding quotes are stripped. - Anything else is fed to the dispatcher exactly as if you had typed it at the prompt. Example script (``samples\scripts\draw_demo.scr``): .. code-block:: text ; Three lines in three commands, two of them on one line each LINE 0,0 10,0 LINE 0,5 10,5 LINE 0,10 @10,0 ; Circle of radius 5 centred at (20,0) CIRCLE 20,0 25,0 ; Same circle using polar CIRCLE 30,0 @5<0 ; Polyline closed by the blank line below PLINE 0,20 5,25 10,20 15,25 20,20 ZE While a script is running, each executed line is echoed back to the command line as ``[script] `` in grey so you can follow what's happening. A successful run ends with ``Script complete.`` in green. .. index:: single: Stopping a script Stopping a script ~~~~~~~~~~~~~~~~~ - **Esc** cancels both the currently-running CAD command and the script itself — the player exits and the command line returns to the normal prompt. - The script stops automatically on the first dispatch failure (unknown command name) or unhandled exception, reporting the line number so you can find the bad line: ``Script stopped at line 9 (dispatch failed).`` Limitations ~~~~~~~~~~~ - **Bare scalar radius / distance** — AutoCAD's ``CIRCLE`` / ``0,0`` / ``10`` (single number for radius) is not supported. IQcad's CIRCLE wants two world points, so use ``CIRCLE 0,0 10,0`` (rim point at distance 10) instead. - **Modal dialogs** opened by a scripted command (e.g. ``LAYERS``, ``MAPSETTINGS``) block until you close them manually — the script pauses, then continues with the next line. - **Layer creation** — use ``MAKELAYER name [color]`` to create a layer and ``CURRENTLAYER name`` to make it active; the ``LAYERS`` dialog itself is modal and blocks playback until closed manually. Three sample scripts ship under ``samples\scripts\``: - ``hello.scr`` — single-shot view commands, smoke test for the SCRIPT command itself. - ``setup_view.scr`` — reset the view to north-up zoomed extents. - ``draw_demo.scr`` — exercises typed coordinates with LINE and CIRCLE.