"Not enough input arguments" error using add_line()
2 views (last 30 days)
Show older comments
Hello !
I'm trying to use add_line() function and to organize link with the 'autorouting' parameter. Here is my code :
add_line(sprintf('%s',diagrammeName), [pos_array_out{pos_out};pos_array_in{pos_in}], 'autorouting','on');
where pos_array_out is a cell of Output position and pos_array_in is a cell of Input position.
And pos_in and pos_out are index of cell.
But it returns me an error :
Not enough input arguments
And i don't understnd why
0 Comments
Answers (1)
Stephen23
on 28 Jun 2019
Edited: Stephen23
on 28 Jun 2019
"...i don't understnd why"
Read the error message!
add_line(sys,out,in,'autorouting',autoOption)
but in your code you have concatenated out and in into one array. Try this:
add_line(sprintf('%s',diagrammeName),...
[pos_array_out{pos_out}],... OUT
[pos_array_in{pos_in}],... IN
'autorouting','on');
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!