Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Oh dear, I have had a brain freeze.

Oh dear, I have had a brain freeze.

Anonymous
Not applicable
193 Views
1 Reply
Message 1 of 2

Oh dear, I have had a brain freeze.

Anonymous
Not applicable
Ok, so. Super noob question but I am in need of knowing how to select the last item in an unspecified array. Say I select a group of objects, either in a hierarchy or not, I want to be able to get the last item, or possibly an object in the array index that is the 3rd from last. Or second from last. I know this will be a simple thing, but I have looked around and have had a slight issue finding specifics.


Pointers very welcome

Thanks
0 Likes
194 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
myVar = unspecifiedarray -- last item in array.
or
myTmp = unspecifiedarray.count
unspecifiedarray -- last item in array

work from the bottom up .count minus 2 🙂
myTmp = unspecifiedarray.count - 2
unspecifiedarray
0 Likes