在 DXL - DOORS 中创建文件夹

发布于 2025-01-16 07:51:58 字数 339 浏览 5 评论 0原文

我正在尝试制作一个脚本,将一个项目的内容复制到 DXL 中的另一个项目(即文件夹和模块)。为此,我看到有一个创建函数,

create(string name, string description)

它创建一个文件夹...但从我所见,它在我运行脚本的当前目录中创建它。

有什么方法可以从 P 项目的 C 文件夹中运行 M 模块中的脚本,生成一个带有 >同名 C 但在新 NP 项目内?

谢谢:)

I am trying to make a script that will copy the contents of one project to another (ie folders and modules) in DXL. To do it, I have seen that there is the create function,

create(string name, string description)

which creates a folder... But from what I see, it creates it in the current directory where I run the script.

Is there any way that running the script in the M module, from the C folder of the P project, generates a folder with the same name C but inside the new NP project?

Thanks:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心如狂蝶 2025-01-23 07:51:58

来自 DXL 手册:名称参数可以是绝对名称或相对名称,并且可以包含路径。。因此,您可能有一个类似的循环

Project P = project ('/P')
Item i
for i in P do {
   if (type i == 'Folder') {
      string nName = name i
      create ("/NP/" sName, "")
   }
   // recursively copy the content of the folder
}

此外,根据您的需要,您可能想看看 clipCopyclipPaste,它们复制整个层次结构。

from the DXL manual: The name argument can be an absolute or relative name, and may include the path.. So, you might have a loop like

Project P = project ('/P')
Item i
for i in P do {
   if (type i == 'Folder') {
      string nName = name i
      create ("/NP/" sName, "")
   }
   // recursively copy the content of the folder
}

Also, depending on your needs, you might want to have a look at clipCopy and clipPaste, which duplicates an entire hierarchy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文