CPrelateobjects.m error




I’d like to report an error in CPrelateobjects.m
It seems that at lines 109 and 110, bad arguments are given:

handles = CPaddmeasurements(handles,ChildName,'Parent',ParentName,ParentList); handles = CPaddmeasurements(handles,ParentName,'Children',[ChildName,'Count'],ChildCounts);
The code of CPaddmeasurements.m has changed with the new release and I think that must be replaced by
something like this:

handles = CPaddmeasurements(handles,ChildName,'Parent',ParentList); handles = CPaddmeasurements(handles,ParentName,'Children',ChildCounts);
If not, it sends the following error:
“Matlab says: Operands to the || and && operators must be convertible
to logical scalar values”
at CPaddmeasurements.m (l.37)

Hope it helps!


I think I should have named this topic with another name.

Passing from CP5122 to CP5811 the way to store measure in the data structure has changed.
Some adaptations seem to have been forgotten.

There are another ones in Relate.m.
When you use it with an objectname in the third parameter, an error may raises, in particular when you export the "Image’ object in Excel
(with ExportToExcel.m module) after that.

1 - We can see that the command at line 122 has been erased but not the lines 124 & 125 so the field ‘Distance’ is initialized…but it is not supposed
to exist because it has been replaced by fields like ‘Distance_ParentName1’ and ‘Distance_ParentName2’. It’s a kind of “residue” of the previous version of CP).
Then, the solution is to comment/erase those 2 lines

2 - There is another reference to ‘Distance’ field but we’d just suppressed it (Line 159):

It must be replaced by something like this :

Let me know if I’m wrong.

See you,



Hi PJ,

Thanks for reporting these. We noticed them too and both have already been corrected in our code. In fact, I think the CPrelateobjects.m fix was included in our latest “5811Bugfix” release. Are you working with that code?



Hi David,

I downloaded CP5811BugFix branch few weeks ago so I thought I was using last versions of all modules and subfunctions.
I’m currently trying to run “old” pipelines so that’s why I made these modifications but as I overwrote the previous version files,
I may have made a mistake when I handled it…and ran an old one.

Sorry about that if it was already fixed !



Not a problem - thanks for taking the time to report these!