Topics

Parameter file library defaulting to previous version folder #Parameter #V5dot2dot1


Andy - Arlington TX
 

I just installed 5.20GA, and most things seem to be working.

However, when I go to parameter files, the library button opens a file viewer in the parameter file directory from in the previous version 4.2.1.

All of the loaded param files are from the 5.20GA folder, so I don't know why it always wants to go to the previous version's param file folder.

I've repeatedly set it back to the 5.20GA folder's parameter files location, but every time I open up parameter files>library, it goes back to the previous version's location.

How do I get 5.20GA to go to its own parameter files folder by default?


Adam Richards
 

Andy,
What platform are you running on, please? 

Also where is the program located (folder)? 

Adam


Robert Scott
 

Adam,

Running Windows 10 and Xtrac 5.2.0GA.

On start up, the parameter files fail to load and I get an error message.
It appears the program is not pointed at the "library" but at "params" for files.
I can load files from the library directly as a work around, it just appears the program is looking in the wrong place.

Bob

On Wednesday, November 25, 2020, 12:41:16 a.m. EST, Adam Richards <adamjmrichards@...> wrote:


Andy,
What platform are you running on, please? 

Also where is the program located (folder)? 

Adam


Adam Richards
 
Edited

Bob and Andy,

OK - first there is a bad compare for windows when we are loading the parameter files at start up, we test to see if the named directory path for a file is a system directory and, if it is, we don't reset the default parameter directory.  It seems like in your case you (as expected) have some parm files listed in the old system directory and the default may be being set there - that's why "Browse..." goes there by default.  

The test uses a Linux style path  "/a/b/c" rather than Windows "\\a\\b\\c" so it isn't going to work properly on Windows. 

Fix pushed.

--------

But that doesn't totally explain the Andy issue, because the "Library..." function should still go to the right place, but I suspect in that in your preferences file xtrkcad.ini, located in folder

User\userid\AppData\Roaming\XTrackCad

there is a value set like this - 

[file]
paramdir=path-of-4.2.1-params-directory

That acts an override for the Library function to point to other than to the shipped directory.  I would try finding and deleting that value, restarting and then retrying the "Library..." function. 

Now in the actual loading during a startup the correct test is being done and the code will try and "re-wire" the file in a prior version system directory from the V5.2 directory. So the reason for the missing parm files at startup is probably that some of the files you were using from the V4.2 library have been renamed since that release in the V5.2 library. If you can't find the equivalents, post them and I will try and point you in the right direction.

Adam


Joost van der Waa
 

Running the same version and noticing Xtrkcad is looking at a very strange place when clicking on " Browse" in the parameter dialog.


Joost van der Waa
 

Adam,

In addition to me previous reply: in the ini file the param line reads: paramdir=X:\Data\Treinen\Xtrackcad\ where some parameter files are located, but not all.
Clicking on Library in the parameter dialog will load the files from that directory.
However, when clicking on browse in the parameter dialog, Xtrkcad is looking for the parameter files in X:\Data\Treinen\ (so actually one directory higher).


Andy - Arlington TX
 

Sorry, Win10, Dell, Intel Core i5

"C:\Program Files (x86)\XTrackCAD\bin\xtrkcad.exe" for 5.2.0

The old installation is (and was, prior to installing 5.2.0) at: C:\Program Files (x86)\XTrkCAD 4.2.1\


Andy - Arlington TX
 

Adam, 

I have no XTrackCad folder under my Roaming folder, just folders for a couple of other unrelated apps.

I found the new, correct (renamed) parameter files okay, but I noticed a bunch of new ones (or more likely, just ones I had not noticed before, for structures, cars, etc.) So I have been loading and browsing (and unloading some...), and every time it, by default, points me back to the previous install when I want to look for new parameter files.

Keeping the old install is only temporary, so hopefully once it is gone, then 5.2.0 will start to look in its own folder...

BTW, really like the new version!!!


Adam Richards
 

Andy,

Yes - that is consistent because there are two different mechanisms/locations at work - one for Browse and one for Library. The Library function does not update location as it was supposed to point at one place only. Remove the [file] paramdir override value in the configuration file and it should be set correctly every time (new system directory).  

The whole idea of the Library function was that it would "always" point to the system libraries as new users in particular were always asking "where are the parameters?" and we would have to tell them a system specific way of finding them (based on how they installed the program). Library also supports searching via the Contents field inside each file, because the names were not always very helpful and we have a lot of them. 

So Library was supposed to be something that just "worked" to access and the shipped parms.  In typical fashion, however, we had an override for people who want to have a different library store of their own -> hence this situation.  

In other words, in V5.2, 
  • Library is supposed to be the easy way to access those Read-Only product shipped parms, 
  • Browse is intended for any "extra" files R/W.  

At one point in design, Browse was inside the Library window as a form of extension of it. But that seemed likely to confuse folks who would look for Browse on the first screen and not find it to me. So having both on the same window is my fault.  If there are suggestions about how to more clearly signal intent....

-----------

For completeness - here is the way it all works -  

 
1. The Browse.. directory is set like this -
  • first 
    • we look at the value in the configuration file .ini (.rc on Linux) of [path] params=parameter-value-stored-from-last-run
    • if that doesn't exist, we look at the value of [file] directory=different-value-never-set-by-V5.2 (i.e., user override)
    • if that doesn't exist either, we get the "home" directory (on Windows from the OS, on Linux/Mac from the HOME environmental variable)
  • then
    • it is reset and saved into [path] params by each parm file actually loaded during startup or via browse by the user - with the exception that it is supposed to (but doesn't on Windows at V5.2GA) ignore that last directory if it is a system directory (contains the parts "/share/xtrkcad/params/"). On Windows that should be "\share\xtrkcad\params\" but wasn't... 
So I assume that the last parm file loaded was in X:\Data\Treinen\ and that would be (after shutdown/save) this value in 
[path]
params=X:\Data\Treinen\

The reason we ignore the system file directory (it is all my fault again) is that I felt that location was not of particular interest compared to the place any extra files you downloaded, or custom files you created, are located now there was a new Library function only for the system files. In fact, by having Browse directory to point at the product parms, that also affects the Move To of Manage->CustomParts, so it is possible to "update" the shipped parms library, perhaps unintentionally. 
 
2. The Library directory is set independently of Browse, 
  • normally to the current system parm directory based off where the program was started from (shipped params)
  • but will be overridden by the [file] paramdir value in the config file if it exists. That value is only read and not written. As you note, this is set for you to X:\Data\Treinen\Xtrackcad\ , so I would expect that is where Library will look. I would delete the config value completely, so you get it back to default, but you could alternatively copy the system parms there if you want to be independent, I suppose.
Adam


Joost van der Waa
 

Hi Adam,

I completely understand the logic you described, but that is not how it seems to work in 5.2.0GA.
My file section reads like this:
[file]
directory=D:\Data\Desktop
paramdir=X:\Data\Treinen\Xtrackcad\

The library button shows indeed the custom param files in X:\Data\Treinen\Xtrackcad\ with the Contents line as desciption.
However, the browse button goes to X:\Data\Treinen\ (so one level higher). I can assure you that no param file ever has been stored in that directory (to rule out that line of thinking :-) ).
It never reaches the paramdir directory, nor the the directory in directory=D:\Data\Desktop, let alone my home directory (which is - I guess - the "documents" folder, which is in d:\data).

It is not dramatic, it is just that it doesn't work as you described.

Joost


Adam Richards
 

Did you notice I said [path] and params is read for Browse first, is that set? If it is [file] directory is ignored. 

That could be something that should be reversed in the order - so that the user setting completely overrides...

Adam


 


Joost van der Waa
 

Hi Adam,

Sorry, I misread your initial reply and only searched for "param" (and then encountered the file section).

My paths section reads like this:
[paths]
layout=X:\Data\Treinen\Xtrackcad
bitmap=D:\Data\Desktop
dxf=D:\Data\Desktop
parts=D:\Data\Desktop
params=X:\Data\Treinen

This indeed explains why browse is looking in this directory.
Still haven't got a clue how it ended up with this value for params.
Also rather funny to see 2 sections with file directories :-)