Cancel
Showing results for 
Search instead for 
Did you mean: 

Configure the Chart for Showing the Full and Empty Portions

Creator
Creator

Hi everyone,

 

I'm trying to configure a method with the following code to customize the graphic results, but it shows me an error of 'InputChannels' as I solve this problem?

 

(draggedObjects: object[]) is obj : object; numBuffers : integer; do local MyTab : table := @.InputChannels;

 

-- inheritance of the table 'InputChannels' is already deactivated MyTab.delete({1,0}..{*,*});

 

 

for local i := 1 to draggedObjects.dim loop obj := draggedObjects[i]; inspect obj.internalClassName when "NwIOBuffer", "Buffer", "Sorter" then numBuffers := self.~.InputChannels.xDim +1; MyTab[numBuffers,0] := obj.Name; MyTab[numBuffers,1] := obj.Name + ".statRelativeEmptyPortion"; MyTab[numBuffers,2] := "1 - " + obj.Name + ".statRelativeEmptyPortion - " + obj.Name + ".statRelativeFullPortion"; MyTab[numBuffers,3] := obj.Name + ".statRelativeFullPortion"; end; next; print "Number of detected buffers: ", numBuffers; @.InputChannels := MyTab; -- makes the chart apply the new settings @.Active := true; end;

3 REPLIES

Re: Configure the Chart for Showing the Full and Empty Portions

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Tecno,

 

hard to say what's going wrong without having the model or the exact error message.

 

From what I see you the drag&drop control for a chart object.

Here you try to access the InputChannels table of the chart object using '@.InputChannels' and 'self.~.InputChannels'.

 

For '@.InputChannels' '@' has to reference a chart object, which should be the case if it's the drag&drop control of a chart.

 

For 'self.~.InputChannels' the drag&drop control has to be a custom attribute of a chart. Otherwise 'self.~' wouldn't reference a chart object.

 

Regards,

Ralf

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Configure the Chart for Showing the Full and Empty Portions

Creator
Creator

Hi Ralf.

 

Re: Configure the Chart for Showing the Full and Empty Portions

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Tecno,

 

just fix the syntax errors in your methods.

 

The first error is the comment which has a probably unintended line break.

 

The second error is that the string on line 15 is terminated on the next line which is not allowed.

Probably also caused by an unintended line break.

 

Regards,

Ralf

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.