IdeaLogic584307
2016-07-30, 09:09 PM
I have created a map of my local area (in AutoCAD 10), that includes a table which lists N key businesses in alphabetical order. Each business also has a numerically ordered key number (1 through N) for purposes of locating the business on the map, via a callout. The callouts each consist of three entities, a dot (donut), a right-angle polyline, and the corresponding key number.
If I wish to add a new business, in order to maintain both the alphabetical order and the numerical order, I have to manually search for all callouts having key numbers that are equal to or greater than the number assigned to the newly-added business, and increment each of them by one. Since the callout numbers could be anywhere on the map, making sure I find each one is a manual process prone to error.
For example, the table lists Home Depot, with a key number of 21 and K-Mart with a key number of 22. Let's say I want to add Ikea at position 22, and increment the key numbers of all "higher" businesses by one (i.e. K-mart becomes 23, and so on through N+1).
I could use the Find and Replace feature, but I would need to do this multiple times (in my case 23 repetitions) which would become very tedious. Is there a LISP routine that would automatically search outside the table and replace the relevant key numbers, as needed to increment each by one integer? I assume it would need a couple inputs, e.g. starting key number, maximum key number, and maybe others. It wouldn't necessarily need to increment the key numbers in the table itself (although it would be okay if it did), that could be done manually with no great effort. Any assistance would be appreciated.
If I wish to add a new business, in order to maintain both the alphabetical order and the numerical order, I have to manually search for all callouts having key numbers that are equal to or greater than the number assigned to the newly-added business, and increment each of them by one. Since the callout numbers could be anywhere on the map, making sure I find each one is a manual process prone to error.
For example, the table lists Home Depot, with a key number of 21 and K-Mart with a key number of 22. Let's say I want to add Ikea at position 22, and increment the key numbers of all "higher" businesses by one (i.e. K-mart becomes 23, and so on through N+1).
I could use the Find and Replace feature, but I would need to do this multiple times (in my case 23 repetitions) which would become very tedious. Is there a LISP routine that would automatically search outside the table and replace the relevant key numbers, as needed to increment each by one integer? I assume it would need a couple inputs, e.g. starting key number, maximum key number, and maybe others. It wouldn't necessarily need to increment the key numbers in the table itself (although it would be okay if it did), that could be done manually with no great effort. Any assistance would be appreciated.