我试图在CAPL中包含一个*.can文件,但是我必须设置绝对路径。
C:\Users\myuser\canoe\simulations\projectX\Function Test\playground.can我想用一个相对路径来包含它,但我不确定什么是正确的约定,或者它是否是可实现的。到目前为止,我已经尝试过了(我的CAPL在projectX文件夹中):
"C:\...\Function Test\playground.can
"Function Test\playground.can"
"/Function Test/playground.can"
"\Function Test \playground.can"使用相对路径的正确方法是什么?
发布于 2017-09-04 08:43:47
是的,这是可能的。您需要指定相对于项目CANoe配置(*.cfg)文件的路径。例如:
includes
{
#include "Function Test\playground.can"
}如果您的CANoe项目在C:\Users\myuser\canoe\simulations\projectX\中
发布于 2018-09-19 12:21:21
是的,这是可能的。您需要指定相对于CAPL文件 (*.can)路径的路径。
用CANoe 11进行测试
如果两个CAPL文件位于同一个文件夹中
includes
{
#include "playground.can"
}如果应该插入的CAPL文件位于子文件夹("TEST")中
includes
{
#include "TEST\playground.can"
}如果CAPL文件,应该包括在顶层文件夹中。
includes
{
#include ".\playground.can"
}发布于 2018-09-21 14:37:58
我获得任何文件的相对路径的最佳实践是
https://stackoverflow.com/questions/45988393
复制相似问题