NickHalden
NickHalden

Reputation: 29

Get the full path of current selected module

The problem is quite straightforward but since I am new to dxl, I cannot understand how to print full path name for a currently selected DOORS module.

Here is what I do:

Step1: Select any module in a project in DOORS
Step2: Tools -> Edit Dxl
Step3: Use the following code

Item item = (Item null)
string iType = ""
Module m = null
for item in current Project do 
    {
    iType = type(item)
        if (iType == "Formal") 
            {
              m = read(fullName(item), false)
              print name(m)"\n"
            }
     }

This code gives me a list of all the modules in that current project, which is not what I want. I want the full path of only a currently selected DOORS module.

After reading the dxl manual I understand that I have to use the command print " " fullPath(m)"\n" But I get the following errors.

-E- DXL: <Line:10> incorrectly concatenated tokens
-E- DXL: <Line:10> undeclared variable (fullPath)

Any help would be highly appreciated.

Upvotes: 1

Views: 627

Answers (2)

Dom
Dom

Reputation: 1

If you have a structure above this will help also (might have problems with projects in projects):

Module m = current
Project p = current

string k = path(p)

print k fullName(m)"\n"

Upvotes: 0

Mike
Mike

Reputation: 2346

print fullName getSelectedItem

Upvotes: 0

Related Questions