[C++ CE]放置参数化单元时修改参数值

//ElmentHandler eh;(参数化单元)

FindInstancesScopePtr scope = FindInstancesScope::CreateScope(eh, FindInstancesScopeOption(DgnECHostType::All));
ECQueryPtr query = ECQuery::CreateQuery(ECQUERY_PROCESS_SearchAllClasses);
DgnECInstanceIterable iterable = Bentley::DgnPlatform::DgnECManager::GetManager().FindInstances(*scope, *query);
for (DgnECInstanceIterable::const_iterator it = iterable.begin(); it != iterable.end(); ++it)
{
    DgnECInstancePtr instance = *it;
    ECN::ECClassCR instanceClass = instance->GetClass();
    WString classDisplayName = instanceClass.GetDisplayLabel();

    ECPropertyIterable properties = instanceClass.GetProperties();
   for (ECPropertyIterable::const_iterator it = properties.begin(); it != properties.end(); ++it)
   {
     ECValue v;
     ECPropertyCP pProp = (*it);
     if (pProp->GetName().find(L"ParameterValuesContainer"))
        continue;

      ECValue v1;

      WCharCP propertyAccessString = pProp->GetName().c_str();
     ECObjectsStatus status = instance->GetValue(v1, propertyAccessString, 0);
     if (ECOBJECTS_STATUS_Success != status)
                 continue;

   }

}

现在我能获取ECValue v1,调试看到其如下形式:

看了下帮助文档没发现读取struct里面的值的函数,希望得到大家的帮助!

Parents Reply Children