cancel
Showing results for 
Search instead for 
Did you mean: 

Merging Entities

GeorgeMcGeachie
Active Contributor
0 Kudos

I need to write a script that will merge an entity into another entity, adding and renaming attributes where necessary, and documenting the properties of the 'merged from' entity in the 'merged into' entity without overwriting them.

I've experimented with the MergeInto function, but that doesn't do the job properly - it removes the attributes from the 'Merge From' entity, and doesn't check the names of the attributes and identifiers that it creates in the 'merge Into' entity; it also changes all the entity symbols to point to the 'Merge into' entity, which I don't want it to do, as I'll be removing the 'Merge from' entity when I've finished.

Is this an issue that someone has tackled already? The old Bachman Groundworks tool used to have a wizard for merging entities, which I really liked, perhaps there is one for PD that I haven't come across?

I suspect I could find a way of using the model merge functionality to do the job, but it's probably simpler to write something specific.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi George,

Are you going from 1 model to another or merging entities within an model?

If you don't miund using VBscripts, this is pretty easy, I have done several similar scripts in the past.

Tim


GeorgeMcGeachie
Active Contributor
0 Kudos

We're actually running denormalisations in the LDM instead of the PDM, by collapsing 1:1 relationships into the dependent entity. The scripting isn't too bad .

GeorgeMcGeachie
Active Contributor
0 Kudos

I've got my basic script working, though I have to handle each property, collection and extended attribute separately.

I've tried to find a method that copies a sub-object from one object to another, is there really no such thing?