cancel
Showing results for 
Search instead for 
Did you mean: 

VB Script: Add Portfolio Diagram

SOLVED
MEGA Partner

VB Script: Add Portfolio Diagram

Hi

I need a help about Add Diagram in Portfolio using VB Script. When execute VB Script code, I am getting error which is attached. And stop debugging in red line below. Appreciate your help

................................            

Set colDescription=oPortfolio.GetCollection("Description")
oNewDiagram=colDescription.Add("Portfolio Diagrams")
oNewDiagram.GetProp("Nature")="Portfolio Diagram"

...................................

Thanks Smiley Happy

3 REPLIES
MEGA Partner

Re: VB Script: Add Portfolio Diagram

I don't have access to portfolio, but when I do the following it works.

 

oRoot = megaDb()
oProcess = oRoot.GetCollection("Business Process").Item(1)
colDescr = oProcess.GetCollection("Description")
newDiagram = colDescr.Add ("Test Stijn")

 

don't see much difference with what you do.

MEGA Partner

Re: VB Script: Add Portfolio Diagram

Thanks for your reply, when I do with Business Process it works fine but not with Portfolio.

MEGA Partner

Re: VB Script: Add Portfolio Diagram

I got the solution. As 'Description' MetaAssociationEnd is linked with 'Abstract Diagram' abstract metaclass, where I cant create new diagram but I can connect diagram which already created.

 

     Set colDescription=oPortfolio.GetCollection("Diagram")
     oNewDiagram=colDescription.Add("PortDiagram Diagram")   

 

    Set colDescription1=oPortfolio.GetCollection("~HIedE)fyADy0[Description]")
    oNewDiagram1=colDescription1.Add(oNewDiagram)

Thanks....