create-cube.mac 740 B

12345678910111213141516171819202122232425262728293031
  1. Dim objApp As Object
  2. Dim objModel As Object
  3. Dim objCube As Object
  4. Dim filename as String
  5. Dim folder as String
  6. Dim publish As String
  7. Sub Main ()
  8. Rem On Error Resume Next
  9. rem folder = "C:\GAPS\Portal\System\Models"
  10. rem filename = "belege.mdc"
  11. rem publish = "C:\GAPS\Portal\System\Cube_out\temp"
  12. folder = GetField(Command, 1, ",")
  13. filename = GetField(Command, 2, ",")
  14. publish = GetField(Command, 3, ",")
  15. Set objApp = CreateObject("CognosTransformer.Application")
  16. Set objModel = objApp.OpenModel(folder + "\" + filename)
  17. Set objCube = objModel.Cubes.Item(1)
  18. objCube.MDCFile = publish + "\" + filename + ".mdc"
  19. objCube.Update
  20. objCube.CreateMDCFile
  21. objModel.Close
  22. objApp.Quit
  23. End Sub