Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: inventory DXL script
Topic Summary:
Created On: 1-Dec-2003 18:33
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 1-Dec-2003 18:33
User is offline View Users Profile Print this message


Ananda Badugu

Posts: 20
Joined: 3-Feb-2003

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)
Report this to a Moderator Report this to a Moderator
 2-Dec-2003 08:50
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Try the attached. :-)


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 2-Dec-2003 16:09
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 9-Dec-2003 09:26
User is offline View Users Profile Print this message


Kristian Bøe

Posts: 29
Joined: 16-Jun-2003

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.