Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

applying labels from a vector using arraytostring()

lysdexic Jul 12, 2018 11:53AM CEST

Hi,

Loving scripting in Lemur!

I'm having trouble with applying labels from a function that generates a vector.

I'm using this script to get the rows and columns from a Switches object.

myRows = getattribute(getobject(), 'row');
myCols = getattribute(getobject(), 'column');

myLabels = ceil(stretch({2,myRows*myCols},myRows*myCols));


Which generates a vector of integers, one for each Switch (intentionally indexing from 2).

But when I try to setattribute(getobject(),'labels', myLabels); they don't apply. I've tried permutations of that line with square and curly braces and no joy.

I'm guessing that this is because they're integers (or floats with no precision) not strings.

I've tried using arraytostring() with a for loop to iterate through the vector and i get junk.

decl i, size=sizeof(myLabels);

for(i=0;i<size;i++)
{
myLabels[i] = arraytostring(myLabels[i]);
}


Yeilds: a bunch of multicoloured commas, #, $, !


Can someone show me what I'm doing incorrectly?

Cheers! Loving the software!!

lys

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@liine.net
http://assets2.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete