![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: updating existing views Topic Summary: Created On: 6-Aug-2007 14:05 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Hi, I have changed the attribute name in a module. This attribute (with old name) was used (displayed) in many views, now newly named attribute doesn't appears in those existing views. I would like to know, is it possible with dxl code to update the existing views, so that existing views display the new named attribute? Well.... i have many many modules, so i don't want to update all views (with filtering, etc. ) in all these modules manually. i would like to do per dxl script. Any idea? regards, Khalid | |
![]() |
|
Hi,
I have changed the attribute name in a module. This attribute (with old name) was used (displayed) in many views, now newly named attribute doesn't appears in those existing views. I would like to know, is it possible with dxl code to update the existing views, so that existing views display the new named attribute? Well.... i have many many modules, so i don't want to update all views (with filtering, etc. ) in all these modules manually. i would like to do per dxl script.
Any idea?
regards,
Khalid
|
|
![]() |
|
![]() |
|
Khalid,
You can do this. Look up Views in the DXL Reference manual. Your code will look something like this (I have NOT checked this) string vName Module m = current for vName in views(m) do { int colCount = 0 Column c for c in m do P colCount++ } insert(column colCount++) attribute (column colCount, "Your new attribute") } I hope this gets you off on the right foot. Kevin ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
Oh, and obviously you'll want a
if ( vName == "View I want to update" ) { } otherwise, the code I put in above will update ALL views. ![]() ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
You will need to load each view, and save the view after changing the column.
Try the following. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Tony, thanks so much for the correction! You don't know how many times I've forgotten the simple load(v) function!
I never learn. ![]() ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
Hi all,
thanks a lot. It works.
BR,
Khalid
|
|
![]() |
|
![]() |
|
Golly, I was sure DOORS correctly updated all the views when you renamed an attribute.
|
|
![]() |
|
![]() |
|
If you rename an attribute, Tony's code won't work (DOORS 8.1)
When you load a view with a renamed attribute, this attribute isn't displayed preventing the loop to find your attribute. What you can do to update your views is: 1. Create a dummy attribute with the desired name 2. Use Tony's code 3. Delete the dummy attribute 4. Rename the real attribute ------------------------- Hans Schaller www.doorstools.de Edited: 18-Oct-2007 at 13:20 by Hans Schaller |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
updating existing views
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.