From 7988f078653601c853a10eff586c5b3153a2612e Mon Sep 17 00:00:00 2001 From: Hubery Hsu Date: Sat, 10 Jan 2026 09:52:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90AL-75=E3=80=91Add=20demo=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneralCommands/SolidFileNewCommand.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; } From 34ec1b3aed03c0e466b57a504890599862038535 Mon Sep 17 00:00:00 2001 From: Hubery Hsu Date: Sat, 10 Jan 2026 09:53:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90AL-75=E3=80=91Sync=20the=20alice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Alice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alice b/Alice index 98a8005c..6e7d0581 160000 --- a/Alice +++ b/Alice @@ -1 +1 @@ -Subproject commit 98a8005c1b5b7aebd6070f5d09affa70fc4d61fb +Subproject commit 6e7d0581fcc25a17bc4f0d39657e66c4034d18c3