• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

PINOBJECT LISP: Pin Objects Against Accidental Edits

August 3, 2026

PINOBJECT pins individual objects so they cannot be modified, and keeps them pinned between drawing sessions. Three commands: PINOBJECT pins a selection, UNPINOBJECT releases one, UNPINALL releases everything and removes the stored record.

What FreezeFrame does

Read this before relying on it. This is a demonstration of what reactors can do, not a security feature. The protection only works while this file is loaded — anyone who opens the drawing without it can edit the objects freely.

For genuinely locking content, a locked layer does the same job, is enforced by AutoCAD itself, and travels with the drawing. That is the right answer for anything that matters.

Where this is useful is protecting a survey base, a grid or a title block from your own accidental edits during a working session — the case where a locked layer would be a nuisance because you keep needing to unlock it for something else on the same layer.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type PINOBJECT and select the objects to protect.
  3. Work normally. Any edit to a pinned object is reversed immediately.
  4. Type UNPINOBJECT to release specific objects, or UNPINALL to release everything and clear the record.

How it works

Two reactors, plus a dictionary.

The editor reactor fires after every command and every LISP routine finishes. It compares each pinned object against the DXF data captured when it was pinned, and writes that data back — undoing any change. If an object was deleted, it is undeleted.

The drawing reactor fires on save, writing the pinned objects’ handles into a drawing dictionary so the pins can be rebuilt when the drawing is next opened with this file loaded.

Note the consequence of the first one. Changes are not prevented, they are reversed immediately after the command that made them. The object flickers rather than refusing to move. That is inherent to how reactors work — they run after the fact, not before it — and it is exactly why this cannot be a real protection mechanism.

Notes and limits

  • This is not security. Open the drawing without this file loaded and every pinned object edits normally.
  • Use a locked layer for anything that matters. AutoCAD enforces it, and it travels with the file.
  • Objects flicker rather than refusing to move, because the reactor reverses the change after the command completes.
  • Pins survive saving and reopening, but only if this file is loaded in the session that opens the drawing.

Download and details

NameFreezeFrame — pin individual objects so they cannot be modified
DownloadFreezeFrame.lsp — 15.1 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsPINOBJECT, UNPINALL, UNPINOBJECT
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size15.1 KB, 385 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoNot needed — this routine only reads the drawing and changes nothing.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • PORTLOCK LISP — locking viewports rather than individual objects
  • Delete Layer LISP — working with layers, which is the enforced alternative
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in