[CONNECT .NET] Create a TextTable from a Seed

How do we use .NET method TextTable.CloneAsSeed?  It's non-static, so we must first create a table.  Looks like a chicken-and-egg situation.

Parents Reply Children
  • The TextTable is written to a given DesignFile's "DefaultModel"

    You've lost me!

    • The default model in which file: the active DGN file or somewhere else?
    • What happens if the default model already contains DGN elements?  Then the Table Seed becomes invalid because it must be the sole element in a model
    • Can a DGN file contain multiple models, each of which is a Table Seed?

    My goal is this:

    1. Examine a DGN file for DGN models that contain Tables
    2. Use one of the identified models as a TableSeed
    3. Create a TextTable from the TableSeed
    4. Create a TextTableElement from the new TextTable
    5. Write the TextTableElement to the active DGN model

    My original question may be ill-formed because I am confused about the API.  There are several methods concerning table creation, and I'm hoping to clarify in my mind what they do...

    • TextTable.CloneAsSeed
    • TextTable.Copy
    • TextTable.Create [static]

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon,

    - CloneAsSeed() produces a copy of a TextTable inheriting the symbology but not the contents of the seed.

    - Copy() produces a complete copy of the TextTable (including contents), with units, levels, etc possibly remapped into the context of a different model.

    - Create() produces a brand-new TextTable without using a seed.

    Given your stated goal, CloneAsSeed() is what you want.

    Answer Verified By: Jon Summers