WRAPPER_API void set_Editable(bool value)
The set_Editable method allows the user to specify whether the base data in the current DataSource can be modified. If a custom data source has been specified, setting this property to false will not prevent the custom data from being modified. If a custom data source has been specified, setting this property to true will mean that base data may be modified, but new objects will always be added to custom.
void DataSource_setEditable(GEOCALCPBW_NAMESPACE::DataSource & data)
{
data.set_Editable(TRUE);
_towchar issuer("BMG");
_towchar code("ARCSECONDS");
try
{
data.RemoveAngularUnit(issuer.c_str(), code.c_str());
}
catch(GEOCALCPBW_NAMESPACE::GeoCalcException & ex)
{
if(ex.get_ErrorCode() == GEOCALCPBW_NAMESPACE::GeoCalcException::Code::IdentifierNotFound)
{
AfxMessageBox("RemoveAngularUnit failed: invalid identifiers");
}
}
if(! data.CommitToFile())
{
AfxMessageBox(CString("unable to save data source to ") + CString(_tochar(data.get_FileName()).c_str()));
}
}