It's all about the answers!

Ask a question

Can module hierarchy be automatically built from base Parent Of and Child Of links?


Michael Laurendi (1051044) | asked Sep 05 '18, 1:45 p.m.

 Can module hierarchy be automatically built from base Parent Of and Child Of links?


A simple example: base artifacts 2001 and 2002 are each linked as Child Of base artifact 1001.
Base artifact 2001 is also linked as Child Of base artifact 1002.
Base artifact 2002 is also linked as Child Of base artifact 1003.

Can DNG somehow automatically generate (or re-organize) the module hierarchy in which these artifacts are associated such that the module hierarchy is as follows:

1001
     2001
     2002
1002
     2001
1003
     2002

One answer



permanent link
Sean F (1.3k243149) | answered Sep 05 '18, 1:53 p.m.
edited Sep 05 '18, 1:54 p.m.
The only 2 ways I know that DNG can build a module hierarchy from imported data is the CSV import


and also the 'import_repair' example in the RM Extension samples


Recursive function to iterate over each entry in the module in order, moving them to their appropriate
 * depth and then moving on.  It tracks the last node it has seen at each depth it encounters, down to
 * the depth it is currently at.  This allows it to preserve the order of the entries in the module.
 *
 * When it goes down a level in the hierarchy it moves the entry to be a child of its preceding parent.  In
 * Any other case it moves the entry to be a sibling of the previous node at that depth level.  Having done
 * this, it updates the last entry seen at that level to be the entry it just moved to that level, and
 * repeats the process until all entries are processed.


If you learn a bit about RM Extensions then you may be able to modify this extension to do what you are describing.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.