AddFolder Method

WRAPPER_API long AddFolder(long parentID, const BmgChar * folderName, ObjectType folderType);

 

Description

Adds a folder to the view. The value returned will be the folderID for the newly created folder.

 

Example

void DataView_AddFolder(GEOCALCPBW_NAMESPACE::DataView & dataView)

{

GEOCALCPBW_NAMESPACE::GeoBase::AngularUnitType, false);

try

{

_towchar folderName("Sample Angular Units");

_towchar folderNameUpdated("Updated Sample Angular Units");

ObjectType type = GEOCALCPBW_NAMESPACE::GeoBase::AngularUnitType;

long angularUnitFolder = DataView::GetFolderIDByObjectType(type);

long newFolderID = dataView->AddFolder(angularUnitFolder, folderName.c_str(), type);

dataView->SetFolderName(newFolderID, folderNameUpdated.c_str()))

}

catch(GEOCALCPBW_NAMESPACE::GeoCalcException & ex)

{

AfxMessageBox("AddFolder Failed");

}

}