[SOLVED] [Moved] CANalyzer - CAPL automation

Status
Not open for further replies.

dharanikumarsrvn

Junior Member level 1
Joined
Oct 22, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,401
HI,
I am trying to automate a CANalyzer configuration via python. I am using win32com.client module to automate. Following code explains the process.


Code Python - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
import sys
import os
import time
import win32com.client
 
def can():
    CANalyzer = win32com.client.Dispatch('CANalyzer.Application') 
    measurement = CANalyzer.Measurement
    CANalyzer.Open("Configuration3.cfg") 
    measurement.Start()
    time.sleep(float(10)) # delays for XX seconds
    measurement.Stop()
    return 1



The above code successfully runs the configuration. But i need to access System Variables via python associated with this configuration. I tried to do like this.


Code Python - [expand]
1
2
3
NameSpace = CANalyzer.System.Namespaces("NameSpace")
SystemVariable = NS.Variable("SystemVariable")
Print SystemVariable.Value



But the above code fails. I cant get the correct syntax in python to access the System Variable. Could someone help me with this?
 
Last edited by a moderator:

Hello,
we have a script at **broken link removed** for access to system variables. You might try that in conjunction with the CANoe configuration **broken link removed**.

Kind regards
Andreas Neubauer (Vector Group)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…