3 weeks ago
I want to make a subset library with the library part converter, but how the converter knows which new library part connects to the old library part.
This is what the help states:
Make subset library:
LP_XMLConverter makesubsetlibrary prev curr subset
prev Location of the previous library in XML (source).
curr Location of the current library in XML (source).
subset Location of the subset library to be created in XML.
I do get some kind of library, but there is no actual migration
I see something of a replacement xml, but how does such a file look like:
-def file Location of the replacement definition XML file.
-cur file Location of the current replacement file.
If the extension is XML, the format will be XML;
otherwise it is saved in binary format (much faster).
a week ago
Hi!
replacement files are a different thing, they can be used for defining parameter defaults: https://gdl.graphisoft.com/tips-and-tricks/how-to-replace-parameter-values-in-xml-format
makesubsetlibrary works with two versions of a library that already has migration scripts and migration tables.
It converts the older version to a subset library, which the user can load as a smaller migration library along the current version. With this technique the current version has to handle migration only from the previous version, the handling of even earlier versions is included in each subset library.
Libparts in the previous library are filtered based on main GUID:
* same exists as main GUID in current -> not included
* same exists in some migration table in current -> included as temporary migration object
* none of the above (existst only in previous) -> included as obsolete
Obsolete objects are copied to the subset library and compatibility status will be set to Obsolete, meaning they are hidden in settings dialog for new objects, but can be modified/copied as already placed objects.
Temporary migration objects are copied without 2d/3d/property scripts, images, binary data. Master, parameter and migration scripts are kept, these are needed for running intermediate steps when migrating from an even earlier version. Compatibility status will be set to Temporary Migration Object, the migration process wil run again on the resulting GUID of their migration script. Temporary objects don't appear as placed objects, they always migrate to something else.
When a temporary migration step refuses to migrate, the result is the GUID in the even earlier subset library. makesubsetlibrary doesn't support this case, the source code of the even earlier version has to be added manually to the subset library. To prevent trying to migrate again on each file open, set Compatibility status "Replacement for Incompatibly Changed Object", a new GUID, a migrationtable entry with AutoMigration, and delete migration scripts.
If the intermediate steps call macros (through the master script for example), it is important to change their main GUID in the current library if their parameter list or script has changed incompatibly. This way the version expected by the code will be included in the subset library.