fix: terminate automation commands through AutoCAD queue
This commit is contained in:
@@ -268,13 +268,13 @@ internal sealed class FirstLimitedApplyAutomationCoordinator
|
||||
{
|
||||
if (IsTerminal || document is null) return;
|
||||
transitions.Add("CommandQueued:" + command);
|
||||
document.SendStringToExecute(command + " ", true, false, false);
|
||||
document.SendStringToExecute(command + "\n", true, false, false);
|
||||
}
|
||||
private void QueueReadinessBarrier()
|
||||
{
|
||||
if (IsTerminal || document is null) return;
|
||||
transitions.Add("ReadinessBarrierQueued");
|
||||
document.SendStringToExecute("PHP_REC_AUTOMATION_READY ", true, false, false);
|
||||
document.SendStringToExecute("PHP_REC_AUTOMATION_READY\n", true, false, false);
|
||||
}
|
||||
private void OnCommandEnded(object sender, CommandEventArgs e)
|
||||
{
|
||||
@@ -396,7 +396,7 @@ internal sealed class FirstLimitedApplyAutomationCoordinator
|
||||
// Persist the exit boundary before handing control back to AutoCAD;
|
||||
// process termination can otherwise prevent the final evidence flush.
|
||||
TryWriteEvidence(functionalCompleted, null);
|
||||
exitDocument.SendStringToExecute("_.QUIT _N ", true, false, false);
|
||||
exitDocument.SendStringToExecute("_.QUIT _N\n", true, false, false);
|
||||
document = null;
|
||||
automationOpenedDocuments.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user