Book a Demo

Author Topic: makeComposite() t_xref and  NType  (Read 3814 times)

gilles2

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
makeComposite() t_xref and  NType
« on: December 17, 2009, 03:58:03 am »
Hi dear EA community,

Here is my problem,
I am trying through the automation interface to create a new stereotyped component, directly composite with a stereotyped diagram

After analysing different posts in the forum and trying my owned experciences I managed to find clues and theories but not a definitive answer. May someone here be able to help me ?

First of all the custom command SynchProfile is very useful to retrieve taggedvalues from a profile but not very to retrieve _makeComposite or _defaultDiag... (it's quite logical because to apply the syncprofile you must have created an element first and those properties are applied only to being created elements. but it's quite disturbing because you need to "code" twice your profile properties in a way)

So you need through the API
- to make your element composite using field NTYPE(=8) in t_object table. Here all is fine.
-to create your specific diagram as a nested one on the element. still ok.

Here comes troubles.
In many post, the "community" said "fill PDATA1 field with your diagram id" and your both new element & diagram are linked : no effect in my case.

And then i found an interesting post explaining that there were two ways of linking diagram & its composite element, through PDATA1 for Activities ... and using t_xref table for components. And  of course in my case, i am trying this with a stereotyped component.

So in t_xref table you linked a customer and a supplier and all is fine.
But now how can I make an Insert in the t_xref table ... I mean how can I get a new XrefID without perturbing an internal EA Sequence or anything else ?

PS : sorry for my english.

Cheers,
Gilles

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: makeComposite() t_xref and  NType
« Reply #1 on: December 17, 2009, 01:21:46 pm »
Hi Gilles,

XRefIDs are just GUIDs - get one from your friendly GUID dealer...  ;D

You won't break any EA internal sequences.

HTH,
Paolo
« Last Edit: December 17, 2009, 01:22:02 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!