<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Henk,</p>
<p> </p>
<p>Depending on which version of the software you're using (16 or 17), I'm guessing you didn't set the INFO(6) array indicator correctly or didn't call the SetNumberofOutputs function correctly. Let's say you had two outputs plus a variable number of outputs depending on the number of layers (let's say this is parameter 5).</p>
<p>Here are the relevant snippets of code you'll need in both versions:</p>
<p> </p>
<p>v 17:</p>
<p>!Declarations</p>
<p>Integer N_Layers_Max, N_Layers,N_Outputs</p>
<p>Parameter (N_Layers_Max=99)</p>
<p>Double Precision Temp_Layer(N_Layers_Max)</p>
<p> </p>
<p>!First Call of Simulation Manipulations</p>
<p>If (FirstCallofSimulation) Then</p>
<p> N_Layers=JFIX(getParameterValue(5)+0.5)</p>
<p> If (N_Layers>N_Layers_Max) Then</p>
<p> Call FoundBadParameter(5,'Fatal','The number of layers must be less than 99.')</p>
<p> Return</p>
<p> EndIf</p>
<p> </p>
<p> N_Outputs=2+N_Layers</p>
<p> Call SetNumberofOutputs(N_Outputs)</p>
<p> </p>
<p>EndIf</p>
<p> </p>
<p> </p>
<p>v 16:</p>
<p>!Declarations</p>
<p>Integer N_Layers_Max, N_Layers, N_Outputs, N_Parameters, N_Inputs, N_Derivatives</p>
<p>Parameter (N_Layers_Max=99)</p>
<p>Double Precision Temp_Layer(N_Layers_Max)</p>
<p> </p>
<p>!First Call of Simulation Manipulations</p>
<p>If (Info(7).eq.-1) Then</p>
<p> N_Layers=JFIX(PAR(5)+0.5)</p>
<p> If (N_Layers>N_Layers_Max) Then</p>
<p> Call Typeck(-4,Info,0,5,0)</p>
<p> Return 1</p>
<p> EndIf</p>
<p> </p>
<p> N_Outputs=2+N_Layers</p>
<p> N_Parameters=3</p>
<p> N_Inputs=3</p>
<p> N_Derivatives=0</p>
<p> Info(6)=N_Outputs</p>
<p> Call Typeck(1,Info,N_Inputs,N_Parameters,N_Derivatives)</p>
<p>EndIf</p>
<p> </p>
<p>Hope this helps.</p>
<p> </p>
<p>Jeff</p>
<div>
<pre>---</pre>
<p>Jeff Thornton</p>
<p><em>President - TESS LLC</em></p>
<p><em>22 N. Carroll Street, Madison WI USA 53703</em></p>
<p><em>Office: (608) 274-2577 Fax: (608) 278-1475</em></p>
<p><em>www.tess-inc.com</em></p>
<p><em>E-Mail: thornton@tess-inc.com</em></p>
<p> </p>
</div>
<p>On 05/08/2012 8:22 am, Henk Stijnen wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored --><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-mailStijl17
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:windowtext;}
span.E-mailStijl18
{mso-style-type:personal-reply;
font-family:"Arial","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';">Hi,<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';">I’ve created a component in which it’s possible to specify a dynamic number of output variables. In the parameters there is a variable “number of segments to monitor” and depending of that number there are output variables created. So far OK. However, when I link the newly created output variables to some printer I get an error “The listed input referenced an output number beyond the allocated outputs for the connected type”. What can be wrong?<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';">Thanks for help<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif';">Henk<!-- o ignored --></span></p>
</div>
</blockquote>
</body></html>