Skip to content

Commit

Permalink
* scripting to wait
Browse files Browse the repository at this point in the history
   for completion
  • Loading branch information
festo-i40 committed Dec 31, 2024
1 parent a65af9a commit 4c329d9
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 181 deletions.
4 changes: 3 additions & 1 deletion src/AasxIntegrationBase/AasxMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ public AasxMenu AddLambda(
// Operate
//

public async Task ActivateAction(AasxMenuItemBase mi, AasxMenuActionTicket ticket)
public async Task ActivateAction(AasxMenuItemBase mi, AasxMenuActionTicket ticket, Action<object> lambdaDone = null)
{
var name = mi?.Name?.Trim()?.ToLower();

Expand All @@ -634,6 +634,8 @@ public async Task ActivateAction(AasxMenuItemBase mi, AasxMenuActionTicket ticke
await this.DefaultActionAsync(name, mi, ticket);
else if (this.DefaultAction != null)
this.DefaultAction(name, mi, ticket);

lambdaDone?.Invoke(this);
}

//
Expand Down
49 changes: 36 additions & 13 deletions src/AasxPackageExplorer/debug.MIHO.script
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@
// WriteLine(GetLastLogLine());
// TakeScreenShot("Test123");

Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\00_FestoDemoBox-Module-2.aasx");
Select("AAS", "First");
Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
Sleep(6000);
//Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\00_FestoDemoBox-Module-2.aasx");
//Select("AAS", "First");
//Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
//Sleep(1000);

Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\12_article-dpdm-32-instance_1.aasx");
Select("AAS", "First");
Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
Sleep(6000);
//Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\12_article-dpdm-32-instance_1.aasx");
//Select("AAS", "First");
//Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
//Sleep(1000);

Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\13_article-dpdm-32-instance_2.aasx");
Select("AAS", "First");
Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
Sleep(6000);
//Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\13_article-dpdm-32-instance_2.aasx");
//Select("AAS", "First");
//Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
//Sleep(1000);

//Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\16_article-ovel-10.aasx");
//Select("AAS", "First");
//Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
//Sleep(6000);
//Sleep(1000);

//Tool("Open", "File", "C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\17_article-spau.aasx");
//Select("AAS", "First");
Expand Down Expand Up @@ -108,3 +108,26 @@ Sleep(6000);
//Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
//Sleep(1000);


var fns = [
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\00_FestoDemoBox-Module-2.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\\12_article-dpdm-32-instance_1.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\13_article-dpdm-32-instance_2.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\16_article-ovel-10.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\17_article-spau.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\18_article-vuvg-l14_1.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\18_article-vuvg-l14_2.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\20_Festo_579071_SMT-8M-A-PS-24V-E-0.3-M12_proximity_switch.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\21_article-elgs-45-200.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\22_article-CPX-E-CEC-M1-PN.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\30_Festo_SPAU_VR3.aasx",
"C:\\HOMI\\Develop\\Aasx\\repo_Festo_demo_case_V3\31_HMI22_Festo_CMMT.aasx"
];

foreach (fn in fns)
{
Tool("Open", "File", fn);
Select("AAS", "First");
Tool("apiuploadassistant", "BaseAddress", "http://localhost:5001/api/v3.0/", "IncludeSubmodels", true, "IncludeCDs", true, "IncludeSupplFiles", true, "OverwriteIfExist", true);
Sleep(1000);
}
Loading

0 comments on commit 4c329d9

Please sign in to comment.