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¶
User Input - Prompt for new panel identifier
Validation - Check for duplicates and invalid characters
Update Database - Modify panel_list entries
Update Attributes - Change all block attributes
Rename File - Update drawing filename if needed
Update References - Fix cross-references in other drawings
Renumbering Process¶
Steps:
Get current panel identifier from panel_list
Prompt user for new identifier
Validate new identifier (no duplicates, valid characters)
Update panel_list xrecord in named object dictionary
Update TITLE block FILE attribute
Update NUM block P# attribute
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 entryBlock 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