3dwannab Posted Monday at 12:10 AM Posted Monday at 12:10 AM (edited) Hi all, I just wrote my first DCL program. It's a renamer for blocks and layers. It has a block walk function to zoom into the block to be renamed from the selection, and the layers are highlighted when picked in the edit box. The rename dialog in ACAD hasn't been touched since I started using it in 2004 so I think this will help identify and rename Blocks and Layers much better. There is a bug whereby if something has been renamed, the zoom to block or highlighting of objects doesn't work. I'll try to fix the bug when I get some spare time. Fixed in v1.01 below. Thoughts on this and improvements are welcome. 3dwannab_Rename_Blocks_and_Layers.lsp 3dwannab_Rename_Blocks_and_Layers.dcl Edited Tuesday at 11:19 PM by 3dwannab 3 Quote
StevJ Posted Monday at 03:13 AM Posted Monday at 03:13 AM (edited) This is neat and useful, and seems to work fine, but in my case, all block names are unique numbers based on drawing name (no two are identical). Is there an easy way to adapt this program to ask for a TAG, and have the program list the tag values instead of the block names? All blocks have the same tags, but custom value entries. This would make incorrect tag value entries easy to spot and correct with your program. Steve Edited Monday at 03:28 AM by StevJ Quote
3dwannab Posted Tuesday at 08:00 PM Author Posted Tuesday at 08:00 PM On 11/18/2024 at 3:13 AM, StevJ said: This is neat and useful, and seems to work fine, but in my case, all block names are unique numbers based on drawing name (no two are identical). Is there an easy way to adapt this program to ask for a TAG, and have the program list the tag values instead of the block names? All blocks have the same tags, but custom value entries. This would make incorrect tag value entries easy to spot and correct with your program. Steve I think this is what you're after. https://lee-mac.com/batte.html Quote
StevJ Posted Tuesday at 10:37 PM Posted Tuesday at 10:37 PM Thanks for the link. I did try to make it work as I wanted, but that program is not as easy to navigate as yours. The linked program's editable items are not grouped and are in a window whose size cannot be changed. Your program would be the very thing for my QA needs if it presented a list of a certain tag's value for edit from all blocks instead of the block names. Thanks anyway, Steve Quote
3dwannab Posted Tuesday at 11:13 PM Author Posted Tuesday at 11:13 PM (edited) @StevJ, it's sort of beyond the scope of this program. I wrote it to learn how to make programs with DCLs' more or less but has been very useful today at work. You can change the height of that programs UI too. Open the lisp and search for the height property for that listbox I'd say and change that to your needs. The DCL code is hardcoded into the .lsp file with that one. Something I didn't bother to do with this. (Lazy). I've fixed the issue of the blocks and layers not getting selected or highlighted with the help from @pkenewell for that, see post here. Attached is the fixed version. REVISION HISTORY: 2024.11.17 - v1.0 - First release 2024.11.19 - v1.01 - Layers and blocks can now be renamed without the loss of highlighting or selection issues present in the previous version. Thanks pkenewell on CAD Tutors. - Better handling of the buttons in the UI. Disabling / enabling / focusing them where required. 3dwannab_Rename_Blocks_and_Layers.lsp 3dwannab_Rename_Blocks_and_Layers.dcl Edited Tuesday at 11:38 PM by 3dwannab 1 Quote
StevJ Posted yesterday at 01:01 AM Posted yesterday at 01:01 AM Thanks for the info. I'll go fiddle some with the batte.lsp. Nice update to your program. It ignored me when I tested the possibility of renaming a layer or blockname to one that already existed but wasn't listed. Seems "sailor-proof." Steve 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.