diff --git a/Alice b/Alice index 98a8005c..6e7d0581 160000 --- a/Alice +++ b/Alice @@ -1 +1 @@ -Subproject commit 98a8005c1b5b7aebd6070f5d09affa70fc4d61fb +Subproject commit 6e7d0581fcc25a17bc4f0d39657e66c4034d18c3 diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp index 6915b6b3..5a746ea2 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp @@ -4,6 +4,9 @@ #include "AliceIDocumentManager.h" #include "AliceIMainWindow.h" #include "AliceCommandParameter.h" +#include "AliceCoreAppUtil.h" +#include "AliceISession.h" +#include "AliceDiagnosticMacro.h" using namespace alice; using namespace sdr; @@ -41,5 +44,18 @@ bool SolidFileNewCommand::IsSupported() const std::unique_ptr SolidFileNewCommand::Execute(const alice::CommandParameter& param) { + ISession* pSession = CoreAppUtil::GetCurrentSession(); + DIAG_RETURN_NULL_IF_FALSE(pSession, "pSession is null", "hananiah", "2025.12.25"); + + // 此处弹出creo 风格的新建对话框,选择文档类型,填写文档名称,Common Name + std::wstring strFileName; + + + IDocument* pDoc = pSession->CreateDocument(strFileName); + DIAG_RETURN_NULL_IF_FALSE(pDoc, "pDoc is null", "hananiah", "2025.12.25"); + + // 新建文档之后,Alice平台层中如何切换WorkBench + // 不同的文档对应不同的workbench + return nullptr; }