How to give Exclusive edit permissions?

白昼怎懂夜的黑 提交于 2020-01-07 03:02:08

问题


a few days ago i developed a script in dxl to make a "first release" Baseline for each module in a project folder. But when I run the script appears a message saying I have not permissions to do so. This is my code:

void CreateBaseline (Module mod) {                     // Function to create
    create (mod, nextMajor(), "First Release")         //    baseline
}
Folder fStart = folder "/Z_Training/Baselines"         // Folder
Module iCurrent                                        // Module handler

for iCurrent in fStart do{           
setExclusive()                                         // Set Exclusive edit
Module (iCurrent, true)                                //    rights
CreateBaseline(iCurrent)
}

As you can see I included the line "setExclusive()" to deal with it, but this does not fix the problem completely since the baseline is created only for the current open Module. Could you help me in this? Thanks in advance.


回答1:


Seems I omitted a step when answering Is it possible to create a baseline for each module in a Folder using a dxl script (DOORS)?. Sorry, I do not have a DOORS installation at my current computer.

The method how to open a module in exclusive mode is described in the DXL manual, section "Module manipulation". You will need the perm Module edit(string name [,bool disp[, bool silent[, bool loadStandardView]]]) (see the manual for a description of the parameters).

In this example this would be

[…] do {
Module mod = edit (fullName iCurrent, false, true, true)
CreateBaseline(mod)


来源:https://stackoverflow.com/questions/39474201/how-to-give-exclusive-edit-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!