[MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG


[MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#1
This question is about MLCad 3.40.

I know that MLCad settings are stored in 2 files mainly, which sit in its program folder:
- MLCad.ini - contains its main application settings, including folders to look in for parts, settings for its built-in LSYNTH support, settings for the Minifig generator etc.
- MLCad.grp - contains the configuration of its parts tree which allows to group parts together into groups by their name

However, MLCad creates a binary file named MLCAD.cfg in my LDRAW folder additionally
when I run it. It re-creates the file when I delete it.

Does anyone know what this file contains, what its purpose is?
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#2
From what I observe it stores (may be among other things) the visible menu bars
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#3
Not your question, but just for clarity for anyone else reading this...

The "MLCad.grp" file in v3.40 is technically obsolete, although I believe MLCad will still import it if a legacy "MLCad.grp" file is found from an earlier version of the software.

However, the structure of the Favourites and Group Definitions is now primarily in the registry:
HKEY_CURRENT_USER\Software\Lachmann\MLCad\Favorites
HKEY_CURRENT_USER\Software\Lachmann\MLCad\GroupDefs

A user who freshly installed v3.40 on a clean system won't even have a "MLCad.grp" file.
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#4
The only thing I've noticed it stores is the chosen colors on the colorbar, if you right-click on a colorbar entry to change its default color. It doesn't seem to store the position or enable state of the toolbars though, as those are in the registry.

Edit:
A bit of digging and it seems that there are 68 bytes in my MLCAD.CFG file. The last 64 of these are 16 longwords specifiying the colors of the 16 color entries on the colorbar.

I believe the first 4 bytes are the version number 3.40.0.0
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#5
thanks. this clarification was exactly what I wanted to know.
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#6
That change was a real setback for me. Before I used to have several "Favourites" files ready with the inventory of certain sets (WeDo, NXT, ...). Now each time I want to use a certain specific set of parts I need to manually recreate the Favourite group. Or am I missing someting?
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#7
If you want to switch favourites within the current 3.40 version then it is quite easy.

Favourites are stored in the registry under the key:
HKEY_CURRENT_USER\Software\Lachmann\MLCad\Favorites

The easy option, having created a list of favourites, is to exit MLCad and use RegEdit to rename this key to:
HKEY_CURRENT_USER\Software\Lachmann\MLCad\FavoritesSet1

Upon relaunch of MLCad, it will create a new blank "Favourites" key again. Once you have populated this set you can do the rename thing again for additional sets. Then when you want to restore a previous set, just do the relevant renames so that the set you want to use is called "Favourites" rather than "FavouriesSetN".

Alternately, another method is to use RegEdit to export the Favourites key to a .reg file. When you want to load up a previously saved file of favourites you delete the current Favourites key from the registry (which you have previously backed up to a file) and double-click the other saved .reg file to import it back to the registry. This way you can easily store file-based backups of all the Favourites sets if you don't want to rely on them all just being in the registry.

Just remember to do all the renames/exports/imports whilst MLCad is NOT running.

Edit:
I should probably add: if you're not confident in using RegEdit then please ignore this entire post. Making a mistake within the wrong key in RegEdit can leave your system completely wrecked and unable to boot ;-)
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#8
your *.reg file can contain both commands to add _and_ to remove registry entires.
you can achieve a fully automatic solution by keeping a set of *.reg files which you double click to apply them
(Windows calls that "merge") to your computer before launching MLCad

https://support.microsoft.com/en-us/kb/310516
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#9
Thanks!
It means recreating the files but it's a functional solution (I still think it is a pity it is no longer "easy" for the "general public" though).
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#10
If you still have your old files in the "MLC_Favorites.txt" format then you shouldn't need to recreate anything.

Rename (or delete) existing Favourites key in registry.
Place desired MLC_Favorites.txt file into MLCad directory.
Launch MLCad - it will detect the non-existent Favourites key in the registry, detect the "legacy" MLC_Favorites.txt file and import it to the registry into a new Favouries key.

You could just leave it at that - follow the above procedure each time you want to switch favourites - and you could even automate the deletion of the key.

But since MLCad now can't write out an updated MLC_Favorites.txt file it might be a good idea to use RegEdit's export functionality to essentially one-time convert all your old .txt files one at a time into .reg files so that it becomes easier to update these existing files and apply them.
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#11
And another thank you. I hadn't thought of that option. I don't know much about automating this kind of thing, but I'll have a good look at the concept and the link provided.
Reply
Re: [MLCad 3.40] MLCad.ini vs. MLCad.grp vs. MLCAD.CFG
#12
Yeah, I wish MLCAD didn't use the registry too.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)