Example #1
0
QString getCADPath( QString locationKey ,pathType pat)
{
//#ifdef _WIN64
	return GetCADPathByWinAPI(locationKey, pat);
//#else
	//return GetCADPathByQt(locationKey, pat);
//#endif
}
Example #2
0
static BOOL CopyCUIXandMNR( LPCTSTR cuixPath, LPCTSTR mnrPath )
{
    CString cadPath = GetCADPathByWinAPI( _T( "RoamableRootFolder" ), CURRENT_USER );
    cadPath.Append( _T( "Support" ) );
    //CString CADcuixPath = cadPath + _T("\\acad.CUIX");
    CString CADcuixPath = cadPath + _T( "\\acad.CUIX" );
    CString CADmnrPath = cadPath + _T( "\\acad.mnr" );

    //获取当前程序(.exe)所在的路径
    CString CurrentPath = GetWorkDir();

    CString JLcuixPath = CurrentPath;
    //JLcuixPath.Append("\\Datas\\JL\\acad.CUIX");
    JLcuixPath.Append( cuixPath );
    CString JLmnrPath = CurrentPath + mnrPath;

    if( !CopyFile( JLcuixPath, CADcuixPath, false ) ) return FALSE;
    //if(!CopyFile(JLmnrPath,CADmnrPath,false)) return FALSE;
    return TRUE;
}
Example #3
0
CString CADHelper::GetCADPath()
{
    CString cadPath = GetCADPathByWinAPI( _T( "AcadLocation" ), LOCAL_MACHINE );
    cadPath.Append( _T( "\\acad.exe" ) );
    return cadPath;
}
Example #4
0
BOOL CADHelper::IsAutoCADExist()
{
    //CAD的安装目录
    CString cadPath = GetCADPathByWinAPI( _T( "AcadLocation" ), LOCAL_MACHINE );
    return cadPath.IsEmpty() ? FALSE : TRUE;
}