I've been at this several hours trying to figure out what I'm doing wrong.
Could you give me some guidance on how to use the Sheetcam variable "entityClosed".
I believe this is supposed to test whether the next path is open or closed. Variable is 1 if path is closed and 0 if path is open.
My test part has one external cut and 17 internal cuts. 5 of these internal cuts are open lines and the rest are closed lines.
In the post I'm testing cut length, and also if the cuts are open or closed. Cut length is a doddle and does what I want. However, "entityClosed" is always having a value of 0, indicating open paths.
The attached screenshot shows the returned messaged when running the post (you might have to download the image to see it at full size, it's reduced it's size in this post. Or right click in it and open it in a new tab to get full size).
The following code is what I've written. However I have tried the code outside of "function OnNewEntity()" too, and "entityLength" works but "entityClosed" is still always at zero. Am I doing something wrong ?
Code: Select all
function OnNewEntity()
if entityLength > 80 then
post.Message("PATH LONG entityLength == ", entityLength)
else
post.Message("PATH SHORT entityLength == ", entityLength)
end
if entityClosed == 1 then
post.Message("PATH CLOSED entityClosed == ", entityClosed)
else
post.Message("PATH OPEN entityClosed == ", entityClosed)
end
end