View Full Version : geting selections name and putting in variable

07-28-2011, 05:00 AM
I'm selecting a fluid container and want to place its current name into a variable but can't figure out how to do it. I know this is really simple but it eludes me.


07-28-2011, 06:05 AM
Is the command you're looking for this?

string $sel[] = `ls -sl`;

Just realize that $sel is an array so if you want to return the first selected object it would be $sel[0].

07-29-2011, 12:52 AM
Thanks. That is exactly what I wanted. The [0] fist selected bit was also puzzling me so extra thanks.

CGTalk Moderation
07-29-2011, 12:52 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.