![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: inventory DXL script Topic Summary: Created On: 1-Dec-2003 18:33 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi
We have DXL script to generate Inventory report for each project. The DXL created based on the following structure Project contrains Modules. I’m running this script on each project and get the module information. Now we re-structured modules in the following way. Project contains folders and each folder contains modules. Once we changed format the inventory DXL script is not working. Now I replaced the projects to folder in the DXL script, but it is giving syntax error. I made changes in the script like this. Folder fRef =current() and { For modName in fRef do { Could any one help us, what I need to change in the DXL this is the script. int tDate = intOf today string modName string real1,real2,real3,real4,real5,real6,real7 Module modref string attributeName //string attrDesc Module m = current () string createdOn = "Created on" int numOpen = 0 Project pRef=current () string projectName = name(pRef) bool found = true string vsion void attr () { for modName in pRef do { numOpen = numOpen + 1 Module s = read(modName, true) //Desc = Desc (Module s) string attr = "Created on" vsion = version (Module s) Date created = s.attr //string Mdesc = Desc string Mversion = vsion string Desc = "Description" string creatby = "Created By" string MDescription = s.Desc string cby = s.creatby real1 = "Document Name : "modName" " real2 = "Date on CM Control : "created " " real3 = "Created By : "cby " " real4 = "Version : "Mversion " " real5 = "Descriptionab : "MDescription " " real6 = "-------------------------------------------" print real1 "\n" print real2 "\n" print real3 "\n" print real4 "\n" print real5 "\n" print real6 "\n" close (Module s) } } real7 = "Doors Inventory for " projectName print real7 "\n" attr //close (file) |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
The "for ModuleName in Project" loop, as advertised, only gets modules in the Project's root folder. The "for Item in Project" loop, as advertised, gets all the items in the project.
when looping through a project to do things to all your modules, you need to do the following: for itm in proj do { if (type(itm) != "Formal") continue NameMod = fullName(itm) mod = edit(NameMod, false) // deal with mod } The only other option is to use the "for item in Folder" loop that likewise only gets items in the folder (not sub-folders), but then you recurse through sub-folders with two loops: if Type = "Formal" and then if Type = "Project" or "Folder". This second method is needed if your original "source" is the current folder rather than the current project. - Louie |
|
![]() |
|
![]() |
|
I've written a parsing function that gets you all of the modules that are of the samt type and in the same folder as the current (from which the script is run from) module.
A nice extra is that before processing the relevant modules, they are sorted and the output will be processed alphabetically by module name. I've used this to export aggregations of views to MS Excel, there I add a move to the current module's view in each opened module (have to be opened with the flag true if you want to export special views and filters...) ------------------------- Kristian Bøe Extenda AB Kristian.Boe@extenda.se Edited: 9-Dec-2003 at 09:28 by Kristian Bøe |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
inventory DXL script
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.