Book a Demo

Author Topic: how to add connector to element using VBscript  (Read 3772 times)

pfeder

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
how to add connector to element using VBscript
« on: January 29, 2010, 09:36:16 am »
I tried the following but internal error thrown on update. Not sure of all steps to add connector as no examples found in local script

set newConn = currentElement.Connectors.AddNew ("peter","Associate")
newConn.SupplierID = pedTableID
newConn.Direction ="SourceToDestination"
newConn.Update

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: how to add connector to element using VBscript
« Reply #1 on: January 29, 2010, 07:06:52 pm »
You've go the type of the connector wrong.
Look in the help file for the allowed types.


Geert

pfeder

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: how to add connector to element using VBscript
« Reply #2 on: January 30, 2010, 01:23:16 am »
Thanks - it works fine now.
I found the wrong type in another post.

The real problem I am trying to solve is after import from Oracle I have several schemas. Currently I must import schema by schma. The foreign keys are found for relationships within same schema, but not across schemas. So my script is to reestablish these relationships for documentation purposes. So far I got this to work. However I cannot find trick to show column as a FK attribute. I looked everywhere in element and association properties to see how this is done but no luck. Any ideas on this one?