fix: 水池截面中转文件 JMSJ.sat 按进程隔离,补临时文件命名文档
JMDBDlg、JMSJDlg、HZQTDlg 共 7 处共用固定的 JMSJ.sat,两个 CAD 实例 同时运行时会互相覆盖,acisIn 可能读到另一个实例写的截面。 新增 Pool3dCmd/PoolSectionTemp.h 的 GetPoolSectionSatPath(),文件名改为 JMSJ_<pid>.sat。同一进程内所有调用点路径一致,acisOut 写、ShowLastSection 读的隐式链路不受影响;进程之间用 PID 隔离。顺带去掉无意义的 MakeLower。 同时新增 temp-file-naming.md,记录临时文件命名规则、全库现状,以及 DGJM.sat 已废弃、不再改造的结论。
This commit is contained in:
1 parent
e3fff2ad66
commit
8caea9e6bd
5 files changed
+86
-17
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "JMSJDlg.h"
|
||||
#include "CoreTools.h"
|
||||
#include "PoolSectionTemp.h"
|
||||
#include "JUXCDlg.h"
|
||||
#include "GLTKDlg.h"
|
||||
#include "BYCDlg.h"
|
||||
@@ -78,9 +79,7 @@ BOOL CJMSJDlg::OnInitDialog()
|
||||
void CJMSJDlg::ShowLastSection()
|
||||
{
|
||||
//1.截面
|
||||
CString sFullPath = FilePath::getSystemTemporaryFolder();
|
||||
sFullPath.MakeLower();
|
||||
sFullPath += _T("\\JMSJ.sat");
|
||||
CString sFullPath = GetPoolSectionSatPath(FilePath::getSystemTemporaryFolder());
|
||||
|
||||
AcDbVoidPtrArray arBodyPtrs;
|
||||
if ( Acad::eOk == AcDbBody::acisIn(sFullPath,arBodyPtrs) )
|
||||
@@ -139,7 +138,7 @@ void CJMSJDlg::OnBnClickedBtaddtodb()
|
||||
UpdateData(TRUE);
|
||||
|
||||
if (!m_curSection.pReg) return;
|
||||
CString sFullPath = FilePath::getSystemTemporaryFolder() + _T("\\JMSJ.sat");
|
||||
CString sFullPath = GetPoolSectionSatPath(FilePath::getSystemTemporaryFolder());
|
||||
|
||||
CString sRegionScrp = _T("");
|
||||
CString sLine;
|
||||
@@ -425,9 +424,7 @@ void CJMSJDlg::OnBnClickedBtselfromdb()
|
||||
CString sScr,sScrT;
|
||||
if (dlg.GetCrossSectionScr(sScr))
|
||||
{
|
||||
CString sFullPath = FilePath::getSystemTemporaryFolder();
|
||||
sFullPath.MakeLower();
|
||||
sFullPath += _T("\\JMSJ.sat");
|
||||
CString sFullPath = GetPoolSectionSatPath(FilePath::getSystemTemporaryFolder());
|
||||
|
||||
CStdioFile file;
|
||||
if (file.Open(sFullPath,CFile::modeCreate |CFile::modeWrite ))
|
||||
|
||||
Reference in new issue
Block a user