Topic
  • 13 replies
  • Latest Post - ‏2012-10-30T18:15:47Z by gdc4s
Irfan_Jamal
Irfan_Jamal
78 Posts

Pinned topic Hyperlink

‏2009-07-08T07:54:38Z |
Hello All,

If there is any hyperlink within a Object text, it is not exported to word as a Hyperlink. Any reasons?

I have a Object text in DOORS which contains a mix of Text and Hyperlink. The Hyperlink in this Object is exported as normal text as the other text in this Object.

e.g. If the Object has the following text

There is a Hyperlink Link: http://www.google.com here in this text.

It is exported in RPE as

There is a Hyperlink www.google.com here in this text.

Any suggestions how to handle this problem?

Thanks & Regards
Irfan
Updated on 2012-10-30T18:15:47Z at 2012-10-30T18:15:47Z by gdc4s
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: Hyperlink

    ‏2009-07-08T11:05:16Z  
    Hi Irfan,

    This kind of hyperlinks within the specified context are not received as hyperlink data by RPE. Although, you can run the Word macro from here : http://www.ibm.com/developerworks/wikis/display/rpe/Find+links, that identifies this hyperlink texts. On Pdf, this texts are recognized as hyperlinks by default.

    Milan
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-07-14T07:11:14Z  
    Hi Irfan,

    This kind of hyperlinks within the specified context are not received as hyperlink data by RPE. Although, you can run the Word macro from here : http://www.ibm.com/developerworks/wikis/display/rpe/Find+links, that identifies this hyperlink texts. On Pdf, this texts are recognized as hyperlinks by default.

    Milan
    Hello Milan,

    I tried the macro from the link which you have mentioned. The macro has some problems.

    Please find attached the word document (a sample generated by RPE). It has 2 links. When I run the rpe macro or resolveLinks macro, I get a runtime error "value out of range".

    Could you please help me in resolving this?

    Notes:

    • The text in the attached file is exported in table format
    • The link is at the begining of the 3rd line
    • If I remove the link2, resolveLinks runs successfully for Link 1
    • All links are resolved when exported as a paragraph and not as a table.

    Thanks & Regards
    Irfan
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-07-14T08:08:24Z  
    Hello Milan,

    I tried the macro from the link which you have mentioned. The macro has some problems.

    Please find attached the word document (a sample generated by RPE). It has 2 links. When I run the rpe macro or resolveLinks macro, I get a runtime error "value out of range".

    Could you please help me in resolving this?

    Notes:

    • The text in the attached file is exported in table format
    • The link is at the begining of the 3rd line
    • If I remove the link2, resolveLinks runs successfully for Link 1
    • All links are resolved when exported as a paragraph and not as a table.

    Thanks & Regards
    Irfan
    hello

    On further analysing the issue, I found out that

    • the links are not resolved if the text is in table format and the link is present other than the first row
    • The links in any row other than the first row are resolved only if the link is appearing first in the cell (i.e. no text before https:// or http://)
    • The links in the first row are resolved irrespective of where they are present.

    I see that the macro resolveLinks adds a few delimiters to the collection. I feel that the delimiter for table/row/cell should also be added here so that the macro recogonizes it.

    Any idea what are the delimiters for table/row/cell?

    Irfan
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: Hyperlink

    ‏2009-07-22T13:47:53Z  
    hello

    On further analysing the issue, I found out that

    • the links are not resolved if the text is in table format and the link is present other than the first row
    • The links in any row other than the first row are resolved only if the link is appearing first in the cell (i.e. no text before https:// or http://)
    • The links in the first row are resolved irrespective of where they are present.

    I see that the macro resolveLinks adds a few delimiters to the collection. I feel that the delimiter for table/row/cell should also be added here so that the macro recogonizes it.

    Any idea what are the delimiters for table/row/cell?

    Irfan
    Hy Irfan,

    Add the Chr(7) to delimiters collection in the VBA macro and run it. There should be some improvements.

    Milan
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-07-23T02:59:31Z  
    Hy Irfan,

    Add the Chr(7) to delimiters collection in the VBA macro and run it. There should be some improvements.

    Milan
    Hello Milan,

    No, this idea didn't work :-(

    Regards
    Irfan
  • Dragos.Cojocari
    Dragos.Cojocari
    1616 Posts

    Re: Hyperlink

    ‏2009-08-12T10:45:17Z  
    Hey Irfan,

    I have updated the macro on the wiki page here: https://www.ibm.com/developerworks/wikis/display/rpe/Find+links

    The problem with the original macro was caused by how selection works in Word tables. if you try to select from one point in the cell all the content till the end of the cell, MS Word will actually select the entire content of the cell. You can reproduce this manually also. This caused the macro to report the end of the links before there start hence the error.

    Please try the new macro and let me know if the problem is solved.

    Regards,
    Dragos
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-08-13T05:41:29Z  
    Hey Irfan,

    I have updated the macro on the wiki page here: https://www.ibm.com/developerworks/wikis/display/rpe/Find+links

    The problem with the original macro was caused by how selection works in Word tables. if you try to select from one point in the cell all the content till the end of the cell, MS Word will actually select the entire content of the cell. You can reproduce this manually also. This caused the macro to report the end of the links before there start hence the error.

    Please try the new macro and let me know if the problem is solved.

    Regards,
    Dragos
    Hello Dragos,

    Thanks for your effort!

    I get a new error now. Please check the attachment.

    Thankns & Regards
    Irfan
  • Dragos.Cojocari
    Dragos.Cojocari
    1616 Posts

    Re: Hyperlink

    ‏2009-08-13T06:37:17Z  
    Hello Dragos,

    Thanks for your effort!

    I get a new error now. Please check the attachment.

    Thankns & Regards
    Irfan
    Hey Irfan,

    can you send the document where this error occurs or a document replicating the problem.

    Regards,
    Dragos
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-08-13T10:17:17Z  
    Hey Irfan,

    can you send the document where this error occurs or a document replicating the problem.

    Regards,
    Dragos
    Hello Dragos,

    This happens when there is already a table somewhere in the document and one column of the table has already some Hyperlinks.

    When, I delete this table, your macro runs fine.

    If you want a document, I need to prepare one for you. Since what is exported for me is all internal data which I cannot share.

    Thanks & Regards
    Irfan
  • Dragos.Cojocari
    Dragos.Cojocari
    1616 Posts

    Re: Hyperlink

    ‏2009-08-13T11:00:46Z  
    Hey Irfan,

    do send me a document that replicates the current problem.

    Regards,
    Dragos
  • Irfan_Jamal
    Irfan_Jamal
    78 Posts

    Re: Hyperlink

    ‏2009-08-13T11:37:38Z  
    Hey Irfan,

    do send me a document that replicates the current problem.

    Regards,
    Dragos
    Hi Dragos,

    Attached is the word document which has the problem. When I run the macro, I get an error.

    Regards
    Irfan
  • Dragos.Cojocari
    Dragos.Cojocari
    1616 Posts

    Re: Hyperlink

    ‏2009-09-11T08:21:19Z  
    Hi Irfan,

    see attached the changed document with and updated macro. The new macro is taking into account some new conditions. While the current macro covers many new scenarios it might not cover all. The main problem is the way Word selects various texts based on their context: trying to select the last word in a cell will select the entire cell in some scenarios.

    Regards,
    Dragos
  • gdc4s
    gdc4s
    17 Posts

    Re: Hyperlink

    ‏2012-10-30T18:15:47Z  
    I am using RPE 1.1.2.2 to generate a Word document from a Rhapsody 7.6.1.1 model.

    In a description field of a model element there is a mix of text and hyperlink.

    When I generate the Word document the hyperlinks resolves to text and does not get expanded.
    E.G.
    (This is the text that appears in the Description field of the 4-cylinder engine block)

    The 4-cylinder specialization of the Engine component has two performance graphs, one for Torque and one for Horsepower.

    _C:\Users\p56341\Desktop\RPE support\SE Common Model\SSDD Auto-Gen Minutes 2012_10_11.docx_

    (Additional descriptive text here, to demonstrate that a linked diagram may appear anywhere within a Description)

    I am calling the latest version of the fixLinks macro:
    http://www.ibm.com/developerworks/wikis/display/rpe/Find+links

    but that does not seem to work.
    Any help would be appreciated.
    Thanks in advance
    Stephen