Message 1 of 1
Using a variable as a placeholder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, your macro guidance would be greatly appreciated please.
INT $ARCNUM = 0
STRING $ARCNAME = ''
select clearlist
INPUT SELECTION 'Select the arcs'
$ARCNUM = SELECTION.NUMBER //DETERMINES THE NUMBER OF ARCS SELECTED...LETS ASSUME 4 ARE SELECTED
$ARCNAME = selection.object[$ARCNUM - 1] //ASSIGN THE NAME OF THE ARC OF THE LAST SELECTED...WHICH SHOULD BE PLACEHOLDER [3]...($ARCNUM -1)---->>>4-1 =3
print $ARCNAME.centre
Looking at the code above.
My intention will eventually be to iterate through all of the selected arcs using a while loop with a counter.
However, using the variable $ARCNAME doesn't seem to work on the 6th line.
The syntax should be selection.object[n] whereby value for n = 0 for the first item in the selection.
Big thanks to all who contribute!
My opinions are my own and are not intended to reflect yours.
My opinions are my own and are not intended to reflect yours.