我创建了一些变量,并使用C#脚本任务试图修改变量的值。 初始值
用于pine变量的Expression Builder图像
FolderInputPath =“ D:\”; Pine =“ C:\ abc \ qwr”;
请找到变量状态
上述值是在sis软件包中的变量处设置的
console.log(Highcharts.maps['custom/world'].features);
Highcharts.maps['custom/world'].features.push({
"type":"Feature",
"id":"ES",
"properties": {
"hc-group":"admin0",
"hc-middle-x":0.76,
"hc-middle-y":0.27,
"hc-key":"es",
"hc-a2":"ES","name":"Spain",
"labelrank":"2",
"country-abbrev":"Sp.",
"subregion":"Southern Europe",
"region-wb":"Europe & Central Asia",
"iso-a3":"ESP","iso-a2":"ES","woe-id":"23424950",
"continent":"Europe"
},
"geometry":{
"type":"MultiPolygon",
"coordinates":[
[
[
[4045, 7594],
[4021, 7599],
[4011, 7621],
[3984, 7629],
[3997, 7692],
[3998, 7762],
[4020, 7781],
[4009, 7795],
[3944, 7795],
[3930, 7838],
[3969, 7860],
[3988, 7852],
[4098, 7851],
[4151, 7846],
[4203, 7821],
[4246, 7818],
[4249, 7812],
[4255, 7814],
[4262, 7812],
[4262, 7813],
[4262, 7814],
[4263, 7812],
[4263, 7812],
[4279, 7808],
[4298, 7812],
[4300, 7795],
[4265, 7771],
[4233, 7763],
[4194, 7709],
[4211, 7683],
[4189, 7669],
[4183, 7644],
[4154, 7635],
[4143, 7615],
[4072, 7613],
[4046, 7594],
[4045, 7594]
]
]
]
}
});
根据上述逻辑,我们string filename = "";
string newname="";
filename = Dts.Variables["User::FolderInputPath"].Value.ToString();
if (filename.Substring(filename.Length - 1, 1) != "\\")
{
filename = filename + "\\";
}
newname = filename + "Pine.txt";
Dts.Variables["User::Pine"].Value = newname;
MessageBox.Show(newname + " before value is " + Dts.Variables["User::Pine"].Value.ToString());
的值应为“ D:\ Pine.txt”,但是当我运行代码时,变量User::Pine
的值不会改变
预先感谢