sketch11 Posted yesterday at 03:37 PM Posted yesterday at 03:37 PM (edited) Was looking for something to rename blocks, and have found Lee Mac's code robust since it can handle dynamic blocks, and renames only the particular block selected, so it has a unique name. https://www.lee-mac.com/copyblock.html How can code be adjusted for the following. 1. Select block first, then run code (will right click to select command which runs code). At the moment code is called up, then block is selected. 2. When block name is changed, it will be at the end of the string, based on existing name. Tried to press End on keyboard to get to the end of the name but this won't work, the arrow keys do work but it starts from the beginning. See below. Edited yesterday at 03:38 PM by sketch11 Quote
mhupp Posted yesterday at 04:45 PM Posted yesterday at 04:45 PM (edited) 1 hour ago, sketch11 said: How can code be adjusted for the following. Lee's code is above my pay grade. He has CB and RB broken out already maybe ask him nicely to add a feature. RBP - rename block with prefix RBS - rename block with Suffix -edit I think I have code that will do this for regular blocks or maybe it was for text. its been awhile. Edited yesterday at 04:51 PM by mhupp 1 Quote
sketch11 Posted 15 hours ago Author Posted 15 hours ago Ok thanks mhupp. Do you know of a web page which has instructions on how to write LISP code after an object is selected. Quote
mhupp Posted 4 hours ago Posted 4 hours ago only tested this on regular blocks. if you use prefix on anonymous blocks they might not be anonymous anymore. I don't know what would happen so test it first before using it on project files. @Lee Mac let me know if you want this taken down. probably do it Monday anyway. Rename.lsp 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.