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: Copy Views to multiple modules
Topic Summary:
Created On: 24-Jan-2008 13:28
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.
 24-Jan-2008 13:28
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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.

CopyViews_v2.dxl
CopyViews_v2.dxl  (11 KB)



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 24-Jan-2008 at 15:23 by David Pechacek
Report this to a Moderator Report this to a Moderator
 25-Jan-2008 20:50
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 12:23
User is offline View Users Profile Print this message


Jon Martin

Posts: 49
Joined: 22-Nov-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 17:58
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Here you go Jon. That should work.

CopyViews_v3.dxl
CopyViews_v3.dxl  (17 KB)



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 18:34
User is offline View Users Profile Print this message


Ken McNair

Posts: 47
Joined: 12-Sep-2003

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.
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 19:41
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I'll see about doing that.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 29-Jan-2008 16:01
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Originally posted by: Ken McNair
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.

Originally posted by: Ken McNair
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.

Originally posted by: Ken McNairTrap View Save errors.


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".

Originally posted by: Ken McNairSkips deleted modules.


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.

Originally posted by: Ken McNairWider Attr Window


There is no attribute window.

CopyViews_v3_1.dxl
CopyViews_v3_1.dxl  (18 KB)



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 31-Jan-2008 00:07
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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


Report this to a Moderator Report this to a Moderator
 24-Sep-2008 10:58
User is offline View Users Profile Print this message


Mathias Burchardt

Posts: 21
Joined: 17-Sep-2008

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.