‎17-04-2012 03:35 PM
I need to automate the conversion 'Conversion of link instances to Generic MetaAssociation (2009 and earlier versions)' with API script
The code runs witout error, the windows ''Conversion of link instances to Generic MetaAssociation (2009 and earlier versions)' is displayed but the conversion itself is not performed
I use the following code
MyRoot.Convert "5121519B48310030,@UPGRADE"
where
Complete script
sAdmUser = "Administrator"
sAdmPwd = ""
sEnvPath = "C:\_StandardData\725_cp05_Standard"
sRepository= "26596_7"
sRepositoryPath = sEnvPath & "\Db\" & sRepository
Set oMegaApp = CreateObject("Mega.Application")
Set oEnvironment=oMegaApp.Environments.item(sEnvPath)
'open environment in update mode
oEnvironment.CurrentAdministrator = sAdmUser
oEnvironment.CurrentPassword = sAdmPwd
'Msgbox "Environment opened: " & oEnvironment.Name
'get repository and root
Set lRepositories = oEnvironment.Databases
Set oRepository = lRepositories.Item(sRepository)
'Msgbox "Repository: " & oRepository.Name
Set MyRoot = oRepository.Open
Msgbox "Root: " & MyRoot.Name
'run conversion MEGA Repository - Conversion of link instances to Generic MetaAssociation (2009 and earlier versions) / hexaidabs = 5121519B48310030
MyRoot.Convert "5121519B48310030,@UPGRADE"
MyRoot.MegaCommit
'free root and collections
MyRoot.BaseClose
Set lRepositories = Nothing
Solved! Go to Solution.
‎19-04-2012 12:45 PM
Hi jerome,
I propose you to refer to the document "Call a conversion tool in API script " in the following link http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqReAAI
regards