Jump to content

Recommended Posts

Posted (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.

 

 

image.png.69cfbf1ecebb7d5fe0839dfd1d7f2c38.png

Edited by sketch11
Posted (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 by mhupp
  • Like 1
Posted

Ok thanks mhupp.

 

Do you know of a web page which has instructions on how to write LISP code after an object is selected.

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...