Hi All,
I have lots of lines in my stack I want count the number of lines in stack, is it possible ?
Thanks
Kevin
Count the number of lines in stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Count the number of lines in stack
--
Thanks
Kevin
Thanks
Kevin
Re: Count the number of lines in stack
Hi Kevin,
what kind of "lines"?
Lines of code?
Line graphics?
Lines of coke?
Best
Klaus
what kind of "lines"?
Lines of code?
Line graphics?
Lines of coke?

Best
Klaus
Re: Count the number of lines in stack
Hi Kevin,
aha!
OK, for this you will need some repeat loops:
1. through all cards in your stack
2. through all graphics on ecah card and there you need to
3. check if the style of a graphic = "line"
Something like this:
Tested and works!
Did you already check these stacks? Great learning resources for the basics of LC:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
aha!

OK, for this you will need some repeat loops:
1. through all cards in your stack
2. through all graphics on ecah card and there you need to
3. check if the style of a graphic = "line"
Something like this:
Code: Select all
on mouseUp
## We collect the number of LINE graphics in this variable:
put empty into TotalNumOfLines
repeat with i = 1 to the num of cds
put the num of grcs of cd i into tNumOfGrcs
repeat with g = 1 to tNumOfGrcs
if the style of grc g of cd i = "line" then
add 1 to TotalNumOfLines
end if
end repeat
end repeat
answer "You have" && TotalNumOfLines && "line graphics in your stack."
end mouseUp
Did you already check these stacks? Great learning resources for the basics of LC:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: Count the number of lines in stack
Hmmm.
What Klaus may have said.
But did you mean than you have polyLines, and want to count the number of segments in those graphics?
Craig Newman
What Klaus may have said.
But did you mean than you have polyLines, and want to count the number of segments in those graphics?
Craig Newman