通过 COM 启用/禁用 Vector CANoe 中的日志记录块

问题描述 投票:0回答:1

我正在尝试使用 python 中的 COM 对象启用/禁用日志记录块。我可以访问集合中的各个日志记录,但无法以编程方式启用它们。我尝试了以下方式,应用程序启动并开始测量,但没有创建日志文件。

app = client.dynamic.Dispatch('CANoe.Application')
app.Open(configuration)
app.Configuration.OnlineSetup.LoggingCollection(1).Filter.Enable(0)
app.Measurement.Start()
app.Measurement.Stop()
app.Quit()

enter image description here

如何通过Python启用/禁用日志记录?

python win32com canoe
1个回答
0
投票

您必须激活日志记录块本身。根据您的代码,应该这样做:

app.Configuration.OnlineSetup.ActivateEndBlock("Logging", true)
© www.soinside.com 2019 - 2024. All rights reserved.