Replying to:
01-02-2025
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-02-2025
01:59 AM
Hi. Sorry to open this topic again. But you know how to handle it in object arx? (c++). Or how to call the internal library of autocad in object arx?. Here the full verion of code in c++: Im using ads_regen() but it same problem in C#
RestoreLayer()
{
AcString M1 = multilingual_.GetValue(L"M1");
AcDbDatabase* db = acdbHostApplicationServices()->workingDatabase();
AcDbLayerStateManager* layerStateManager = db->getLayerStateManager();
try
{
if (layerStateManager->hasLayerState(LAYER_NAME) == true)
{
AcDbDictionary* dic_layerstate;
Acad::ErrorStatus es = acdbOpenObject(dic_layerstate, layerStateManager->layerStatesDictionaryId(true), kForRead);
if (es == Acad::eOk && dic_layerstate != nullptr)
{
GetLayoutAndViewPort(dic_layerstate);
}
RestoreData(layerStateManager, db);
layerStateManager->deleteLayerState(LAYER_NAME);
ads_regen();
}
else
{
throw acutPrintf(multilingual_.GetValue(L"M2"));
}
}
catch (...)
{
throw;
}
}