示例#1
0
void WGFPBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
    names.append( _T( "绝对瓦斯涌出量" ) );
    names.append( _T( "相对瓦斯涌出量" ) );
    names.append( _T( "工作面日产量" ) );
    names.append( _T( "回采年月" ) );
}
示例#2
0
void CDHBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
    names.append( _T( "¿×ºÅ" ) );
    names.append( _T( "µØÃæ±ê¸ß" ) );
    names.append( _T( "ú²ãµ×°å±ê¸ß" ) );
    names.append( _T( "úºñ" ) );
}
示例#3
0
static void GetDatasFromList(const CGridListCtrlGroups& listCtrl,AcStringArray& strName,AcStringArray& strIsRunning,AcStringArray& strReason,int num)
{
	for(size_t i = 0; i < num; i++)
	{
		CString	name = listCtrl.GetItemText(i,1);
		if (name.IsEmpty())
		{
			name = ISNULL;
		}
		strName.append(name);
		CString isRunning = listCtrl.GetItemText(i,2);
		if (isRunning.IsEmpty())
		{
			isRunning = ISNULL;
		}
		strIsRunning.append(isRunning);
		CString reason = listCtrl.GetItemText(i,3);
		if (reason.IsEmpty())
		{
			reason = ISNULL;
		}

		strReason.append(reason);
		//acutPrintf(_T("\n第%d行数据:%s\t%s\t%s"),i+1,strName,isRunning,strReason);
	}
}
示例#4
0
void CSDCIBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
    names.append( _T( "瓦斯放散初速度" ) );
    names.append( _T( "煤的坚固性系数" ) );
    // 实际只有2个字段,该字段并不存在!!!
    // 注册一个不存在的字段,返回值为""
    names.append( _T( "瓦斯突出危险性综合指标K值" ) );
}
示例#5
0
void ReportDataHelper::WriteDatas( const CString& name,const ArrayVector& datas )
{
	AcDbObjectId objId;
	GDESDataObjectHelper::GetObjectId(name,objId);
	AcStringArray values;
	for(int i = 0; i < datas[0].length();i++)
	{
		for(int j = 0; j < datas.size(); j++)
		{
			values.append(datas[j][i]);
			values.append(_T("$"));
		}
	}
	SetObjectDatas(objId,values);
}
示例#6
0
static BOOL ReadTableDatas(const CString& itemName,AcStringArray& names,AcStringArray& datas)
{
	names.removeAll();
	datas.removeAll();
	ArrayVector dataVector;
	ReportDataHelper::ReadDatas(itemName,dataVector,2);
	if(dataVector.empty()) return FALSE;
	for(int i = 0; i < dataVector.size(); i++)
	{
		names.append(dataVector[i][0]);
		datas.append(dataVector[i][1]);
	}
	return TRUE;

}
示例#7
0
static CString ExcludePath( const CString& supportPath, const CString& arxPath )
{
    AcStringArray cc;
    SplitCString( supportPath, _T( ";" ), cc );

    AcStringArray paths;

    int n = cc.length();
    for( int i = 0; i < n; i++ )
    {
        if( cc[i].compareNoCase( arxPath ) == 0 ) continue;
        paths.append( cc[i] );
    }

    CString path;
    n = paths.length();
    for( int i = 0; i < n; i++ )
    {
        if( i == n - 1 )
        {
            path.AppendFormat( _T( "%s" ), paths[i].kACharPtr() );
        }
        else
        {
            path.AppendFormat( _T( "%s;" ), paths[i].kACharPtr() );
        }
    }
    return path;
}
示例#8
0
void ReportDataHelper::ReadDatas( const CString& name, ArrayVector& datasVector,int unitCount )
{
	AcStringArray getDatas;
	AcDbObjectId objId;
	GDESDataObjectHelper::GetObjectId(name,objId);
	GetObjectDatas(objId,getDatas);
	//AcStringArray strName,strIsRunning,strReason;
	ArrayVector datas;
	int nCount = getDatas.length();
	if(nCount <= 0) return;
	datas.resize( unitCount );
	for(int i = 0;  i < nCount; i = i+2 )
	{
		int j = (i/2)% unitCount;
		datas[j].append(getDatas[i]);
	}

	datasVector.clear();
	for(int i = 0; i < nCount / (2 * unitCount); i++)
	{
		CString temp;
		AcStringArray temps;
		for(int j = 0; j < unitCount; j++)
		{
			temp.Format(_T("%s"),datas[j][i].kACharPtr());
			if(temp == ISNULL) temp = _T("");
			temps.append(temp);
		}
		datasVector.push_back(temps);
	}
}
示例#9
0
// 查找从根类型派生的图元
void ArxClassHelper::GetArxClassTypes( const CString& root, AcStringArray& types, bool findAbstractType )
{
    // 如果根类型不存在,默认为AcDbObject
    AcRxClass* pParentClass = AcRxClass::cast( acrxClassDictionary->at( root ) );
    if( pParentClass == 0 ) pParentClass = AcDbObject::desc();

    AcRxDictionaryIterator* iter = acrxClassDictionary->newIterator();
    if( iter == 0 ) return;

    for( ; !iter->done(); iter->next() )
    {
        AcRxClass* pClass;
        if( ( pClass = AcRxClass::cast( iter->object() ) ) != NULL )
        {
            if( pClass->isDerivedFrom( pParentClass ) )
            {
                const ACHAR* text = pClass->name();
                if( text == NULL ) continue;

                if( !findAbstractType && ( pClass->dxfName() == NULL ) || ( pClass->appName() == NULL ) ) continue;

                //acutPrintf(_T("appName:%s\ndxfName:%s\nname:%s\n"), pClass->appName(), pClass->dxfName(), pClass->name());
                types.append( text );
            }
        }
    }
    delete iter;
}
示例#10
0
static BOOL ReadDataFromFile(const CString& txtName,AcStringArray& names,AcStringArray& isRunings,AcStringArray& resons)
{
	names.removeAll();
	isRunings.removeAll();
	resons.removeAll();
	ArrayVector dataVector;
	ReportDataHelper::ReadDatas(txtName,dataVector,3);
	if(dataVector.empty()) return FALSE;
	for(int i = 0; i < dataVector.size(); i++)
	{
		names.append(dataVector[i][0]);
		isRunings.append(dataVector[i][1]);
		resons.append(dataVector[i][2]);
	}
	return TRUE;
}
示例#11
0
bool IntStrListHelper::GetIntStrList( const CString& name, AcDbIntArray& intList, AcStringArray& strList )
{
    AcStringArray entries;
    if( !ArxDictHelper::GetAllEntries( INT_LIST_DICT, name, entries ) ) return false;

    int len = entries.length();
    bool ret = ( len > 0 && len % 2 == 0 );
    if( ret ) // 长度必须为偶数
    {
        intList.removeAll();
        strList.removeAll();

        for( int i = 0; i < len; i++ )
        {
            if( i % 2 == 0 ) // 偶数位置的元素为整数
            {
                intList.append( _ttoi( entries[i].kACharPtr() ) );
            }
            else       // 奇数位置的元素为字符串
            {
                strList.append( entries[i] );
            }
        }
    }
    return ret;
}
示例#12
0
static BOOL ShowRetDlg()
{
	ResultDlg retDlg;
	AcStringArray datas;
	datas.append(_T("目前矿井瓦斯抽采系统正常运转,能保证生产接续"));
	datas.append(_T("建立了部分部分瓦斯抽采系统,无法保证生产接续"));
	datas.append(_T("没有建立地面固定瓦斯抽采系统"));
	datas.append(_T("其他"));
	retDlg.setItemDatas(datas);

	IntArray trueIndxs;
	trueIndxs.push_back(0);
	trueIndxs.push_back(1);
	retDlg.setTrueIndex(trueIndxs,RET_GASSYS_OBJCT_NAME,DESC_GASSYS_OBJCT_NAME);

	AcStringArray bookMks;
	bookMks.append(_T("GasSys_Ret"));
	bookMks.append(_T("GasSys_Method"));
	bookMks.append(_T("GasSys_Conclusion"));
	bookMks.append(_T("GasSys_YesOrNo"));
	retDlg.setBookMarks(bookMks);

	if(IDOK == retDlg.DoModal()) 
	{
		return TRUE;
	}
	else return FALSE;
}
示例#13
0
static void SplitCString( const CString& content, const CString& token, AcStringArray& cc )
{
    int curPos = 0;
    CString str = content.Tokenize( token, curPos );
    while ( str != _T( "" ) )
    {
        cc.append( str );
        str = content.Tokenize( token, curPos );
    };
}
示例#14
0
void MineGEDrawManager::getAllGEDrawsByGEType( const CString& geType, AcStringArray& drawList )
{
    GEDrawMap::iterator itr = m_drawMap.find( geType );
    if( itr == m_drawMap.end() ) return;

    MineGEDrawInfoList& temp_draw_list = itr->second.m_drawInfoList;
    for( MineGEDrawInfoList::iterator itr = temp_draw_list.begin(); itr != temp_draw_list.end(); itr++ )
    {
        drawList.append( itr->pDraw->isA()->name() );
    }
}
示例#15
0
void GasSysDlg::OnBnClickedEnsure()
{
	UpdateData(TRUE);
	AcStringArray strName,strIsRunning,strReason;
	//从列表中获取数据
	GetDatasFromList(m_permCListCtrl,strName,strIsRunning,strReason,_ttoi(m_numPermSys));
	ArrayVector datas;
	datas.push_back(strName);
	datas.push_back(strIsRunning);
	datas.push_back(strReason);
	//把数据写到数据词典中
	ReportDataHelper::WriteDatas(PERMENT_OBJCT_NAME,datas);

	AcStringArray gasSysNams;
	gasSysNams.append(strName);
	AcStringArray gasSysRunning;
	gasSysRunning.append(strIsRunning);

	strName.removeAll();
	strIsRunning.removeAll();
	strReason.removeAll();
	GetDatasFromList(m_tempCListCtrl,strName,strIsRunning,strReason,_ttoi(m_numTempSys));
	datas.clear();
	datas.push_back(strName);
	datas.push_back(strIsRunning);
	datas.push_back(strReason);
	ReportDataHelper::WriteDatas(TEMPGAS_OBJCT_NAME,datas);
	//WriteDataToFile(_T("btvars.txt"),strName,strIsRunning,strReason);
	//for (int i = 0; i < strName.length(); i++)
	//{
		gasSysNams.append(strName);
		gasSysRunning.append(strIsRunning);
	//}
	RecordRunningSysName(gasSysNams,gasSysRunning);

	if(ShowRetDlg())
	{
		OnOK();
	}
}
示例#16
0
void ArxDictTool2::getAllKeys( AcStringArray& keys )
{
    AcDbDictionary* pDict = GetDictObject( m_dictId );
    if( pDict == 0 ) return;

    AcDbDictionaryIterator* pIter = pDict->newIterator();
    for ( ; !pIter->done(); pIter->next() )
    {
        keys.append( pIter->name() );
    }
    delete pIter;
    pDict->close();
}
static void FindUseAirPlacesAndReasons( AcDbObjectIdArray& objIds, AcStringArray& reasons )
{
    int p1, p2, p3;
    FindUseAirPlaces( objIds, p1, p2, p3 );
    for( int i = 0; i < p1; i++ )
    {
        reasons.append( _T( "回采工作面" ) );
    }
    for( int i = p1; i < p2; i++ )
    {
        reasons.append( _T( "掘进工作面" ) );
    }
    for( int i = p2; i < p3; i++ )
    {
        reasons.append( _T( "硐室" ) );
    }
    int len = objIds.length();
    for( int i = p3; i < len; i++ )
    {
        reasons.append( _T( "主要进回、采区进回大巷或用风巷道" ) );
    }
}
示例#18
0
bool IntStrListHelper::AddIntStrPair( const CString& name, int intValue, const CString& strValue )
{
    if( ( name.GetLength() == 0 ) || strValue.GetLength() == 0 ) return false;

    AcStringArray strList;
    AcDbIntArray intList;
    GetIntStrList( name, intList, strList );
    if( intList.contains( intValue ) || strList.contains( strValue ) ) return false;

    intList.append( intValue );
    strList.append( strValue );
    RemoveIntStrList( name );
    return AddIntStrList( name, intList, strList );
}
示例#19
0
static BOOL SetBaseReportVal(CString& mineName)
{
	SetGroundSys();
	SetUndergroundSys();

	//瓦斯抽采达标规划和年度实施计划表格
	SetTableVal(GAS_PLAN_BOOKMKS_OBJCT_NAME);
	//抽采达标工艺方案设计和采掘工作面施工设计表格
	SetTableVal(EPCMFD_BOOKMKS_OBJCT_NAME);
	//矿井瓦斯抽采达标自评价体系和瓦斯抽采管理制度表格
	SetTableVal(SM_BOOKMKS_OBJCT_NAME);
	//瓦斯抽采工程验收资料表格
	SetTableVal(INSPECT_BOOKMKS_OBJCT_NAME);
	//瓦斯泵站能力
	SetPumpTable();

	AcStringArray names;
	names.append(RET_GASSYS_OBJCT_NAME);
	names.append(RET_EPCMFD_OBJCT_NAME);
	names.append(RET_GASPLAN_OBJCT_NAME);
	names.append(RET_INSPECT_OBJCT_NAME);
	names.append(RET_SM_OBJCT_NAME);
	names.append(RET_GASPUMP_OBJCT_NAME);
	names.append(RET_MERSURE_OBJCT_NAME);
	names.append(RET_REALATE_OBJCT_NAME);

	//结论表格的书写
	for(int i = 0; i < names.length(); i++)
	{
		CString name = names[i].kACharPtr();
		if(!SetConclusionTable(name)) return FALSE;
	}
	WriteMineName(mineName);
	//MyWord->SetSeekView(mineName,wdAlignParagraphJustify,wdSeekCurrentPageHeader,_T("{{MineName_Header}}"));
	//DeleteExcludeLine();
	return TRUE;
}
示例#20
0
static bool GetFieldsDatas(const CString& type, const CString& func, const AcDbObjectId& objId,AcStringArray& fields,AcStringArray& datas)
{
	fields.removeAll();
	datas.removeAll();
	if(!FuncFieldHelper::GetFields(func,type,fields)) return false;
	fields.remove(_T("钻孔名称"));
	for(int i = 0; i < fields.length(); i++)
	{
		CString strData;
		if(!DataHelper::GetPropertyData(objId,fields[i].kACharPtr(),strData)) return false;
		DealIntListDatas(fields[i].kACharPtr(),strData);
		datas.append(strData);
	}

	return true;
}
示例#21
0
void ArxClassHelper::GetClassHierarchy( const CString& type, AcStringArray& types, bool findAbstractType )
{
    AcRxClass* pClass = AcRxClass::cast( acrxClassDictionary->at( type ) );
    if( pClass == 0 ) return;

    while( pClass != AcDbEntity::desc() )
    {
        // 排除抽象类型
        if( !findAbstractType && ( ( pClass->dxfName() == NULL ) || ( pClass->appName() == NULL ) ) )
        {
            pClass = pClass->myParent();
            continue;
        }

        types.append( pClass->name() );
        pClass = pClass->myParent();
    }
    types.reverse();
}
示例#22
0
bool ArxClassHelper::GetAllTopParentClass( const CString& root, AcStringArray& types )
{
    AcStringArray allGETypes;
    ArxClassHelper::GetArxClassTypes( root, allGETypes, false );
    if( allGETypes.isEmpty() ) return false;

    int len = allGETypes.length();
    for( int i = 0; i < len; i++ )
    {
        CString parentType;
        if( !ArxClassHelper::GetTopParentClass( allGETypes[i].kACharPtr(), parentType ) ) continue;
        if( allGETypes[i].compareNoCase( parentType ) != 0 ) continue;
        if( !types.contains( parentType ) )
        {
            types.append( parentType );
        }
    }
    return true;
}
示例#23
0
void PDFConverter(BOOL bDwg)
{
// 	test();
	resbuf* rb = getFileNameInput();
	resbuf* pRb = rb;
	AcStringArray arrFileName;
	while (pRb)
	{
		arrFileName.append(pRb->resval.rstring);
		pRb = pRb->rbnext;
	}
	acutRelRb(rb);
	rb = NULL;

	int page = 0;
	if (arrFileName.length() == 1)
	{
		acedInitGet(4, NULL);

		// use resource for multi langeage.
		// modify by yhl, 2016/6/29.
		CString strPrompt;
		CAcModuleResourceOverride rs;
		strPrompt.LoadString(IDS_ASKFORPAGENUMBER);
		int rc = acedGetInt(strPrompt, &page);
// 		int rc = acedGetInt(_T("\nPlease input the page number, 0 for all <1>: "), &page);

		if (RTNONE == rc)
		{
			page = 1;
		}
		else if (RTNORM != rc)
		{
			return;
		}
	}

	for (int i=0; i<arrFileName.length(); i++)
	{
		convertFile(arrFileName[i], page, bDwg);
	}
}
示例#24
0
BOOL GasSysDlg::RecordRunningSysName(const AcStringArray& gasSysNams,const AcStringArray& gasSysRunning)
{
	//CString dataDirName = _T( "Datas\\BaseTemp\\" );
	//CString fileName =BuildPath ( BuildPath( GetAppPathDir(), dataDirName ),_T("bgaspumpvars0.txt") );

	//AcOfstream outFile(fileName);
	//if (!outFile) return FALSE;

	ArrayVector namesVector;
	AcStringArray names;
	for(int i = 0; i < gasSysNams.length(); i++)
	{
		CString isRunning = gasSysRunning[i].kACharPtr();
		if(isRunning != _T("是")) continue;
		names.append(gasSysNams[i]);
		//outFile << gasSysNams[i].kACharPtr() << _T("\n");
	}
	namesVector.push_back(names);
	ReportDataHelper::WriteDatas(RUNNING_SYS_OBJCT_NAME,namesVector);
	if(namesVector.empty()) return FALSE;
	return TRUE;
}
示例#25
0
bool ArxClassHelper::GetChildClass( const CString& type, AcStringArray& types )
{
    AcRxClass* pParentClass = AcRxClass::cast( acrxClassDictionary->at( type ) );
    if( pParentClass == 0 ) return false; // 类型不存在

    AcRxDictionaryIterator* iter = acrxClassDictionary->newIterator();
    if( iter == 0 ) return false;

    AcRxClass* pClass;
    for( ; !iter->done(); iter->next() )
    {
        if( ( pClass = AcRxClass::cast( iter->object() ) ) != NULL )
        {
            const ACHAR* text = pClass->name();
            if( ( text != NULL ) && ( pClass->myParent() == pParentClass ) )
            {
                types.append( text );
            }
        }
    }
    delete iter;
    return true;
}
示例#26
0
void WDCI2BlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
    names.append( _T( "钻孔最大瓦斯涌出初速度" ) );
    names.append( _T( "钻孔最大钻屑量" ) );
    names.append( _T( "R值指标" ) );
}
示例#27
0
void TailraceGEDraw::regPropertyDataNames( AcStringArray& names ) const
{
	names.append(_T("大小"));
}
示例#28
0
void GasPumpGEDraw::regPropertyDataNames( AcStringArray& names ) const
{
	names.append(_T("大小"));
}
示例#29
0
/*
 * 方法:
 *	  1) 得到原始的字段链表L1和字段列表框中的字段链表L2
 *    2) 遍历链表L2,判断字段是否存在于L1中
 *       a) 如果存在,则该字段保持不变,并从L1中移除该字段;
 *       b) 如果不存在,则转第(3)步
 *    3) 该字段是新添加的字段,则执行"增加字段"操作Add
 *    4) 完成遍历L2,最后剩下的L1的元素就是需要删除的字段
 *    5) 执行"删除字段"操作Remove
 */
void FieldManagerDlg::OnBnClickedApplyBtn()
{
    if( m_fieldListBox.GetCount() > 0 )
    {
        // 切换之前更新上次选择的字段信息
        // 并检查字段信息的有效性
        if( !updateFieldInfo() ) return;
    }

    // 选择的图元类型
    CString selType = getSelType();
    if( selType.GetLength() == 0 ) return;

    AcStringArray fields;
    FieldHelper::GetAllFields( selType, fields );
    if( fields.isEmpty() && m_fieldListBox.GetCount() == 0 )
    {
        MessageBox( _T( "没有字段可更新" ) );
        return;
    }

    // "剩余"字段
    // 与m_infoes应该是一一对应的
    AcStringArray leftFields;
    for( int i = 0; i < m_fieldListBox.GetCount(); i++ )
    {
        CString text;
        m_fieldListBox.GetText( i, text );
        leftFields.append( text );
    }

    int len = leftFields.length();
    for( int i = 0; i < len; i++ )
    {
        CString field = leftFields[i].kACharPtr();
        int index = fields.find( field );
        if( index >= 0 ) // 已存在,不变
        {
            fields.removeAt( index );
        }
        else
        {
            // 增加字段
            FieldHelper::AddField( selType, field );
        }
        // 默认属性设置不需要添加到词典中
        if( m_infoes[i]->isDefault() )
        {
            FieldInfoHelper::RemoveFieldInfo( selType, field );
        }
        else
        {
            // 新增的字段
            if( index < 0 || !FieldInfoHelper::FindFieldInfo( selType, field ) )
            {
                FieldInfoHelper::AddFieldInfo( selType, field, *m_infoes[i] );
            }
            else
            {
                // 更新已有的字段信息
                FieldInfoHelper::WriteFieldInfo( selType, field, *m_infoes[i] );
            }
        }
    }

    // 删除字段
    len = fields.length();
    for( int i = 0; i < len; i++ )
    {
        FieldHelper::RemoveField( selType, fields[i].kACharPtr() );
    }

    MessageBox( _T( "字段信息更新成功!" ) );
}
示例#30
0
void TGFPBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
    names.append( _T( "绝对瓦斯涌出量" ) );
    names.append( _T( "掘进年月" ) );
}