Exemple #1
0
void DrawCmd::UpdateAllWindStationData()
{
    // 查找所有的测风站
    // 将所在宿主上的面积、风速、风量数据读取到测风站中
    AcDbObjectIdArray objIds;
    DrawHelper::FindMineGEs( _T( "WindStation" ), objIds );
    if( objIds.isEmpty() ) return;

    AcTransaction* pTrans = actrTransactionManager->startTransaction();
    if( pTrans == 0 ) return;

    AcDbObjectIdArray geObjIds;
    int len = objIds.length();
    bool ret = true;
    for( int i = 0; i < len; i++ )
    {
        AcDbObject* pObj;
        if( Acad::eOk != pTrans->getObject( pObj, objIds[i], AcDb::kForRead ) )
        {
            ret = false;
            break;
        }

        TagGE* pTag = TagGE::cast( pObj );
        if( pTag == 0 )
        {
            ret = false;
            break;
        }

        geObjIds.append( pTag->getRelatedGE() );
    }

    actrTransactionManager->endTransaction();

    if( !ret )
    {
        geObjIds.removeAll();
    }
    else
    {
        //assert(objIds.length() == geObjIds.length());
        int len = objIds.length();
        for( int i = 0; i < len; i++ )
        {
            ReadWriteData( geObjIds[i], _T( "断面面积" ), objIds[i], _T( "测试断面面积" ) );
            ReadWriteData( geObjIds[i], _T( "风速" ), objIds[i], _T( "测试风速" ) );
            ReadWriteData( geObjIds[i], _T( "风量" ), objIds[i], _T( "测试风量" ) );
        }
    }
}
Exemple #2
0
void DifferPressSensorGE::writePropertyDataToGEDraw( MineGEDraw* pGEDraw ) const
{
	AcDbObjectId gID = getRelatedGE();
	AcDbObjectId objID = objectId();
	ReadWriteData(gID,_T("¹Ü·ѹ²î"),objID,_T("ѹ²î"));
	MineGE::writePropertyDataToGEDraw(pGEDraw);
}
Exemple #3
0
void FlowSensorGE::writePropertyDataToGEDraw( MineGEDraw* pGEDraw ) const
{
	AcDbObjectId gID = getRelatedGE();
	AcDbObjectId objID = objectId();
	ReadWriteData(gID,_T("瓦斯管中的瓦斯流量"),objID,_T("流量"));
	MineGE::writePropertyDataToGEDraw(pGEDraw);
}