AcMapODTableDefinition class

Land Desktop Development ARX CPP SDK

 

AcMapODTableDefinition class

This class is defined in MapODDefinition.h.

The AcMapODTableDefinition class is used to create a table definition, which can then be passed to AcMapODContainer::CreateODTable to build an object data table. The table definition defines the object data table's columns. You must first add columns to the table definition creating the table.

Do not subclass from this class.

To create a table definition, instantiate this class using the new operator and delete memory allocated for it using the delete operator, as shown in the following example. For simplicity, routine error checking is not shown.

AcMapSession *mapApi = NULL;
AcMapProject *pProj = NULL;
AcMapODContainer *pODCont = NULL;
AcMapODTableDefinition *pTabDef = NULL;
AcMapODColumnDefinition *pColDef1 = NULL;
 
mapApi = AcMapGetSession();
mapApi->GetProject(pProj);
pProj->GetODContainer(pODCont);
pTabDef = new AcMapODTableDefinition();
pColDef1 = new AcMapODColumnDefinition();
pColDef1->SetName("Residential");
pColDef1->SetDescription("Residential R1-R3");
pColDef1->SetType(AcMap::kCharacter);
pColDef1->SetDefaultValue("R1");
pTabDef->AddColumn(*pColDef1);
pODCont->CreateODTable("MinimalTable", *pTabDef, "Simple table",
Adesk::kFalse);
if (pColDef1) delete pColDef1;
if (pTabDef) delete pTabDef;