Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2012-12-03T18:24:06Z by SystemAdmin
oymsj001
oymsj001
15 Posts
ACCEPTED ANSWER

Pinned topic Importing Images from DOORS

‏2012-11-12T23:45:09Z |
Hi,

What is the accepted method of importing "Picture" objects from DOORS?
It works for some images when a Text object has a Data Expression of Module/Object/Text and a condition of Picture == True but we have found that this doesn't work with all standard image formats.

Also is there an example template of OLE object importing using the RPE macro?

Kind regards,
Samuel O'Malley
Updated on 2012-12-03T18:24:06Z at 2012-12-03T18:24:06Z by SystemAdmin
  • oymsj001
    oymsj001
    15 Posts
    ACCEPTED ANSWER

    Re: Importing Images from DOORS

    ‏2012-11-12T23:56:24Z  in response to oymsj001
    Also this method leaves "<Picture>" text in the exported document.

    Sam
  • SystemAdmin
    SystemAdmin
    1299 Posts
    ACCEPTED ANSWER

    Re: Importing Images from DOORS

    ‏2012-11-14T18:03:14Z  in response to oymsj001
    I have the same question. I prefer the display of the picture object over OLE's in DOORS. However, I have no control over how the picture object is extracted by RPE. If I put the picture cation in place of the "<Picture>" string in the object text, RPE publishes the caption after the picture, on the same line. If you try to use a Script Expression in RPE to pull the object text, you get the string "<Image/OLE>" preceding the caption and no picture. I can't find a way to pull just the picture out without the text.

    I'd rather not have to fix this in post and I'd rather not have to create another attribute in my DOORS module to store the caption. Is there a good way to publish DOORS picture objects? Should I go back to OLE's?
    • oymsj001
      oymsj001
      15 Posts
      ACCEPTED ANSWER

      Re: Importing Images from DOORS

      ‏2012-11-15T00:41:27Z  in response to SystemAdmin
      I have a macro which removes the <Picture> tag, and we use a different method of putting Figure Captions in. Our captions are their own object and they look like:
      Figure SRS-234: This is the caption for object with ID SRS-234

      
      Public Sub cleanUpPictures() On Error Resume Next Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = 
      "<Picture>" .Replacement.Text = 
      "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub
      


      However the big problem I have now is that the pictures come through with a horrible resolution. Also if a picture is cut off in DOORS by a column being not wide enough, then the resultant image in Word is also cropped.
      I would really like it if Dragos could comment here about the best methods to get images from DOORS. Our setup is close to good enough, just it has the resolution and cropping problem now. Also if we use OLE Objects instead then as a static image they look horrible, as a dynamic embedded object they look great but take close to 20 minutes to export compared to 1 minute with static images.

      Sam
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: Importing Images from DOORS

      ‏2012-12-03T18:24:06Z  in response to SystemAdmin
      Hi

      Please provide some advice. I have a DOORS object which has object text, ole and some text below the image which I need as a Figure Caption. If I add the Figure Caption element it does not recognize the content to be set as figure caption.
      To overcome this I have a filter in RPE to check if the DOORS object has an OLE. Whan the DOORS object has an OLE I search for the string "Figure :" in the object text. Once this is found the entire string following it I add it as an variable in the figure caption elment.

      SO I do get my table of figures. But I run into issues that the same content which I made as figure caption is also present as text in the object text in DOORS object. I tried to write a script which on finding the OLE adds the contents of the complete object to a varibl and I remove the string "Figure 0-9:...." from the objct text. But I again run into problems since I have used a script to contain the Object text I do not get the OLE's but just the <OLE/image> tag. Pleas help me out in getting the figure captions done for the OLE's.

      Looking forward to your reply.
  • Dragos.Cojocari
    Dragos.Cojocari
    1608 Posts
    ACCEPTED ANSWER

    Re: Importing Images from DOORS

    ‏2012-11-15T08:43:04Z  in response to oymsj001
    Hey Sam,

    what are you trying to achieve, get only the images from DOORS?

    Regards,
    Dragos

    RPE Actual
    • oymsj001
      oymsj001
      15 Posts
      ACCEPTED ANSWER

      Re: Importing Images from DOORS

      ‏2012-11-16T01:10:58Z  in response to Dragos.Cojocari
      Hi Dragos,

      When the user uses "Insert>Picture" in DOORS, I want that Picture to output in Word from RPE. I got it working, but the images come out as a bad quality compared to how they look in DOORS.
      The only image type which doesn't lose quality is .BMP I think.

      OLE Objects when brought across as static images lose quality too. Embedding them using your macro makes them look really nice but literally takes 20 times longer to publish our test module. Also we have found that trying to insert a JPEG for example as an OLE object doesn't work, it only displays a placeholder which when double clicked will open the image.

      Kind regards,
      Samuel O'Malley
  • Dragos.Cojocari
    Dragos.Cojocari
    1608 Posts
    ACCEPTED ANSWER

    Re: Importing Images from DOORS

    ‏2012-11-16T09:46:38Z  in response to oymsj001
    Hey Sam,

    static images should be rendered without any loss of quality in RPE ( unless you resize them). If image quality loss is observed please upload a DOORS module that can be used to reproduce the issue and also provide info on output format used and RPE version.

    With OLEs the story is quite different since the default behavior is to use the static image ( png) generated by DOORS ( actually by the rich edit control) for the OLE content. And in most cases that image has a lower quality than the OLE itself. To retain the quality you need to export OLEs as such by specifying "ole as static images = false" in the docspec and running the rpe macro from rpe.dot This is a slower process than the one using static images since the amount of data exported from DOORS is much larger ( the OLEs are in general much larger than the static images that represent them).

    Regards,
    Dragos

    RPE Actual