2017-04-26 84 views
0

我是DOORS和DXL的新手。我一直在嘗試使用DXL將項目模板中的模塊複製到任何給定的項目文件夾,但我的方法並未奏效。在此處,複製和粘貼操作,嘗試我的腳本的一部分:如何使用DXL在文件夾/項目之間複製DOORS模塊?

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

每當我跑我的門」 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) 

我得到同樣的錯誤,clipCopy()和clipPaste()的函數:副本()和移動()。

有沒有人有任何想法我做錯了什麼,我到底不明白什麼?

在此先感謝!

回答

0

我認爲clipCopy及其兄弟只能使用Items。使用Item originalMMP = item(originalModule)代替ModName_...

相關問題