Opened 10 years ago

Closed 10 years ago

#2646 closed discussion (invalid)

How to find where OMEdit searches files

Reported by: ceraolo Owned by: adeas31
Priority: normal Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: Cc: adrpo, sjoelund.se, wbraun

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 Changed 10 years ago by adeas31

  • Cc adrpo sjoelund.se wbraun 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 Changed 10 years ago by sjoelund.se

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 follow-up: Changed 10 years ago by 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

comment:4 in reply to: ↑ 3 Changed 10 years ago by adeas31

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 Changed 10 years ago by ceraolo

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 Changed 10 years ago by ceraolo

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.