2017-10-02 05:33 PM
actualGuid = FROM_GUID if (test = t1) then IF (actualGuid = "BF01EC6E-D872-48E4-BB8D-A59B1634557A") then actualGuid = "6A6F3D13-EA87-41D7-86DD-34A6E0C08B83" endif else if (actualGuid = "BF01EC6E-D872-48E4-BB8D-A59B1634557A") then actualGuid = "861BD837-D86A-4752-9462-A564141EA066" endif endif SETMIGRATIONGUID actualGuidThis code didn't work :S
2017-10-06 03:04 AM
This should work now.
I modified the old test object so it could be a cube or sphere (to easily tell the difference).
I also modified new 1 to be cube and new 2 to be sphere.
In the migration script there was no need for brackets around the … actualGuid=...
I didn't notice this in your original script.
Also when checking the value of the parameter it need to be in quotes as it is a string value (not numerical ... if t1 = "1" then
And I forgot to add the command ... setmigrationguid actualGuid ... at the end of the migration script.
Amended files are attached - I have them in two libraries (folders) - old and new.
Load both.
Place the old object in the plan twice - once as a cube and once as a sphere.
Then delete (un-load) the "old" library and they should replace with each of the new objects.
2017-10-06 10:57 AM
Barry wrote:So if it is just 1 old object migrated to 1 new object, I only have to search for the old object through the 'Migration' tab. If I understand correctly. I assumed I needed to put some code in the forward migration script of the old object.
For those following on at home here is the info I sent JGoode directly (Archicad-talk was playing up and I couldn't post).
Amended files attached as well.
This should work now.
I modified the old test object so it could be a cube or sphere (to easily tell the difference).
I also modified new 1 to be cube and new 2 to be sphere.
In the migration script there was no need for brackets around the … actualGuid=...
I didn't notice this in your original script.
Also when checking the value of the parameter it need to be in quotes as it is a string value (not numerical ... if t1 = "1" then
And I forgot to add the command ... setmigrationguid actualGuid ... at the end of the migration script.
Amended files are attached - I have them in two libraries (folders) - old and new.
Load both.
Place the old object in the plan twice - once as a cube and once as a sphere.
Then delete (un-load) the "old" library and they should replace with each of the new objects.
No there is no need for anything in the Forward Migration script of the old object.
That stays exactly like it is.
In fact it won't even be in your loaded library so there is no need to do anything to it at all.
All you need is the GUID for it in your new objects, so they know when they come across a missing object (because it is not in your loaded libraries) with that GUID it will be replaced with the new object.
Barry.