Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi I am trying to build cubes us

Status
Not open for further replies.

spicysudhi

Programmer
Nov 10, 2003
575
FR
hi

I am trying to build cubes using a macro. the scriptlet is as below,

Set objCubeItem = objModel.Cubes.Item(1)
lobjCubeStatus = objCubeItem.CreateMDCFile()

it works fine when the model contains only one cude, but the CreateMDCFile() returns false when the model contains the Cube Group.

regards,
Sudhi
 
Sudhi,
Why not try the .CreateMDCFiles method?
e.g.
Set objTransApp = CreateObject("CognosTransformer.Application")
Set objModel = objTransApp.OpenModel("D:\PPModels\SalesWeeklyDW.pyi")
With objModel
.CreateMDCFiles
.Update
.SaveAs "D:\PPModels\SalesWeeklyDW.pyi"
.Close
End With
lex
 
yes, i tried that. but the problem is i am trying for a generalized program to build the cubes.

if it is a single cube, we have to use the .createmdcfile() if group we have to use the .createmdcfileS()

how to identify whether it is single or a group !?

i am doing something like this

for i=1 to objmodel.cubes.count
Set objCubeItem = objModel.Cubes.Item(i)
lobjCubeStatus = objCubeItem.CreateMDCFile()
next


because my model has multiple cubes (combination of single and groups)

regards,
sudhi
 
thanks lex, i sorted out this using cubegroup instead of cubeitem

regards,
sudhi
 
Hi Sudhi

Please ,can post that script creating multiple cubes from single model.

I would appreciated u , if u post that script. I am facing some problems on this, its very urgent for me.

Thanks in Advance

Macintosh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top