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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Model automatically-Macro

Status
Not open for further replies.

Naido

Technical User
Aug 19, 2007
2
FI
Hi,

I want to create a Model automaticlly with VBA programmation. Can someone help me please?

Thanks,

Naido
 
Yes - in one (or more of three ways)
1) examine the file "NEW MODEL.MAC" in the path "<install path>\Cognos\cer<n>\samples\PowerPlay\Macros\"
2) look at the help file when you run CognosScript Editor (edmacro32.exe)
3) read the pdf files pp_trns_mac.pdf and pp_mac.pdf in the path "<install path>\Cognos\cer<n>\documentation\".

Post back when you've had a chance to digest the information there.

soi la, soi carré
 
I installed Cognos8, but I don´t find any file for the above files in my <install path>\....

it´s some thing wrong with my Installation?



 
Hi,

I think the documentation he just mention are not related to cognos 8.

If you would like to automate the creation of a model, you can use the log of Framework Manager, but you have to create it manually the first time.

Here are the steps to follow:

1. Open Framework Manager.

2. Create a new project and import a data source.

3. Perform any modifications to your model, for example, you could create a parameter map, specify object security

4. Publish the package

5. Close Framework Manager and open it again.

6. Select View Transaction History under the Project menu.

7. Select the checkbox next to the <Project_Name>-xxxxxxxxxx-log transaction list entry. It should the one before the last one.

8. Click Save as Script.

9. Name the script TestScript.xml for example and click Save.

10. Click Close.

Here are the steps to follow to recreate the project you have just created above:
1. From a Command Prompt window, browse to the <C8_INSTALL_LOCATION>\bin directory.

2. Enter BmtScriptPlayer at the Command Prompt for a list of all the possible options.

3. Enter the following at the command prompt:

BmtScriptPlayer -c c:\temp\test\TestProject.cpf -a c:\temp\TestScript.xml -u userID -p password -s namespaceID
where
· BmtScriptPlayer is the Script Player application
· -c is the option to create a new project
· c:\temp\test\TestProject.cpf is the file path of the new project to be created
· -a is the option to specify which action log to apply
· c:\temp\TestScript.xml is the file path of the script to be applied

UserID must have the permission ( by default admin can do that) to create a model.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top