Jump to content

Select an attribute in a block and copy with increment in the same attribute of another block


Recommended Posts

Posted

Hi, I've been looking for a long time for a lisp that does what is explained in the subject:

1) select an attribute of a block

2) select anther block (same blockname)

3) paste the value copied in poit 1), increased +1, in the same attribute of the block selected in point 2)

 

I have find a lot of lisp for copy text and a lot of lisp for increase text, but not the combination I described.

Have you ever discussed this?

 

Greetings

Posted (edited)

Try ctx+ which I posted here, see if that works

 

You have to select where to put the text but then you would still need to select the 2nd block so same number of mouse clicks

Edited by Steven P
Posted

1 use "nentsel" not "entsel" this gets a attribute rather than a block when picked, get text of attribute and tag name, then use ssget Pt this gets block entity and can get the block name that you just picked. 

2 entsel, or better is use SSGET to force a block pick with correct block name wrap in while

3 as you know tagname then replace textstring with old+1 use entmod or Vla-put-textstring, lots of code for edit correct attribute via tag name.

 

You should be able to work it out from my suggestions as you have started doing your own code.

Posted

Great  CTX+ !!!

in the tests I've done it does just what I need!

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