Introduction

The MicroStationAPI provides an API for developers wanting to create custom applications for MicroStation® from Bentley Systems. We create a MicroStation application as a DLL, written using C++ and built with the Microsoft C++ compiler and linker provided with Visual Studio.

Text Tables

MicroStation CONNECT introduced the Text Table, represented in code by the TextTableElement. A TextTableElement is a DGN graphic element.

MicroStation Help: TextTable

You work on the content of a TextTableElement using the TextTable class.

Finding Text Table Seeds

This article introduces you to the mechanism used to find TextTable seeds.

Once you've found a seed, you want to clone it to create a new TextTable.

Cloning a Text Table Seed

Once you've found a seed, follow these steps to clone it …

Writing programmatically …

///  CreateTable by cloning a seed
TextTablePtr    CreateTable    (UInt32 nRows, UInt32 nCols, DgnModelP seedModel, DgnModelR activeModel)  const
{
  //  Extract a TextTable from the seed model
  TextTablePtr  seed  = TextTableHelper::GetTableSeed (seedModel);
  //  Clone the seed table to create a new TextTable in the context of the specified model
  TextTablePtr  clone = seed->CloneAsSeed (nRows, nCols, activeModel);
  return clone;
}

TextTableHelper Class

The above functionality is implemented in class TextTableHelper. You can download the source code (header & implementation files).

Questions

Post questions about C++ and the MicroStationAPI to the MicroStation Programming Forum.