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: DOORS 8.1 - Modify ALL External Links in a Module
Topic Summary: Need to modify external links to file whose location changed
Created On: 19-Jun-2007 20:36
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.
 19-Jun-2007 20:36
User is offline View Users Profile Print this message


Frank Poljanec

Posts: 4
Joined: 15-Mar-2007

Hi,

I've created hundreds of external links from a DOORS 8.1 module to HTML files located in a directory on a network drive.

The location of the directory on the network drive changed...does anyone have a DXL script, or know of another way, to do a mass update on all the external links of the module to modify part of the path of the external link to point to the new location?

Please reply as soon as possible.

Thanks,

Frank Poljanec
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 21:38
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Frank,

I think you will need:

string update(string description, string name,ExternalLinkDirection direction, ExternalLinkBehaviour follow, string body, ExternalLink newLink)


It will change existing external link as you like.
I've attached an example to change all links from and to all objects in current module. You need to modify line 17 ff. to your needs ...

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 20-Jun-2007 14:47
User is offline View Users Profile Print this message


Frank Poljanec

Posts: 4
Joined: 15-Mar-2007

Hi Reik,

Thanks for the quick reply! But I think that I did not explain the problem correctly.

The solution that you provided, I think, will replace the ENTIRE existing external link address with another.

The solution that I am looking for will only replace part of the existing external link. Please refer to the example below. It will illustrate exactly what I need to accomplish.

Example: 
I have an external link: C:\html\3045\3045_module_index.html. I need to modify this external link to: N:\external\html\3045\3045_module_index.html

In essence, for each external link in the module, I need to replace the string "C:" with "N:\external"

I need to replace only part of the each existing external link for the entire module, not the entire existing external link.

If you have a solution for this problem, I would be grateful if you would send it to me.


Best Regards,

Frank Poljanec





Report this to a Moderator Report this to a Moderator
 20-Jun-2007 18:26
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Frank,

that is exactly the intension of the above script.

you only need to insert something like this at line 17:

// modify here the szOldBody as you like, it is the target of external link
if (szOldBody[0:1] == "C:") {
szOldBody = "N:\\external"szOldBody[2:];
}


Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 23-Jun-2007 14:28
User is offline View Users Profile Print this message


Frank Poljanec

Posts: 4
Joined: 15-Mar-2007

Hi Reik,

Yes...I figured it out using your dxl script and it worked beautifully!

Thank you very much for your help.


Best Regards,

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