How to create a Layout DXL with relative path instead of module URL ID

I have attached a layout dxl that uses URL as handle for the formal module and the link module.

The attribute is created with the built in Doors wizard.

Is it possible to modify this script to use : /P2513/001 BMT Doors/05 Ontology/ESWBS instead of 4a434b53621d54ce-00010402

and

/P2513/001 BMT Doors/10 Link Modules/structures instead of 4a434b53621d54ce-00010290

 


roloenni - Tue May 19 05:56:02 EDT 2015

Re: How to create a Layout DXL with relative path instead of module URL ID
BillTidy - Tue May 19 11:03:07 EDT 2015

Gotta ask.... why?

The values are hard-coded anyway. If the reason is to make the DXL code more readable then it would be easier to add a comment above the hard-coded value eg:

//    Module ID  4a434b53621d54ce-00010402  refers to module  /P2513/001 BMT Doors/05 Ontology/ESWBS

Even with the module id, you can just copy+paste it into the DOORS db navigation window 'Location' pulldown then keyboard Enter and it will open that module for you so you can easily see which module is being referred to.

Re: How to create a Layout DXL with relative path instead of module URL ID
roloenni - Tue May 19 11:13:08 EDT 2015

BillTidy - Tue May 19 11:03:07 EDT 2015

Gotta ask.... why?

The values are hard-coded anyway. If the reason is to make the DXL code more readable then it would be easier to add a comment above the hard-coded value eg:

//    Module ID  4a434b53621d54ce-00010402  refers to module  /P2513/001 BMT Doors/05 Ontology/ESWBS

Even with the module id, you can just copy+paste it into the DOORS db navigation window 'Location' pulldown then keyboard Enter and it will open that module for you so you can easily see which module is being referred to.

I weekly get a project arcive from a sub supplier that has lots of attribute DXLs in different views.

Doors will not update attribute DXLs only layout DXLs so I manually have to update the URLs for all the attributes.

Since the arcive  always is moved to the same folder in my project I can save a lot of time by using relative path.

Re: How to create a Layout DXL with relative path instead of module URL ID
woodpryan - Wed May 20 11:03:41 EDT 2015

roloenni - Tue May 19 11:13:08 EDT 2015

I weekly get a project arcive from a sub supplier that has lots of attribute DXLs in different views.

Doors will not update attribute DXLs only layout DXLs so I manually have to update the URLs for all the attributes.

Since the arcive  always is moved to the same folder in my project I can save a lot of time by using relative path.

So, you will notice that the LayoutDXL stuff uses the function itemFromId(stringID). The problem you are coming across is that the ID will change from one Database to another. Unless you get the supplier of the Project to change the LayoutDXL, you will have to do this every time you receive an archive.

 

Replace the function itemFromId(stringID) in the LayoutDXL code with the function item(stringFullPath). Then, the LayoutDXL Attributes and Views should properly load for you.