Skip to Content
0

"Automation error" when run VBA EPM RunPackage

Aug 03, 2017 at 08:49 PM

88

avatar image
Former Member

Could someone help to fix my error in VBA.

I try to execute this code and got the error "automation error"....Thanks

=============================================

Sub test()

Dim pkge As New FPMXLClient.ADMPackage

Dim EPM As New FPMXLClient.EPMAddInDMAutomation

With pkge

.GroupId = "Data Management"

.TeamId = "BPC_CC"

.Filename = "/CPMB/CLEAR"

.PackageId = "Clear"

.PackageType = "Process Chain"

.PackageDesc = ""

.UserGroup = ""

End With

EPM.RunPackage pkge, "C:\Temp\DMUserSelection4.xml"

End Sub

===================================================

Here's my XML file

======

Clear{param_separator} http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">

<_ap>

<Name>%SELECTION%</Name>

<Values />

</_ap>

<_apc>

<StringListPair> <str>CATEGORY</str> <lst> <string>ACTUAL_FMO</string> </lst> </StringListPair>

</_apc>

</AnswerPromptPersistingFormat>

</ArrayOfAnswerPromptPersistingFormat>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Vadim Kalinin Aug 04, 2017 at 07:55 PM
0
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 04, 2017 at 08:39 PM
0

Yes I saw your blog. This is from where I started but I still have this "Automation Error". I wrote my code and built the XML file based on your blog. But maybe I mist something. You can see my code and XML above.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

In your code you are using not all variables required to run standard Clear package!

0
Vadim Kalinin Aug 06, 2017 at 12:02 PM
0

Using the code from my blog you have to:

Public Sub TestRunDM()
    Dim strAnsw() As String
    ' Sample to run Clear DM package    
    ReDim strAnsw(0 To 3)
    strAnsw(0) = "%SELECTION%P|DIMENSION:CATEGORY|ACTUAL_FMO"
    strAnsw(1) = "%SELECTION_KEYDATE%V-1"
    strAnsw(2) = "%ENABLETASK%V1"
    strAnsw(3) = "%CHECKLCK%V0"
    ExeceuteDM strAnsw, "BPC_CC", "Data Management", "Clear", "/CPMB/CLEAR", "0001"
End Sub
Show 5 Share
10 |10000 characters needed characters left characters exceeded

P.S. Are you sure that you have Clear package in BPC_CC team folder - in the Data Management subfolder?

0
Former Member

I found the error, I was missing this part in my code:

.UserGroup = "0001"

Now it works....thanks

0

Then close the question accepting the correct answer.

0
Former Member

Last question...do you know how to start a Package-Link ?

0

There is no way to start Package-Link the same way (passing answer prompt).

0