3dwannab Posted November 18 Posted November 18 (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 November 19 by 3dwannab 3 Quote
StevJ Posted November 18 Posted November 18 (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 November 18 by StevJ Quote
3dwannab Posted November 19 Author Posted November 19 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 November 19 Posted November 19 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 November 19 Author Posted November 19 (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 November 19 by 3dwannab 1 Quote
StevJ Posted November 20 Posted November 20 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.