How to reverse links

Hi everybody,

I'd like to reverse links and linkset.
How can I manage that

For example, I could :
1- export links with source and target in a txt file

2- reverse way of linkset in txt

3- remove linkset

4- Create a new linkset in reverse

5- import txt in new linkset

Somebody could help me ? I don't know really DXL
Thank's
Jean Michel
JeanMi - Wed Jan 27 11:22:18 EST 2010

Re: How to reverse links
Bob_Swan - Thu Jan 28 03:59:07 EST 2010

I can't offer any code because as a TREK user that is a built in (encrypted) facility.
However:-
If as you say 'don't know really DXL' then this is a hard and dangerous place to start learning.
Make sure you do all your developments in a test database, and take an archive of the real project before you run on that.

You don't need to involve text files at all, if required, information should be copied to a skip lists/buffers and manipulated there.

Process would be more like :-
identify required linkset
create new linkset
for each entry in original linkset create reversed link in new linkset
save new linkset
delete original linkset (if required).

All with suitable handling for cases where reverse linkset already exists, write access to modules does not exist, correcly handle existing links etc.

Re: How to reverse links
Craig_Cordrey - Thu Jan 28 04:21:36 EST 2010

Perhaps I don't really understand the problem, but I'm not sure you need to use DXL at all.

1. Create a view showing the current links and Object ID.
2. Export the view into a spreadsheet.
3. Import the spreadsheet, updating existing objects, with the link information going into a new attribute - say "CurrentLink".
4. Use the Link by Attribute function under the Link menu and use CurrentLink along with the desired Link Module, Target Module and link direction.

I certainly agree with Bob that this should be tested on a copy first.

Craig