Book a Demo

Author Topic: Synchronise tagged values  (Read 3552 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Synchronise tagged values
« on: August 12, 2014, 04:27:26 am »
Hi all

I'm currently upto my armpits in scripting and generally enjoying it.
My current script creates a bunch of objects based on my own custom stereotype.
However, it does not create the associated tagged values.

I have found the manual command that lets you synchronise tagged values. However, I of course want to do this programmatically and can;t figure out how to do this.

Your help would be greatly appreciated.

Jays :)

Btw, I am using version 9.3

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Synchronise tagged values
« Reply #1 on: August 12, 2014, 04:58:11 am »
Since you're pre-10 you need to fiddle around with t_xref to create the right TVs. Since 10 this has changed and EA creates TVs dynamically. That is, it will show TVs for new elements as if they were present. But actually they are only created in t_objectproperties once you assign a value. Since you are working in a very "stable" environment you will likely have the need to kneel into t_xref. To find you what needs to be done just follow theses steps:
- create an empty EAP
- create a single element of your stereotype-choice
- inspect t_onjectproperties and t_xref
From the record(s) therein it should be clear what you need to create additionally in t_xref. Note: the PK for t_xref can be create using any GUID method of the library of your first choice.

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Synchronise tagged values
« Reply #2 on: August 12, 2014, 05:17:26 am »
Cheers Q, will give that a shot :)