Opened 11 years ago

Closed 11 years ago

#2646 closed discussion (invalid)

How to find where OMEdit searches files

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: normal Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: Cc: Adrian Pop, Martin Sjölund, Willi Braun

Description

When we use Modelica.Blocks.Sources.CombiTable with tableOnFile=true, we load data from a file.
We can choose between full pathname and name without path.
I prefer name without path.

Now the first question is: how the user understands where to put his files so that OMEdit can read it?
I remember sjoelund.se once told me which it is but I don't remember, and however the ordinary OM user should not be obliged to rely on the kind help from the forum for such things.
I've checked that this place is not the so-called "working directory" as set in OMEdit options.

Moreover the error message OMEdit displays does not tell us where it has searched for files. In my case, in which the file requested is myFile.txt and my package is EVQSPkg.mo, I got the message:

[C:\Users\ceraolo\Dropbox\Modelica\DymolaVEI\DymolaPE\BatEV\EVQSPkg.mo:16:41-16:66] Error: Variable Sort1.txt not found in scope EVQSPkg.EVbasic.

So the second question is: can the error message be enhanced so that it indicates in which directory the program looked for the file that was unable to find?

and, finally: maybe it is advisable to add some control that enables the user to specify this directory?

Change History (6)

comment:1 by Adeel Asghar, 11 years ago

Cc: Adrian Pop Martin Sjölund Willi Braun added

The place is working directory if you just write the name of the file. I think you should use Modelica:// URI syntax if you want to specify the relative paths.

I agree with having a better error message.

comment:2 by Martin Sjölund, 11 years ago

Making a better error-message relies on improving the library that contains the external code. I would guess ModelicaExternalC in this case. m:newticket maybe?

comment:3 by massimo ceraolo, 11 years ago

Adrpo,
I've tried putting my file in the working directory, but this did not work.
Can you try as well? I used r19853

in reply to:  3 comment:4 by Adeel Asghar, 11 years ago

Replying to ceraolo:

Adrpo,
I've tried putting my file in the working directory, but this did not work.
Can you try as well? I used r19853

Share your model.
Check the last comment here https://trac.openmodelica.org/OpenModelica/ticket/2006

comment:5 by massimo ceraolo, 11 years ago

OK It was my mistake.

The working directory IS the "Working directory" as set in OMEdit.
I'm going to close this ticket.
Sorry for bothering about a false problem.

comment:6 by massimo ceraolo, 11 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.