How do I create an indirect object (a "dict link")?

Q: I attempting to replicate the dictionary structure in PDF based on
PDFs generated by third party software. The software that generates is
a plugin for acrobat that we use to program PDF files with printing
information for our production digital presses, the supplier of the
software has decided to no longer support the older formats in the
latest version, we have over 9000 files setup currently in the older
version software so it’s a bit of an issue for us.

I am having issues with the creation of the initial dictionary entry
I need to create this as an indirect dictionary (at least that what I
think it is called) and link it into the root below you can see the
one on the left (my failed attempt) is missing the Link, where the one
on the right is actually linked correctly. The individual pages
throughout the pdf file have references back to this master dictionary
and the software does not recognise them using my way.

This is the code to generate the incorrect result,

var root = doc.GetRoot();
var dict = root.PutDict("HDIG_ImageSmartDM");

// dict.Put ... the rest of the structure I think I can sort out its
just this initial entry that eluding me.

I know I’m missing something simple, can you point me in the right
direction, I have been on the site looking for an answer but cant seem
to find one that is this first little step I’m after.
A: You can create indirect objects using doc.CreateIndirect???(). For

var root = doc.GetRoot();
Obj mydict = doc.CreateIndirectDict();
root.Put("HDIG_ImageSmartDM", mydict);
mydict.PutName("MyKey", "MyValue");