Daily PainkillerCreator resource hub
Workbench online
LSP · v1.4.0 · Experimental

BLKTOOLS

One command for block properties, layer inheritance, lineweights and selection.

Runs on
AutoCAD · Windows
Command
BLKTOOLS
Author
Myo Myint Maung

How to use

  1. 01

    Download and load

    Save BLKTOOLS.lsp. In AutoCAD, type APPLOAD, select the file and click Load.

  2. 02

    Choose an action

    Type BLKTOOLS. Choose ByLayer, FollowLayer, Lineweight, SelectLayer, PlaceAtCircleCenter, IsolateBlockLayers, RestoreLayers or ChangeBasePoint from the command line. Press Enter to accept a shown default.

  3. 03

    Select and check

    For property edits, choose Manual for clicking or window selection, or SameLayer to pick an object’s layer. Review the changed, skipped and failed counts. Use U to undo the edit operation.

New in v1.4.0

Change a block base point

Run BLKTOOLS and choose ChangeBasePoint, or type BASEPICK directly. Select one normal, non-annotative block and pick the new base point. Picking the new point applies the shared-definition change; there is no separate Yes/No confirmation. Top-level copies are compensated to retain their visible positions. Use one UNDO to reverse it.

This is not an edit to only one insertion: all copies of the definition are involved. Nested definitions, dynamic blocks, Xrefs, MINSERT and locked copies are rejected.

Circle placement

Place blocks at circle centres

  1. 01

    Choose the new action

    Reload the updated file with APPLOAD. Run BLKTOOLS and choose PlaceAtCircleCenter.

  2. 02

    Pick the source block

    Choose the existing block to copy. Its bounding-box centre is used instead of its insertion point. The original stays in place.

  3. 03

    Pick a circle’s layer

    Pick one circle on the required layer. One copy is placed at every top-level circle on that layer across model space and all layouts. Circles stay in place; use U to undo.

Text and attributes can influence the bounding-box centre. Copies retain the source rotation and are not automatically aligned to tilted circle planes. Running placement again creates another set of copies.

Layer isolation

Isolate main and nested block layers

Run BLKTOOLS, choose IsolateBlockLayers and pick a main block. The tool scans all top-level blocks on its layer across all layouts, then keeps their internal and nested layers. Objects outside those blocks on the same kept layers remain visible.

Choose Off to hide other layers, or LockFade to show and lock them with a fade value from 0 to 90. Kept layers are shown and thawed; LockFade also unlocks them.

Use RestoreLayers before closing the drawing. The snapshot survives reloading this LSP but does not survive closing the drawing. Fade is application-wide; Undo alone may not restore it. Viewport-specific frozen layers and Xref internals are not changed.

Layer restoration avoids redundant layer changes, handles an originally frozen layer becoming current, and keeps failed restores for retry. A new isolation first tries to restore the previous snapshot.

Command options

ActionWhat it doesScope
ChangeBasePoint / BASEPICKPick a normal block and a new base point. Changes the shared definition origin and compensates top-level copies to retain their visible positions.All top-level copies of that definition. Rejects nested definitions, dynamic/annotative blocks, Xrefs, MINSERT and locked copies; test on a drawing copy.
IsolateBlockLayersPick a main block. Keep its layer and layers inside all blocks on that layer, including nested blocks. Choose Off or LockFade for other layers.All layouts. Objects elsewhere on the kept layers remain visible. LockFade shows and locks other layers, with fade from 0–90 (default 70).
RestoreLayersRestore saved layer visibility, freeze state, locks and the previous fade setting. Failed restores are reported and retained for another attempt.Snapshot lasts for the open drawing session and survives reloading the file. Restore before closing the drawing.
PlaceAtCircleCenterCopy a picked block to every circle on the layer identified by a picked circle. Match the block’s bounding-box centre, including text and attributes, to each circle’s centre.All model space and paper layouts; excludes circles nested inside blocks or Xrefs. Keeps the source block’s layer, scale and rotation.
ByLayerSet colour, linetype, lineweight and transparency to ByLayer. Choose All, Color, Linetype, Lineweight, Transparency or ColorLW.Reference or Deep; existing layers stay unchanged.
FollowLayerMove internal objects to Layer 0 and set colour, linetype and lineweight to ByLayer so they follow the inserted block’s layer.Deep; keep the selected block’s insertion layer.
LineweightChange only lineweight. Choose ByLayer, ByBlock, Default or a standard value in millimetres. Entering 0 means an actual 0.00 mm lineweight.Reference or Deep; other properties stay unchanged.
SelectLayerPick an object to highlight block references on its layer.Current layout only; no property changes.

Reference or Deep?

Reference changes the selected block references and their attached attributes. Deep also changes internal objects and nested block definitions.

Deep edits shared definitions, so other instances using those definitions can change even if you did not select them.

ByLayer or FollowLayer?

A block inserted on MEP-PIPE contains a line on RED-LINES. Deep ByLayer leaves that line on RED-LINES, following its properties. FollowLayer moves it to Layer 0 so it follows MEP-PIPE instead.

Selection and protection

SameLayer searches the current layout only; PlaceAtCircleCenter searches all layouts. Property edits skip Xrefs and locked-layer entries. Placement requires a source block on an unlocked layer. Nested definitions are processed once per run, and colour operations remove True Colour overrides.

Test on a drawing copy first

Source reviewed only; this uploaded version has not been executed inside AutoCAD here. Check nested blocks, attributes, True Colour, locked layers, Xrefs and dynamic blocks before using it on project drawings. Dynamic block variants need drawing-specific testing.

Esc stops the command; completed changes remain until you undo them.

Six utilities combined

BLKTOOLS brings together BlkByLayer, BlkDeepByLayer, BlockColorLineweightByLayer, BlkFollowLayer, DeepBlockLineweight and SelSameBlockLayer. Load this one file and use the command-line choices.