Function exportTsrToXml(tsrFilePath,xmlFilePath)
Dim autoRepository
Set autoRepository = CreateObject("Mercury.ObjectRepositoryUtil") '创建ORAOM对象
If Not fso.FileExists(tsrFilePath) Then '如果tsr文件不存在
MsgBox "Error:Missed the ObjectRepository file !",48,"Export tsr to xls"
WScript.Quit
Else'否则导出为xml文件
autoRepository.ExportToXML "H:\Repository\2Obj_2d.tsr",xmlFilePath
Set autoRepository = Nothing
End If
End Function