Author Topic: Hide label using VBScript  (Read 1584 times)


  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Hide label using VBScript
« on: September 03, 2018, 07:33:54 pm »
I have created a VBScript to populate a sequence diagram but I often have the same label for multiple information exchanges. I would like to hide the information labels for select exchanges.

The code to create the information exchange:

Code: [Select]
set sequenceMessage = fromObject.Connectors.AddNew(infoExchangeText, "Sequence")
sequenceMessage.SupplierID = toObject.ElementID
sequenceMessage.SequenceNo = sequenceMessageCounter
sequenceMessageCounter = sequenceMessageCounter + 1

I am trying to hide the 'infoExchangeText' label.

Any help would be very much appreciated.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hide label using VBScript
« Reply #1 on: September 03, 2018, 08:30:16 pm »
I think you'll have to look into the diagramlinks and their style fields.



  • EA Guru
  • *****
  • Posts: 12821
  • Karma: +366/-295
  • I'm no guru at all
    • View Profile
Re: Hide label using VBScript
« Reply #2 on: September 04, 2018, 09:28:57 pm »
The information is stored in t_connector.PDATA5. You can not modify it via the API (wail) so you need to use Repository.Execute. Whether or not a message is displayed it decided by the text HDN=1 or =0. There's more stored in PDATA5 which might be of interest. Just see how a manual change is reflected there.