我是DOORS和DXL的新手。我一直在尝试使用DXL将项目模板中的模块复制到任何给定的项目文件夹,但我的方法还没有奏效。这是我的脚本中尝试复制和粘贴操作的部分:
// Where string originalModule is the path to the module being copied.
// Where string targetPath is the path to where the copied module should be pasted.
ModName_ originalMMP = module(originalModule)
string originalMMPdesc = description(originalMMP)
clipCopy(originalMMP)
clipPaste(targetPath)
clipClear()
每当我在DOORS'中运行我的脚本时DXL编辑器,我收到一个错误,指示函数clipCopy()和clipPaste()具有无效参数。在DXL参考手册中,它表明参数的类型应该是项目类型,但我并不完全确定我是否理解。
我也尝试过这种方法:
// The same conventions as above are used for the originalModule and targetPath
// string type variables.
// The variable string targetPathTemp contains the path to the replicated
// file New Module Temp
ModName_ originalMMP = module(originalModule)
string originalMMPdesc = description(originalMMP)
bool OK = copy(originalMMP,"New Module Temp", originalMMPdesc)
ModName_ newMMP = module(targetPathTemp)
// Moving and Renaming:
ErrMess = move(newMMP, targetPath)
ErrMess = rename(copiedMMP,newModuleName, originalMMPdesc)
我得到与函数的clipCopy()和clipPaste()相同的错误:copy()和move()。
有没有人知道我做错了什么,到底我究不清楚什么?
提前致谢!
答案 0 :(得分:0)
我认为clipCopy及其兄弟只能使用Items。使用Item originalMMP = item(originalModule)
代替ModName_...