Message 1 of 8

Not applicable
08-07-2017
08:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Autodesk Community,
I am having an issue. I currently have 48 variables named this way:
var1 = AB-101
var2 = AB-102
var3 = AB-103
var4 = AB-104
etc.
What I want to do is to use them in a while loop to create single line text, like you can see below:
(setq iteration 1) (setq YValue -27.75) (while (<= iteration 16) (command "_text" "J" "M" (strcat "-53.5," (rtos YValue)) "4" "0" var1 "") (setq YValue (+ YValue -30.5)) (setq iteration (1+ iteration)))
The thing is, with that loop, for each iteration, the given value is AB-101. I would like to have, for each iteration, the value of the next variable.
So, the first loop should use the variable var 1 and give: AB-101
The second loop should use the variable var 2 and give: AB-102
The third loop should use the variable var 3 and give: AB-103
And so on.
Any ideas?
Thanks a lot
Solved! Go to Solution.