<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari et all,<br>
<br>
has anybody had success unlinking a FCSeparateMeasureNumber object ?
(i.e. unlinking between score and parts)<br>
Below is the code that I use for relinking - it works fine so far.<br>
But unlinking ... ? When I change and save the
FCSeperateMeasureNumber object later in part scope, it always also
changes the main object from the score.<br>
Is this a JW Lua bug ? Or how can I separate score and part objects
here ?<br>
<br>
Best,<br>
Jan<br>
<br>
<br>
--Relink measure numbers<br>
local parts=finale.FCParts()<br>
parts:LoadAll()<br>
local region=finale.FCMusicRegion()<br>
region:SetCurrentSelection()<br>
local measregions=finale.FCMeasureNumberRegions()<br>
measregions:LoadAll()<br>
<br>
for m in each(measregions) do<br>
for i=region.StartSlot,region.EndSlot,1 do<br>
local j=region:CalcStaffNumber(i)<br>
for k=region.StartMeasure,region.EndMeasure,1 do<br>
local cell=finale.FCCell(k,j)<br>
local measnums=finale.FCSeparateMeasureNumbers()<br>
measnums:LoadAllInCell(cell)<br>
for measnum in each(measnums) do<br>
if measnum.RegionNumberID==m.ItemNo then<br>
local deleted=false <br>
for p in each(parts) do <br>
if not p:IsScore() <br>
and not p:IsCurrent()<br>
and p:IsStaffIncluded(j)
then --iterate through all parts, except score <br>
p:SwitchTo()<br>
local
measnums2=finale.FCSeparateMeasureNumbers()<br>
measnums2:LoadAllInCell(cell)<br>
for measnum2 in each(measnums2) do<br>
if
(measnum2.RegionNumberID==measnum.RegionNumberID) then<br>
measnum2:DeleteData()<br>
deleted=true<br>
end<br>
end<br>
p:SwitchBack()<br>
end <br>
end <br>
if deleted then<br>
measnum:ConnectCell(cell)<br>
measnum:AssignMeasureNumberRegion(m) <br>
measnum:SaveNew()<br>
end<br>
end<br>
end<br>
end<br>
end<br>
end<br>
</body>
</html>