![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Copy Views to multiple modules Topic Summary: Created On: 24-Jan-2008 13:28 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||||||
I had a member of the forum contact me asking for some help on modifying a copy views tool that let a user pick multiple modules to copy views from a source module to. The version they had just had a giant list view of all the modules in the database with its name and path listed.
I made it a tad easier to find the module you want by rewriting it to use Tony Goodman's(I believe) miniExplorer library and let the user pick the modules they wanted to copy the views to that way. I thought some of you might be interested. Attached is the copy views tool and the necessary miniExplorer.inc file. You'll need to change the include path in the copy views tool to reflect your own setup. EDIT: Apparently the code I modified came from Ian Zimmerman. Whether he wrote it from scratch or modified telelogic's code I don't know. Just trying to get credit where due.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 24-Jan-2008 at 15:23 by David Pechacek |
|||||||
![]() |
|||||||
![]() |
|||||||
Another version that uses a tree view in the main window instead of having one pop up for each module that wishes to be added. This one does not require the miniExplorer include file.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||||||
![]() |
|||||||
![]() |
|||||||
David, Thank you for sharing you DXL in the forum.
Can you add the "ancestors" option that will be copy too? I can't find a way to copy view with "ancestors". 10x |
|||||||
![]() |
|||||||
![]() |
|||||||
Here you go Jon. That should work.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||||||
![]() |
|||||||
![]() |
|||||||
Good work, only your version doesn't include the following fixes in Louie Landale's latest version.
v 2.0 05-Feb-09 Formally adopted. DOORS 7.1 Bug fix; check for no columns before clearing them. tweaked view sizes. 2.1 06-Jan-12 v7.1 Print errors, save view even if some attribute doesn't exist in the target module. print, don't ack errors. 2.2 06-May-19 Trap View Save errors. Skips deleted modules. Wider Attr Window Any chance of one of you merging their changes into the other's? Thanks, Ken. |
|||||||
![]() |
|||||||
![]() |
|||||||
I'll see about doing that.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||||||
![]() |
|||||||
![]() |
|||||||
DOORS 7.1 Bug fix; check for no columns before clearing them. This doesn't seem to be an issue as when it clears the columns, it gets a count of the number of columns and then deletes the first column that many times. If there are no columns, none will be deleted. But I went ahead and added a check that if the count of columns is equal to zero, it just returns without doing any deletions. Print errors, save view even if some attribute doesn't exist in the target module. print, don't ack errors. Changes made that should achieve this. I need more info so I can do this. All errors now are printed. So you can see them when it finishes running. I'm just not sure what you mean by "trap". I don't think deleted modules will show in the treeView. But in case they do and one is selected, I added a bit of code that checks to make sure the selected item is not deleted. If it is, you can't add it to the list of modules to copy views to. There is no attribute window.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||||||
![]() |
|||||||
![]() |
|||||||
Attached find 3 files. One is the original written by Telelogic that seems to be dated Jan-2003, which I found and 'adopted' in June-2004. The 2nd is the latest version I have, which I've called version 'v2.2' dated May-2006 and worked for v7.1 of DOORS, which includes a couple previous internal revisions I made. The 3rd file is simply a DOS 'fc.exe' file compare difference between the two.
Function 'clearDest': I see that there was a DXL bug, where if there were no columns displayed in a module then the 'for col in mod' loop would abort with DXL errors. The solution was to get the first column in the view, and if its null assume there were no columns and don't loop counting them. That error existed in v7.1 but I see its now fixed in v8.1. 'Trapping' errors means inserting a 'noError()' command before the command that might generate an error, and inserting a 'ErrMess = lastError()' command after, and then determining there was an error if ErrMess wasn't null. I see that in function 'copyViews' that I did that about line 170, trapping view save errors. IIRC, you cannot save a view if you lack write rights to it, which for v7.1+ of DOORS turns out to be most of the time. Bypassing Deleted Modules is a no-brainer. IIRC, the version I had worked best if the source module was co-located in the folder that housed the other desired target modules. That's because modules in the 'current folder and below' were displayed as eligible recipients of the view. This means, realistically, you would take one module and move it to the top folder, modify its views, use the script to push the view out to the other modules, then move the module back to its original location. - Louie
|
|||||||
![]() |
|||||||
![]() |
|||||||
Great tool, David!
The copied views always show the "Module explorer" in its original setting as in the "Standard View". I would like to copy a view, which doesn't show the "Module explorer". Is this easy to implement into the tool? Thanks a lot in advance! Mathias Burchardt BeOne Hamburg GmbH |
|||||||
![]() |
Telelogic DOORS
» DXL Exchange
»
Copy Views to multiple modules
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.