Hello.
I made a lua-script but I have a
problem with it. I stripped all the code that works fine and only have
the problem left.
--
---------------------------------------------------------Start code
-- function to add nodes to group x
function setnode(x, y, group)
addnode(x,y)
selectnode(x,y)
setnodeprop("<none>",group)
clearselected()
end
-- function to add segement to group
x
function setsegment(x1, y1, x2, y2, group)
addsegment(x1,y1,x2,y2)
selectsegment(x1,y1)
setsegmentprop("<none>",1,1,0,group)
clearselected()
end
-- Stators
setnode(8,4,3)
setnode(8,3,3)
setnode(9,3,3)
setnode(9,4,3)
setsegment(8,3,8,4,3)
setsegment(9,4,8,4,3)
setsegment(9,3,9,4,3)
setsegment(8,3,9,3,3)
selectgroup (3)
copyrotate(4.076,4.076,45,7)
--
---------------------------------------------------------End code
The problem is that the last
'setsegment(- statement does not set the groupnr 3 but all other
statements work fine. The copyrotate is missing a segment while
copying because of that. Does someone see what I did wrong? I tried a
lot of changes and I'm running out of fantasy. Please help.
Best regards,
Eric.