Make apifun toolbox work with Scilab 2027.0.0 - Dirty hack

The often used toolbox apifun which checks input arguments in macros. It installs in 2027.0.0 but after restarting Scilab I got the error:

atomsLoad: An error occurred while loading ‘apifun-0.4.3’:
add_help_chapter: error on line #71: “add_help_chapter: invalid value for input argument #2: an existing directory is expected.”

(translated from German)

The problem is the old SCIHOME\atoms\x64\apifun\0.4.3\etc\apifun.start which checks for jar/ instead for help/.

To workaround this issue just replace lines 29-32 of SCIHOME\atoms\x64\apifun\0.4.3\etc\apifun.start:

path_addchapter = pathconvert(root_tlbx+"/jar");
if ( isdir(path_addchapter) <> [] ) then
     add_help_chapter(modulename, path_addchapter, %F);
end

with

path_addchapter = pathconvert(root_tlbx+"/help");
if isdir(path_addchapter) then
    add_help_chapter(modulename, root_tlbx, %F);
end

Restart Scilab. Worked for me & will solve problems with other toolboxes using apifun.

Maybe one of the maintainer

  • Stéphane MOTTELET
  • Michael BAUDIN
  • Samuel GOUGEON
  • Clément DAVID

of apifun could do the fix and update this useful toolbox? I opened an issue @Gitlab.

Hello @Hani

New apifun version, compatible with Scilab 2027.0.0, is available on ATOMS.

Best regards.

1 Like

Hello @vincent.couvert,

Thank you for your prompt response. I tried the new version on Linux on a fresh Scilab 2027.0.0 installation.

Unfortunately I received the error message after Scilab restart:

atomsLoad: The file '/home/ ... /scilab-2027.0.0/share/scilab/contrib/apifun/0.4.4/loader.sce' from (apifun - 0.4.4) does not exist or is not read accessible.

And the error message is precise. That’s the content of my apifun directory:

loader.sce and unloader.sce is missing.