repeated alphanumeric sequence as a suffix to existing attribute

repeated alphanumeric sequence as a suffix to existing attribute

Gobel_A
Enthusiast Enthusiast
324 Views
2 Replies
Message 1 of 3

repeated alphanumeric sequence as a suffix to existing attribute

Gobel_A
Enthusiast
Enthusiast

I am looking for a script that can add an alphanumeric suffix sequence to an existing attribute. I found multiple options, but most of them were just about continuous numbering in many different forms. What would I need :

1. input : specify an alphanumeric suffix (e.g. "/L" or "." or "-") [/L]
2. input : the starting number of the sequence [1]
3. input : ending sequence number [3]
4. mouse click on the attributes in the desired order will dynamically update the attribute by adding the specified sequence to the end

E.g. a series of blocks containing the attributes :
block name : attribute content

 

 


block1 : aaa
block2 : bbb
block3 : ccc
block4 : ddd
block 5 : eee

Ends after using a Lisp with the parameters set in [ ] brackets as follows :

block1 : aaa/L1
block2 : bbb/L2
block3 : ccc/L3 ;;since the ending number of the section is 3, it is reset to the starting number and continues from [1]
block4 : ddd/L1
block 5 : eee/L2

The script does not need to be complex, in fact it will only apply to a sequence of three or two numbers and will always add either "/L1" or ".1" or "-1" to 2 or 3.

 

Arnie78_0-1692384505191.png

0 Likes
325 Views
2 Replies
Replies (2)
Message 2 of 3

Gobel_A
Enthusiast
Enthusiast

Found a lisp from "gile" dated on year 2008. LISP contains more functions, but the function INCADD after a slight modification does what I need. I simply edit the code on the line 967 which resets the actual value again to 1. 

Is there a possibility to make it automacally without choosing the function  "vynUlovat" ?. Whenever the value is 4, set it again to 1 ?

0 Likes
Message 3 of 3

_gile
Consultant
Consultant

Hi,

This is not LISP but the Increment plugin could help you for this and much more.

Please read the documentation (question mark button of the Increment dialog)



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes