RENPAN.lsp — Panel Renumbering & Renaming

Module: renpan.lsp
Version: v3.60
Category: Panel Drawing & Layout
Complexity: Low
Size: 2.5 KB (76 lines)

Note

Panel Identifier Management

This module handles renumbering and renaming of panels, updating all references including blocks, attributes, filenames, and database entries.


Overview

Purpose

The renpan function allows users to change panel identifiers (numbers/marks) while maintaining consistency across the drawing database, file system, and all block/attribute references.

Operations

  1. User Input - Prompt for new panel identifier

  2. Validation - Check for duplicates and invalid characters

  3. Update Database - Modify panel_list entries

  4. Update Attributes - Change all block attributes

  5. Rename File - Update drawing filename if needed

  6. Update References - Fix cross-references in other drawings


Renumbering Process

Steps:

  1. Get current panel identifier from panel_list

  2. Prompt user for new identifier

  3. Validate new identifier (no duplicates, valid characters)

  4. Update panel_list xrecord in named object dictionary

  5. Update TITLE block FILE attribute

  6. Update NUM block P# attribute

  7. Optionally rename .dwg file


Validation Rules

Panel Identifiers:

  • Must be unique within project

  • Cannot contain special characters: \ / : * ? " < > |

  • Maximum length (varies by context)

  • Must not be empty


Cross-Reference Updates

Updates:

  • Assembly drawings

  • Schedule references

  • External references (xrefs)

  • Related panel drawings


Global Variables

Input:

  • Current panel identifier

  • New panel identifier

Modified:

  • panel_list - Named object dictionary entry

  • Block attributes

  • File names


Error Handling

  • Duplicate identifier detection

  • Invalid character check

  • File system error handling

  • Database lock detection



Document Metadata

Status: Comprehensive analysis (76 lines)
Last Updated: 2026-01-20


End of Document