Utilities and Inquiry (1 of 2)
-RENAME — Rename (command line)
Renames named objects from the command line.
- Command:
-RENAME· Global name:_-RENAME· Alias:-REN
Changes the name of a named object from the command line, like RENAME without the dialog. Useful in scripts and AutoLISP.
Usage
- Enter -RENAME (or -REN).
- Choose the object type.
Enter object type to rename
[Block/Dimstyle/LAyer/LType/Material/multileadeRstyle/Style/Tablestyle/Ucs/VIew/VPort]:
- Enter the old name and then the new one (they can contain spaces). Enter in either of them ends without changing anything.
Enter old … name:
Notes
- The rules are those of RENAME: what cannot be renamed and invalid or repeated names are reported.
- With an asterisk several are renamed at once: AB* to CD* changes AB1 to CD1, AB2 to CD2…; what the asterisk covers is kept. AutoCAD only accepts it in the RENAME dialog; LinceCAD accepts it here too.
With an asterisk in the old name, put another in the new one (AB* to CD*).
- Besides the AutoCAD types, LinceCAD renames multiline styles and layouts.
See also
-HYPERLINK — Hyperlink (command line)
Attaches a file or a URL to objects of the drawing.
- Command:
-HYPERLINK· Global name:_-HYPERLINK
Command-line version of HYPERLINK: it attaches a file, a web page or an email address to the selected objects, or removes the link they have, without ever opening the dialog. It is the form used by scripts and AutoLISP routines, because every question is answered in writing. It asks the same as AutoCAD's -HYPERLINK.
Usage
- Type -HYPERLINK.
Enter an option [Remove/Insert] <Insert>:
- Choose Insert (the default: just press Enter) or Remove.
- With Insert, choose Object (Enter) and select the objects, or Area and specify the two corners of a rectangle, which is drawn on layer URLLAYER and carries the link.
Enter hyperlink insert option [Area/Object] <Object>:
- If any object already had a link, answer whether to overwrite it (with No, only the objects without one get it).
Overwrite existing hyperlinks? [Yes/No] <Yes>:
- Type the file or URL (Enter: the current drawing), the named location (a view, optional) and the description (optional).
Enter hyperlink <current drawing>: Enter named location <none>: Enter description <none>:
- With Remove, select the objects and press Enter. If they have different links, they are listed and you choose one by its number, by its address or
*for all.
Enter number, hyperlink, or * for all:
Notes
- The link is saved in the
PE_URLextended data of each object, asaddress<description>, so other programs read it. At most 255 characters are saved. The location goes after#in the address. - An object has a single link: inserting another replaces the previous one.
- The address can be a file path, a URL (
https://…) or an email (mailto:name@domain.com). It is not checked that the target exists. - The link is opened with Ctrl+click on the object, with no command running (see HYPERLINK).
- Insert prints no message; Remove prints how many links were deleted, as AutoCAD does.
- The change is undone with UNDO.
Example
From a routine, put a link on every object in the drawing and remove it afterwards (the result is what the program prints):
(command "-HYPERLINK" "Insert" "Object" (ssget "X") "" "https://www.lincecad.com" "" "LinceCAD website") (command "-HYPERLINK" "Remove" (ssget "X") "") ; 1 hyperlink deleted.
See also
-PURGE — Purge (command line)
Purges unused items from the command line.
- Command:
-PURGE· Global name:_-PURGE· Alias:-PU
Command-line version of PURGE: removes the unused items of one type, by name and optionally confirming each one. It is the way to purge from a script (SCRIPT).
Usage
- Enter -PURGE (or -PU).
- Choose the type of items.
Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]:
- Enter the names you want to purge. The wildcards
*(any text) and?(one character) and several patterns separated by commas are accepted; Enter purges all items of the type.
Enter name(s) to purge <*>:
- Say whether you want to confirm each item. With Yes, the program asks about each one; with No, it removes them all.
Verify each name to be purged? [Yes/No] <Y>: Purge … "…"? <N>
Options
| Option | Type |
|---|---|
| Blocks (B) | Blocks |
| LAyers (LA) | Layers |
| LTypes (LT) | Linetypes |
| textSTyles (ST) | Text styles |
| SHapes (SH) | Shapes |
| Dimstyles (D) | Dimension styles |
| MUltileaderstyles (MU) | Multileader styles |
| Tablestyles (T) | Table styles |
| Mlinestyles (M) | Multiline styles |
| Plotstyles (P) | Plot styles |
| Regapps (R) | Registered applications |
| Zero-length (Z) | Zero-length geometry |
| Empty (E) | Empty text objects |
| All (A) | All named types |
Notes
- Zero-length and Empty ask for no names and no confirmation: they remove everything they find.
- All does not include zero-length geometry or empty text, and also purges nested items (what becomes unused when others are removed).
- The same safety rules as in PURGE apply. The result is undone with UNDO.
See also
-UNITS — Units (command line)
Sets the format of lengths and angles from the command line.
- Command:
-UNITS· Global name:_-UNITS· Alias:-UN
Sets the format and precision of lengths and angles from the command line, like UNITS without the dialog.
Usage
- Answer the six questions; Enter keeps the proposed value.
Enter choice, 1 to 5 <…>: Enter number of digits to right of decimal point (0 to 8) <…>: Enter number of fractional places for display of angles (0 to 8) <…>: Enter direction for angle … <…>: Measure angles clockwise? [Yes/No] <…>
Notes
- The insertion unit is only changed in the UNITS dialog, as in AutoCAD.
See also
AREA — Area
Calculates area and perimeter.
- Command:
AREA· Global name:_AREA· Alias:AA - Ribbon: Home › Utilities
- Menu: Tools
Calculates the area and perimeter of a boundary defined by points or of a closed object. With the Add area and Subtract area modes it keeps a running total, for example to subtract openings from a surface. The drawing does not change.
Usage
- Enter AREA (or AA) or click its button.
Specify first corner point or [Object/Add area/Subtract area] <Object>:
- To measure by points, specify the corners of the boundary one after another. The figure closes by itself: there is no need to go back to the first point.
Specify next point or [Arc/Length/Undo]: Specify next point or [Arc/Length/Undo/Total] <Total>:
- Press Enter (or type T) to calculate. The command line shows the area and the perimeter.
- To measure an object, press Enter at the first prompt (or type O) and select the object with a click or with Last (the last one drawn), as in AutoCAD; other text says "Invalid selection".
Select objects:
Options
- Object (O): measures a circle, arc, ellipse, polyline, spline or hatch. For an open object the area is closed by the chord between its endpoints and its length is given instead of the perimeter.
- Add area (A): switches to add mode. Every boundary or object you measure is added to the total, which is shown after each measurement.
Specify first corner point or [Object/Subtract area]: (ADD mode) Select objects:
- Subtract area (S): switches to subtract mode. Every measurement is subtracted from the total.
Specify first corner point or [Object/Add area]: (SUBTRACT mode) Select objects:
- Undo (U): removes the last point of the boundary.
- Total (T): closes the boundary and calculates.
In add and subtract modes, Enter at the object prompt goes back to the mode prompt; Enter at the mode prompt ends the command and shows the total.
Notes
- In a hatch, the inner boundaries (islands) subtract their area.
- Regions and 2D solids cannot be measured yet.
- Results are written with the units and precision of the drawing (UNITS).
See also
MEASUREGEOM · DIST · LIST · HATCH · BOUNDARY
CAL — Calculator
Evaluates a mathematical expression.
- Command:
CAL· Global name:_CAL - Ribbon: Home › Utilities
Evaluates a mathematical expression typed on the command line and shows the result. It does not change the drawing.
Use
- Type CAL or click its button.
- Type the expression and press Enter.
>> Expression:
- The result appears on the command line with the drawing format (UNITS).
Expressions
- Operators:
+,-,*,/,^(power) and the sign; use parentheses to group. - Constants:
piande. - Functions:
sin,cos,tang,asin,acos,atan,sqrt,sqr(square),abs,ln,log(base 10),exp,round,trunc,r2dandd2r.
Points and vectors
- Points and vectors are written
[x,y]or[x,y,z]. They add and subtract;number*pointscales them;a*bis the dot product anda&bthe cross product. - Geometric functions:
dist(p1,p2),ang(p1,p2)(degrees in the XY plane; alsoang(vertex,p1,p2)),vec(p1,p2),vec1(p1,p2)(unit),mee(p1,p2)(midpoint),ill(p1,p2,p3,p4)(intersection of two lines),pld(p1,p2,d)(point at distance d from p1 towards p2),plt(p1,p2,t)(parametric point),rot(p,origin,angle),xof,yof,zofandmag;cvunit(value,from,to)converts units (mm, cm, m, km, in, ft, yd, mi, deg, rad, grad, g, kg, lb, oz, c, f, k). - Drawing points:
cur(any point) and the snapsend,mid,int,ins,nea,nod,qua,cen,perandtanask for a point with the mouse;radasks for an arc or circle and gives its radius. Example:dist(cur,cur)or(end+end)/2. - The snap functions do not force the mode: the point comes out with the active snaps of the status bar (OSNAP). Coordinates are flat (Z = 0).
Notes
- Trigonometric angles are in degrees, like the AutoCAD calculator;
atanreturns degrees. - Examples:
2+3*4,sqrt(2)*10,sin(30),(1+2)^3.
See also
RENAME — Rename
Changes the name of layers, blocks, styles and other named objects.
- Command:
RENAME· Global name:_RENAME· Alias:REN - Ribbon: Home › Utilities
- Menu: Format
Changes the name of blocks, dimension styles, layers, linetypes, multileader, text, table and multiline styles, UCSs, views, viewport configurations and layouts. Everything that refers to them is updated: the inserts of a block, the entities of a layer or a style, the layers of a linetype and the current values of the drawing.
Usage
- Enter RENAME (or REN).
- In the Rename dialog, choose the type on the left and the item on the right (or type its name in Old name).
- Type the new name next to Rename to and click that button. You can rename several in a row; OK closes the dialog.
Notes
- Layer 0 and Defpoints, the ByLayer, ByBlock and Continuous linetypes, the Standard styles, the space blocks and the anonymous ones (
*U…), and what comes from an external reference cannot be renamed. - The new name cannot be in use already nor contain
<>/\":;?*|,=or a backquote. Changing only the case is allowed. - All the renames of one session are undone at once with U. To do it on the command line, use -RENAME.
See also
COMPARE — Compare drawings
Compares the drawing with another DWG or DXF and highlights the differences.
- Command:
COMPARE· Global name:_COMPARE· Alias:DWGCOMPARE - Ribbon: Manage › Drawing
Compares the open drawing with another DWG or DXF (for example, two revisions of the same sheet) and highlights the differences in model space.
Usage
- Type COMPARA or click Compare drawings.
- Enter the file to compare with (or press Enter to pick it in the browser).
Enter name of drawing to compare <.>:
- The current drawing is marked and a change summary is shown on the command line.
Markup: green = added, red = deleted, yellow = modified (UNDO to remove it).
How it matches
- First by each entity's handle: the same handle in both drawings is the same entity; if its geometry or properties changed, it counts as modified.
- The rest is matched by geometry: an entity with the same outline but a different handle (after renumbering) is treated as unchanged, not a change.
Notes
- The markup is overlaid on the drawing itself and is undoable with a single UNDO: modified in yellow, added in green, and entities deleted from the other drawing brought in red (on the current layer).
- Only model-space entities are compared.
Differences from AutoCAD
- In AutoCAD the command is COMPARE; here
_DWGCOMPAREis still valid as an alias. There is no separate comparison drawing, comparison toolbar or revision clouds: the mark is overlaid on the drawing itself and undone with one UNDO. The colors (yellow, green, red) are fixed.
See also
QUICKCALC — QuickCalc
Opens the calculator palette (QuickCalc).
- Command:
QUICKCALC· Global name:_QUICKCALC· Alias:QC - Ribbon: Home › Utilities
Opens the calculator palette (QuickCalc): a floating window to evaluate expressions without leaving the drawing.
Use
- Type QUICKCALC (or QC) or click its button.
- Type an expression and press Enter or the
=button. - The result appears below the expression. The "To command line" button sends it: - if a command is running and asks for a value (a distance, a number), that command receives it; - otherwise it is left on the command line.
- The history remembers the last expressions; click one to reuse it. The numeric keypad enters digits, operators, parentheses and decimals, and includes backspace, clear and
=evaluation.
Expressions
The same as CAL: + - * / ^, parentheses, constants (pi, e) and functions (sin, cos, tang, sqrt, ln, log, abs…), with angles in degrees.
Variables, units and scientific functions
name=expressionstores a variable (for examplewidth=2*3); use it by name in any expression. It appears in the Variables (name=expression) list, where a click adds it to the expression.- Scientific functions: buttons that type
sin(,cos(,tang(,sinh(,cosh(,tanh(,log(,ln(,exp(,exp10(,sqrt(,sqr(,abs(,r2d(andd2r(. - Unit conversion: value, source unit and target unit. Length (mm, cm, m, km, in, ft, yd, mi), angle (deg, rad, grad), mass (g, kg, lb, oz) and temperature (c, f, k).
cvunit(value,from,to)also works inside an expression. - It also takes points
[x,y,z]and the geometric functions of CAL (dist,ang,mee…). - Pick from drawing: Point picks a point, Distance measures between two points, Radius selects a circle or arc and Angle asks for vertex, first point and second point. Picking is transparent: when it finishes or is cancelled, the previously active command continues and the result appears in the calculator.
See also
SELECT — Select
Selects objects and keeps them selected for the next command.
- Command:
SELECT· Global name:_SELECT
Selects objects and stores them as the previous selection, without leaving them selected. In the next command, answer Previous at "Select objects" to use them. It is the AutoCAD SELECT used by many scripts and AutoLISP routines.
Usage
- Enter SELECT (or DESIGNA).
Select objects:
- Select the objects (click, window, crossing or any of the selection options: Window, Fence, WPolygon, Previous...) and press Enter.
- Start the command that will use them (ERASE, MOVE, COPY…) and, when it asks "Select objects", answer Previous.
Notes
- As in AutoCAD 2027, nothing stays selected when it ends: the objects are only kept as the previous selection.
- ? lists the selection options.
See also
DIST — Distance
Measures the distance and angle between two points.
- Command:
DIST· Global name:_DIST· Alias:DI - Ribbon: Home › Utilities
- Menu: Tools
Measures the distance between two points and writes it on the command line, together with the angle of the line that joins them in the XY plane and the X, Y and Z deltas. The drawing does not change.
Usage
- Enter DIST (or DI) or click its button.
- Specify the first point with a click, an object snap or by typing its coordinates.
Specify first point:
- Specify the second point. While you move the cursor, the line being measured is shown.
Specify second point or [Multiple points]:
- The result appears on the command line and the command ends.
Options
- Multiple (M), at the second prompt: measures a polyline. After each point it writes the cumulative distance; Undo removes the last point, Length adds a segment of the typed length in the direction of the previous one, Close goes back to the first point, and Enter (Total) gives the total and ends.
Specify next point or [Arc/Length/Undo/Total] <Total>:
Notes
- Numbers are written with the format and precision of the drawing (UNITS): decimal, feet and inches, degrees, degrees/minutes/seconds… The angle follows the base and direction of ANGBASE and ANGDIR.
- LinceCAD is 2D: the angle from the XY plane and the Z delta are always 0.
- Use object snaps (Endpoint, Midpoint, Center…) to measure between exact points of the geometry. See Object snaps and precision.
- To measure several things in a row, press Enter or Space: it repeats the last command.
- The last distance is stored in DISTANCE. DIST keeps the selected objects selected and can be used inside another command ('DIST).
- Limit compared with AutoCAD: Arc segments of Multiple points are not available.
See also
MEASUREGEOM · AREA · ID · LIST · UNITS
STATUS — Status
Displays the drawing status: limits, extents and current settings.
- Command:
STATUS· Global name:_STATUS - Ribbon: Home › Utilities
Displays the drawing status in the text window (F2): how many objects it has, its limits, the area used by the model, the insertion base, the snap and grid spacing, the current layer, color and linetype, the elevation, the status bar modes and the running object snaps.
Usage
- Enter STATUS. The report is shown on the command line and in the text window.
Notes
- "Model space uses" is the extent of the objects in model space; with none, it says Nothing.
- Unlike AutoCAD, free disk space and memory are not shown.
See also
PTYPE — Point Style
Sets how points are displayed and their size.
- Command:
PTYPE· Global name:_PTYPE· Alias:DDPTYPE - Ribbon: Home › Utilities
- Menu: Format
Chooses how point objects are drawn (the symbol) and their size. The change affects all the points in the drawing, including those created by DIVIDE and MEASURE.
Usage
- Enter PTYPE (or DDPTYPE) or click Point Style. The Point Style dialog box opens.
- Click one of the 20 symbols.
- Enter the Point Size and whether it is measured as a percentage of the screen size or in drawing units.
- Click OK. Cancel leaves the style as it was.
On the command line (for example, in a script) you can type the values of the variables:
Enter new value for PDMODE <…>: Enter new value for PDSIZE <…>:
Notes
- The symbol is the PDMODE variable: 0 to 4 (dot, nothing, cross, X, tick), plus 32 to add a circle, 64 for a square or 96 for both.
- The size is PDSIZE: a positive value is in drawing units; a negative one, a percentage of the screen.
- Both variables are saved in the drawing.
See also
POINT · DIVIDE · MEASURE · System variables
FILTER — Filter
Selects with a filter of types and properties.
- Command:
FILTER· Global name:_FILTER· Alias:FI - Ribbon: Home › Utilities
- Menu: Tools
Selects the objects that match a filter: a list of conditions on the object type and its properties (layer, color, linetype, lineweight, length, radius, text height…), which can be grouped with AND, OR, XOR and NOT. It is AutoCAD's Object Selection Filters dialog.
Usage
- Enter FILTER (or FI). If objects are selected, the filter applies to them; otherwise, to the whole current space.
- Choose an object type or, with “(property)”, a property, an operator and a value, and click Add to List. Each condition is added below the selected one.
- To combine conditions, enclose them in Begin OR … End OR (or AND, XOR, NOT).
- Click Apply: what matches the filter is selected. If a command is asking for objects, it receives them.
Conditions
- Without groups, all conditions must be met (AND).
- OR: one is enough. XOR: exactly one. NOT: the condition (or the group) is not met.
- The operators are = (equal), != (not equal), > and < (for numbers: lengths, radii, heights…) and \* (wildcards, as in QSELECT:
WALL*). Texts are compared ignoring case.
Named filters
Enter a name and click Save As: the filter is stored in the filtros.nfl file of the LinceCAD configuration folder and works in any drawing. Choose it in the list to load it; Delete Current Filter List removes it.
Notes
- AutoCAD, after Apply, asks “Select objects” and filters what you select; here what is already selected, or the whole space, is filtered. To use the filter inside a command, open FILTER from the menu while the command asks for objects.
See also
Download LinceCAD Manual contents
Download the free 30-day trial · Open and edit DWG files · AutoCAD LT alternative
Coming from AutoCAD? Check what is compatible · Linux CAD with native DWG