Sequential numbering of attribute with auto-repeat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I've browsed several forums and LISP sites, but I haven't found a similar feature anywhere.
I would like to ask you if you know a LISP that can put the new text to the block attribute (visible)
- to the end of an existing attribute
- write/overwrite an existing attribute
in an increasing sequence of numbers ONLY with a limit after which it will query/not query for the new sequence. Text addition to the existing attribute by clicking on its existing text string.
So the input would be :
Add/overwrite ? <Add/Overwrite>
Start text : (alphanumeric input where the LAST recognised number combination will be incremented - if more numbers should be incremented in once, than separated by comma)
Increment : whole number
Maximum : whole number
Repeat automatically ? <Yes/No>
Add/Overwrite : Add takes an existing attribute and adds an "increment string" to the end of it. Overwrite will overwrite the existing attribute whatever was in it wit the "increment string"
Increment numbering scheme :
With the increment of 1:
Start text : AB1CD2 (the last number "2"will be increased to 3,4,5 etc.)
Start text : AB-1-01 (the 01 will be increased to 02,03 etc. without touching to "-1-" in the middle)
Start text : A-11AB (the 11 number will be increased to A-12AB etc.)
Start text : A-1,2 (the number 1 will be increased to 2, and 2 will be increesed to 3, next one A-5,6 etc.)
With the increment of 2:
Start text : AB1CD2 (the last number "2"will be increased to 4,6,8 etc.)
Start text : AB-1-01 (the 01 will be increased to 03,05 etc. without touching to "-1-" in the middle)
Start text : A-11AB (the 11 number will be increased) to A-13AB)
Start text : A-1,2 (will be increased to A-3,4, then A-5,6 etc.)
Always only the LAST recognised number combination. Meaning of LAST is last from reading left to right, therefore ther first number combinaton from right side. I do not consider different reading style in some Arabic country etc. The meaning of number is only as whole number (not integer, not real number) composed from the digits 0 to 9. If the separator is comma, than it should search for another number combination (fot limiting let's say, that maximum of 4 number combinations with comma separation will be allowed)
The above described numbering functionality is possible to find in some existing LISP's. Maybe not exactly as is described, but f.e. in NUMINC by Lee Mac is possible to number more than one input (prefix, middle, soffix) in one click.
The requested trick is in repeating of defined sequence.
If Repeat automatically will be Yes : after reaching "Maximum" it will automatically reset to "start text" and continue.
If not auto-repeat : after reaching "maximum" it will ask for a new "start text" or Esc to quit
First example :
The one-phase luminaires connected in a three phase system are regularly phased to phase L1,L2,L3. It is therefore advisable to add to each luminaire which phase the designer wants to add it to. Before that he has made the assignment of the circuit number to an attribute e.g. CIRCUIT. He then selects this new LISP function (f.e. ATTSEQR) , chooses :
Add/overwrite ? <Add/Overwrite> "Add"
start text = "/L1",
increment = 1,
maximum = 3 (which is in real only two additions to the first number)
Repeat automatically : Yes
and clicks on the attributes of the blocks he wants to describe. The result will be the original CIRCUIT attribute e.g. with existing circuit number 101 with the addition of phasing, i.e. 101/L1 next block 101/L2, next 101/L3 and the next after that again 101/L1 etc. until end. It is possible to make it with another LISP but I must always interrupt the work, set new start text and go again, which is annoying if it has to be done every third block
Second example :
Ports on a data patch panel are usually limited to 24 or 48 positions. Data sockets usually have two sockets in one frame and are drawn as one single block. The numbering is in the nature of the cabinet designation, then the patch panel they are plugged into in that cabinet and the port number.
Enclosure designation : MDP1 (main data panel 1)
Designation of the first patch panel : A (assumed to be with 24 ports f.e.)
Designation of the first port then: MDP1.A.1
Add/overwrite ? <Add/Overwrite> "Overwrite"
start text = MDP1.A.1,2 (MDP1/A/1,2 or similar, depends on user preference)
increment : 2
maximum : 24
Repeat automatically : No
Here is used the combination of two numbers divided by comma.
So the first data double socket connected to the patch panel would have the attribute label : MDP1.A.1,2 the second socket then MDP1.A.3,4 etc. up to the twelfth socket labelled MDP1.A.23,24. Then the user would be prompted to enter a new start text where he would enter probably "MDP1.B.1,2" and continue numbering again.
alternatively, it can mark the position on the patch panel according to the pairs of ports below it where the line of ports are marked as line A, line B with the number of "column position", so the socket marking would be :
1st : MDP1.A.1A,B
2nd: MDP1.A.2A,B
up to :
12th: MDP1.A.12A,B
In this case, specifying :
Add/overwrite ? <Add/Overwrite> "Overwrite"
start text : MDP1.A.1A,B
increment : 1
maximum : 12
Repeat automatically : No
So the first data double socket connected to the patch panel would have the attribute label : MDP1.A.1A,B the second socket then MDP1.A.2A,B etc. up to the twelfth socket labelled MDP1.A.12A,B. Then the user would be prompted to enter a new start text where he would enter probably "MDP1.B.1,2" and continue numbering again.
Third example :
bus devices have addresses numbered from 0 and a maximum of 64 can be placed on one bus. This means that their addressing takes the number from 0 to 63, which is 64 entries.
Add/overwrite ? <Add/Overwrite> "Overwrite"
start text : 1.1.0
increment : 1
maximum : 64
Repeat automatically : No
after reaching the number 1.1.63, the user is prompted to enter a new "start text" or to exit.
Can any of you help with a tip on an existing LISP that can do this or write a new one ?