cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB Script: Add Portfolio Diagram

farhad
MEGA Partner
MEGA Partner

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 🙂

3 Replies

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....

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

SVanSchoonlandt
Honored Contributor

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.