Book a Demo

Author Topic: Adding Flow Properties direction using VB Script  (Read 3303 times)

Deepu M

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Adding Flow Properties direction using VB Script
« on: September 29, 2020, 09:46:05 pm »
Hi,

Iam trying to add an Interface Block for representing a data type for my port. As part adding direction of the data flow, I need to add a flow properties inside the interface block. When I type my port with this interface block , it will show the data type and the direction of the flow.

I trying to add this using VB Script using the following code and Iam not able to set the direction to the flow properties using the script

dim strDataFlowTypeName
strDataFlowTypeName = InputBox("Enter the Data flow type Name")
MsgBox CStr(thePackage.Elements.Count)
set dataFlowType = thePackage.Elements.AddNew(strDataFlowTypeName,"InterfaceBlock")
dataFlowType.Update()
if Not IsNull(dataFlowType) Then
Set dataFlowProperty = dataFlowType.Elements.AddNew(strDataFlowTypeName, "FlowProperty")
// Here I need to set the direction of the flow propery as "Out"
// Iam tried a lot to set that
dataFlowProperty.Update()


Any help to solve this will highly be appreciated

Best Regards
Deepu M

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding Flow Properties direction using VB Script
« Reply #1 on: September 29, 2020, 09:59:16 pm »
I guess you'll have to check where that property is stored in order to figure out how to set it.

I would start looking at
- t_object (the element)
- t_objecttproperties (tagged values on the element)
- t_xref (all kinds of stuff)

Geert