Open countdookuw opened 3 months ago
Hi @countdookuw, sorry for being so late in replying!
Do you by any chance still have the list of PDF file names?
The script expects that the file is named like <zero or more chars>Sheet - <name to use>
.
The error you see is because one of the file in the chosen directory has "Sheet" in it, so it passes the first test
but it doesn't contain "Sheet - " (with space, hyphen and space after the word) as checked with the regular expression here:
This bug can be resolved in 2 ways: checking the presence of the entire "Sheet - " text from the start, or use a better code for the renamePDF
function: it uses the findall
method to then pick the first result, so it might be better use match
and then check if the returning value is not None
✈ Pre-Flight checks
🐞 Describe the bug
Rename PDF Sheets does not work
⌨ Error/Debug Message
♻️ To Reproduce
⏲️ Expected behavior
Rename PDF tool to work
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
Running Windows 11 Pro on Lenovo Thinkpad , Revit 2024