【问题标题】:How do I copy DOORS modules between folders/projects using DXL?如何使用 DXL 在文件夹/项目之间复制 DOORS 模块?
【发布时间】:2017-04-26 12:36:19
【问题描述】:

我是 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 参考手册中,它表明参数的类型应该是 Item 类型,但我不确定我是否理解这一点。

我也尝试过其他方法:

// 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)

对于函数:copy() 和 move(),我得到与 clipCopy() 和 clipPaste() 相同的错误。

有没有人知道我做错了什么,我到底不明白什么?

提前致谢!

【问题讨论】:

    标签: copy-paste invalid-argument ibm-doors


    【解决方案1】:

    我认为clipCopy 和它的兄弟只能使用Items。使用Item originalMMP = item(originalModule) 而不是ModName_...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 2023-03-18
      相关资源
      最近更新 更多