Using VB API in VBA to edit the Calc Scripts

Guys,
Does anyone of you have VBA source code/examples utilizing Essbase API for the following operation.
I want to copy Calc Script from Server to the client, edit the Script using VBA and copy back the Script to the Server. Any kind of info is appreciated.
Thanks in advance
HYPuser

I posted some real sample code a while back for a completely different function (member renames).
Renaming Existing Member Names
So while you'll have to write the calc modification code yourself (or ask Glenn his rate ;-)), this at least shows you how the initialization / login / termination of the API would work. That's probably the most confusing aspect of using the VB API for the first time anyway.
All that said, if this is from Excel and the user will already be logged in via the Excel Add-In, I believe that you can make life much easier and grab the hCtx directly without any initialization / login/ termination worries. I probably should have done that myself in the example I gave. See Tim Tow's posts in this thread:
API
EDIT: Two things I just noticed - first, the code sample I gave even has an example of polling for ProcState, so that gets you closer than I thought! Second, remembered that the line that reads...
While ProcState.State ESB_STATE_DONE
...should actually have a 'less than / greater than' symbol between ProcState.State and ESB_STATE_DONE. Can't get the forum to display them correctly, even in code tags...
Edited by: TimG on May 16, 2011 2:55 PM

Similar Messages

  • What is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.

    Hello Gurus,
    I want to know what is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.
    For example:
    X=EssVCalculate("Sheetname","Calc_Script name",True)
    In the above code instead of the *"Calc_Script name"* I want a script which is called dynamically and the values are calculated accordingly.
    Thanks in advance
    Saurabh

    Hi Todd,
    This is the situation:
    I have a calc script in Essbase which I can call to perform the calculations on the current sheet that is retrieved. I want calculation for the following formulas:
    x = EssVCalculate("Sheet2", "CalcBC", False)
    CalcBC is my calc script which is present in Essbase
    So instead of passing the above script I want to pass the conditions dynamically in the VBA code . I don't want to mention the script name directly in EssVCalculate option
    For example:
    I have three drop down menus from which I would select three different( zero level )members. It would then retrieve the data for that particular values in the excel sheet and now when I click on Calculate button it should calculate the script dynamically.
    I don't know how calc scripts can be executed dynamically in the VBA code itself.
    Thanks in Advance
    Saurabh

  • How edit the cue script

    I have a cue 7.1 . I need edit the AA script, but there is not EDIT button. Im unable to edit the script.
    In other cue 8 that I have it only allow me edit only one of the scripts.
    How can I enable the edition of one AA sctipt?
    Thnks        

    Hi Rafael
    I hope to take a look on the below link , please.
    http://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unity-express/63897-cue-custom-scripts-start.html
    https://supportforums.cisco.com/docs/DOC-1257
    Thanks
    Please rate all useful information

  • Users priveleges who is able to edit the RMAN script in OEM

    Hi
    Can anyone help me, how to find the list of users who has privileges to change/edit the RMAN script in OEM?
    Thanks

    Hi,
    I believe its required DBA privileges as well as OS level login credential to edit the job,
    you can Query from dba_role_privs which user having DBA role assign, and find those user having OS level Credential.
    HTH

  • Smartview VBA function for launch calc-scripts as strings. like EsbCalc ???

    We have used an Excel VBA which launch an calculation script from a STRING using the VBA Add-In function "EsbCalc".
    We would like to migrate to Smartview VBA functions.....
    The calc-script string has "parameters" which are modified at run-time...
    I have found the function HypExecuteCalcScript - but seems that use as parameters ONLY the calc-script name...
    Is it any VBA function in SmartView which launch a calc-script string (not a calc-script name) ?
    We are using EPM 11.2
    Thanks...

    A tip I just learned at Kaleidoscope 2010* is that one can create a calc script consisting entirely of a substitution variable. In other words, a calc script can look like this:
    &Calc
    Smart View VBA does have a function for changing or creating substitution variables (HypSetSubstitutionVariable). You could create a calc script and subvar in your database as above. Then, at run time, set that subvar to your calc string with HypSetSubstitutionVariable and execute the calc script with HypExecuteCalcScript.
    Quick test (11.1.1.3) shows that this really works.
    I can't remember privileges required to create or set subvars vs execute calc strings off the top of my head - might be an issue (I ran as an admin). Also this approach doesn't support concurrent users, unless they each have a calc script and subvar to themselves. Still, depending on your exact situation, this might be a feasible workaround.
    *I won't credit the presenter solely because the tip came from a presentation which he specifically declined to make public domain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can not run the calc scripts by mxl, if the first character is Number

    I found that if you create the calc scrpt like 1abc.csc. You can not run it by mxl. I tried for times but do not know the reason for that. I found that you can use number in the name of the calc scripts(like abc1.csc, a1bc.csc), but not for the first character(like 1abc.csc).
    Below is my mxl scripts:
    ×××××××××××××××××××××××××××××××××××
    login admin identified by password on localhost;
    spool on to 'C:\abc.log' ;
    execute calculation sample.basic.1abc;
    spool off;
    logout;
    ×××××××××××××××××××××××××××××××××××
    I write a bat file below:
    ×××××××××××××××××××××××××××××××××××
    D:\Hyperion\AnalyticServices\bin\essmsh C:\abc.mxl
    ×××××××××××××××××××××××××××××××××××
    I can run the scripts if I change the name "1abc" to "abc1"or "a1bc".
    Of course I can run this calc in EAS, no matter the name is "1abc" or "abc1".
    Anybody find the same problem with me?

    I agree, if ever there was a "best practice" to developing scripts (especially when using variables) it is to enclose in single quotes. I actually use double quote, single quote.
    execute calculation "'$4'"."'$5'"."'$6'";

  • Why does the calc script screen freezes after executing the script

    Hello Everyone:
    When a calc script gets executed, the calc Script in the ASS freezes even though the calc script has finished it´s execution. Does anybody knows why? How can i prevent these to happen?
    Hope someone could help me, thanks in advanced
    Best Regards

    if you execute the calc script in foreground, console will freezes and it will not allow any thing to do.
    Once script is completed, console will be freed.
    You can execute the calc script in back ground so that you can continue your work and you can track the progress in the sessions.

  • My Essbase db corrupting when i terminate the calc script why?

    Hi All,
    i got the problem with essbase db..It is corrupting the data when i terminating the any running calc script.
    So that every time i m taking the back up for that...
    Please let me know how to avoid this...and why it is corrupting ?...
    Is anything wrong with my Essbase?
    Regards,
    Prabhas

    If by "corrupting" you mean that essbase crashes and you can't restart the db then yes this is unusual and something is wrong with the environment. On the other hand, if you mean that the data is not the same as it was prior to starting the script then no there is nothing wrong. Essbase does not have a rollback feature that undo's the calc script processed up to the point where you killed it.
    Dave

  • I have an iMac, and have a Verizon DSL account. Recently, my Mac Mail keeps requesting the passwords on my account every few minutes, and will not allow me to send messages using Mac Mail. I cannot edit the outgoing server; how can I send emails?

    I have an iMac, and have a Verizon DSL account (3 email addresses). Recently, my Mac Mail keeps requesting the passwords on my accounts every few minutes, and will not allow me to send messages using Mac Mail (the message says that the outgoing server was rejected. I cannot edit the outgoing server, and the keychain will not save my passwords (the ports are valid). How can I change the outgoing server to send emails, and how can I avoid having Mail request my passwords every 2 minutes? Verizon, as usual, will not provide support to iMacs.

    Is there an email saved in your drafts or outbox folder?  I suspect that Mail is continually trying to send it, and each time Google is rejecting the email message.
    You can open the message and then delete it from your Outbox folder.  Then try removing all @gmail email addresses from it and seeing whether you can send to the other folks.  I suspect that will work.
    With email, if an SMTP server *can* verify email addresses, sometimes it will and it will refuse to send messages.  If a message has to be relayed across servers, no verification is done, and you'll get a bounce if an email address is bad.

  • How to edit the installation scripts in the supporting objects

    I wanted to update one of the installation scripts in the supporting objects. I clicked into that script and use the "script editor" tab. After editing the script, I clicked "Apply Changes" button. It redirected me to the upper level of the page. When I reopen the script, the content of this script is messed up and has the content of another script, not what I have changed. What could happen with it? There is one case that the script was all wiped out!
    One general question, how can I easily update the install scripts and reload it without export and import the whole application? or Can I?
    Thanks
    Fengting

    Fengting,
    I am not sure what causes this, but I have had the same issue with shared components >> report queries. Sometimes if you have multiple report queries it becomes impossible to edit any of them. If I remember correctly I tried using a different browser and everything seemed to work ok. I was using Firefox when I was having the issue.
    Sorry this is not an answer, but I feel your pain!
    Cheers,
    Tyson Jouglet

  • Two or more users editing the same script file in cq5, is it possible?

    In cq5 is possible two or more users editing the same jsp file? There is a lock system preventing simultaneous editing of the same file?
    Thanks,
    Gabriel

    you really should use eclipse and maven to work with multiple developers. something like [1] will be helpful
    [1] http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/The+CQ+Project+Maven+Archetype

  • How to edit the VuGen script?

    I am usng VuGen 11.0to  generate script, how to edit the script to make this happen - that inserts a new record to the database when the script runs in BPM?

    Yes, 'View' is read only. Get KompoZer, which is free: you can create web pages in it, or open existing pages and edit them.

  • Fixing the calc script in FDM Planning adaptor

    Hi All,
    I have run into a issue with the load action in the planning adaptor ES9x-G4-A. By default, when the adaptor loads data into essbase it fixes using the script
                                       '*** CALC SCRIPT ***
                                            'NOTE: CALC SCRIPT CAN BE MODIFIED For Each CUSTOMER
                                            'Clear the intersection of (Category, Period, Entity)
                                            strClear = "Fix(""" & strTCat & """,@Idescendants(""" & strCurEnt & """))" & vbcrlf
                                            strClear = strClear & "CLEARDATA """ & strTPer(0) & """;" & vbcrlf
                                            strClear = strClear & "EndFix"
    The issue with this is that it doesn't fix on year, meaning that data loaded with a replace will wipe the same period across every year. Does anyone know what the year variable is to set the fix correctly? I can't find it in any of the documentation, for 9.3.1 or 9.2
    Thanks.
    KMacintosh

    Hi,
    {color:#000000}Try updating the load script to be :-
    {color}{color:#ff0000}strTargYear = API.POVMgr.fPeriodKey(CStr(strPer(0))).strTargetYear
    '*** CALC SCRIPT ***
    'NOTE: CALC SCRIPT CAN BE MODIFIED For Each CUSTOMER
    'Clear the intersection of (Category, Period, Entity)
    strClear = "Fix(""" & strTargYear & """,""" & strTCat & """,@Idescendants(""" & strCurEnt & """))" & vbcrlf
    strClear = strClear & "CLEARDATA """ & strTper(0) & """;" & vbcrlf
    strClear = strClear & "EndFix"
    Cheers
    John
    [http://john-goodwin.blogspot.com/]{color}

  • Will block size effect the calc script performance?

    Hi Experts,
    I have a cube called RCI_LA:RCI_LA, now I have created calc scripts and working fine. But those calc scripts are taking too much time than expected (normally it should not take more than 15 min but those are taking nearly 1 hr or more some calc scripts.)
    In database properties I found that block size is 155896 B i.e. 152.KB but this size should be 8 to 100 KB & Block density is 0.72%
    If block size exceeds more than 100 KB will it impact the performance of Calc scripts?
    I think answer to the above question is “yes”. In this case what should I need to do to improve calc scripts performance?
    Could you please share your experience here with me to come out of this problem?
    Thanks in advance.
    Ram

    I believe Sandeep was trying to say "Dynamic" rather than "Intelligent".
    The ideal block size is a factor in all calcs, but the contributing reasons are many (The main three are CPU caching, Data I/O overhead, Index I/O overhead).
    Generally speaking, the ideal block size is achieved when you can minimize the combination of Data I/O overhead and Index I/O overhead. For this reason a block size that is too large will incur too much Data I/O, while a block size that is too small will incur too much Index I/O. If your Index file is small, increasing your block size may help, although the commonly acceptible block size is between 8K and 64K in size, this is just a guideline.
    In other words, if you test it with something right in the middle and your index file is tiny, you might want to test it with a smaller block size. If your index file is very large (i.e. 400 MB or more), you may want to increase the block size and retest.
    Ways to increase/decrease it are also many. Obviously, changing the dense/sparse settings is the main way, but there are some considerations that make this a touchy process. Other ways are to use dynamic calc in the dense dimensions. I say start at the top of your smallest dense dimension and keep the number of DIMENSIONS that you use D-C on limited. Using D-C members in a dense dimension does NOT increase the index file, so it could be considered a "free" reduction in block size -- the penulty is paid on the retrieve side (there is no free ride).

  • Can you use more than one computer to edit the same Premiere Elements Project?

    I am using Premiere Elements 10.  I have built a new project on my desktop computer because the desktop has a firewire port to capture video from my camcorder and my laptop doesn't have a firewire port.  The project is stored on my home network.  I seem to be able to do editing fine using the desktop computer that the project was created on, but it won't load up right on the laptop for editing.  Premiere Elements is configured the same on both computers.  I guess my question is - does Premiere Elements store something on on the computer that the project was created on that is not being stored on the network drive?    How can I fix the problem so that I can edit on my laptop? The laptop is a top of the line Dell XPS with an i7 processor that I use for other Premiere projects, so the laptops ability is not an issue.
    Thanks
    Bill

    Yes, having files stored on a HDD, but having the letter change between machines is a problem. The Project file (PREL) is only an XML database, with links to the Assets. Those links are Absolute Paths, so if anything changes, from drive letter, to file name, the link is broken.
    I have over a dozen externals, that I use to migrate Projects between my main two computers. Each has had its drive letter set in OS of each computer. I started with Z:\ and worked down. Each drive has a lable on it with the designated drive letter. Unfortunately, I ran out of letters, as the workstation has a ton of HDD's and burners, so I had to start over. That does mean that I cannot have both Z:\ drives plugged in at the same time, but that has never been an issue. I wish that Windows would allow for double drive letters, say ZZ:\, but still, I have a handful of letters to use - just too many externals for those letters...
    Happy editing,
    Hunt

Maybe you are looking for

  • Creating a seamless wireless network with 2 AExpress units

    I have 2 Airport Express units in different parts of my house. I have struggled for YEARS trying to get them to create one seamless wireless network with the same name that I could float between. I have never been able to get that to work. anyone? I

  • How to display S.no adjacent to employees table help plsss

    In a form in tabular format Emp details are displayed Adjacent to the table i want to put a Sno display item showing 1 for 1st employee 2 for 2nd employee ...... I thought i could like create a global variable in a package specification in a program

  • Assistance with improving code

    Hi there, I'm looking for a little bit of help on improving my code. I have a feeling the following could be made to look, and feel a lot better. Originally I had defined image 1-8 as separate variables (var image1:img1 new img1) but instead leave th

  • Is it possible to upgrade a SD to HD on the Apple TV?

    ?

  • HFR Template issue

    Hi , I am trying to create a row and a column template out of a report but when I am trying to save the very first column containing only the dimensions, to save as a row template, its giving error. The same is the case when I am selecting the very f