Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PanWojtek

Pages: [1]
1
Automation Interface, Add-Ins and Tools / Access to 'link' in VBA
« on: March 06, 2024, 01:46:56 am »
Hello All,

suppose 'requirment' type, lets call it Req A  has a link: 'propierties->Related->Links' to other requriements (eg: Req B, Req C)

How to get all linked entities in VBA script when printing:
i want to have this:
Req A->Req B
Req A->Req C

dim currentElement as EA.Element
   for each currentElement in currentPackage.Elements
      Session.Output( indent & "::" & currentElement.Name & _
         " (" & currentElement.Type & _
         ", ID=" & currentElement.ElementID & ")" )
   next

seems that class EA.Element does not have any attribute for links - only thing i notice is 'Connectors' attribute which stores number of such links;

BR
PW

2
thanks for answer.

i tried to google how to install/enable .net for EA, but with no luck,

could you point me how to make it?


3
Hello All,

I got issue when trying to create arrayList object (i got EA15)
dim myArrayList
set myArrayList = CreateObject( "System.Collections.ArrayList" )

program stops, and popup with empty message occurs.
(i cannot add attachment here)

on the other hand i had no issue with dictionary - and this code works:
dim efferentKPI
set efferentKPI = CreateObject( "Scripting.Dictionary" )

thanks for all suggestions



Pages: [1]