Archi Forum

Archi Plug-ins => jArchi => Topic started by: malcolm_t_evans on October 09, 2020, 08:38:53 AM

Title: model variable (bug or reserved word?)
Post by: malcolm_t_evans on October 09, 2020, 08:38:53 AM
Whilst testing out some scripts I used a variable model as a string whilst importing a csv file.  However when trying to run the script, jArchi produces the following error:

Script Error: javax.script.ScriptException: TypeError: model.find is not a function in <eval> at line number X

As soon as I change the variable name to something other than model, the script works fine.  I couldn't find any mention of "model" as a existing variable or declared function in the jArchi wiki.  So is this a potential bug or a reserved word that should be mentioned in the wiki to avoid using?

Thanks,

Malcolm
Title: Re: model variable (bug or reserved word?)
Post by: Jean-Baptiste Sarrodie on October 09, 2020, 08:54:28 AM
Hi,

Yes, 'model' is already defined by jArchi and references the current model. It's API is described here: https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#model-2

Regards,

JB