Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Is it possible to add captions to images in ReporterPLUS?
Topic Summary:
Created On: 20-Aug-2007 14:17
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
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.
 20-Aug-2007 14:17
User is offline View Users Profile Print this message


carlos ramos

Posts: 17
Joined: 1-Feb-2007

My document is generarting just fine and getting the pictures from the model, however, I'd like to add the caption just below the figure, similar to the following:

Figure 1: Foo Bar Block Definition Diagram

I don't see any command in the context menu for this, is there some MS Word VBA needed to accomplish this?
Report this to a Moderator Report this to a Moderator
 20-Aug-2007 16:17
User is offline View Users Profile Print this message


Norbert Scherm

Posts: 5
Joined: 10-Aug-2007

Yes, you re right!
There is a solution where you have to export "tagged" information to the word document. E.g. write plain text: <caption> Foo Bar Block Definition Diagram </caption> to the word document. Then you can use a simple VBA script to convert the texte between the tags into a caption.

Norbert
Report this to a Moderator Report this to a Moderator
 20-Aug-2007 16:24
User is offline View Users Profile Print this message


carlos ramos

Posts: 17
Joined: 1-Feb-2007

Thanks for the help. By the way, do you know where I could find a sample VBA script to do this? Is it similar to the VBA script given in the forum about changing the table styles?
Report this to a Moderator Report this to a Moderator
 22-Apr-2008 17:03
User is offline View Users Profile Print this message


Sean Duggan

Posts: 29
Joined: 21-Apr-2008

This is a little late, I know, but one of the projects here used the "insert file" command to insert a Microsoft Word file consisting solely of Figure, then a field with type StyleRef/Caption, a dash, another field of type Seq, then some filler text. After the insert file command, you put in the $name property in ReporterPlus. Afterwards, you'll need to search for the filler text, replace it with a blank, and regenerate the fields, but it works like a charm.
Report this to a Moderator Report this to a Moderator
 23-May-2008 15:07
User is offline View Users Profile Print this message


Sean Duggan

Posts: 29
Joined: 21-Apr-2008

Just to follow up, here is the solution we use here to provide captions to the generated documents. It does not apply the caption style and it's missing such niceties as preventing the caption from being separated from the image when pages wrap (this can be done manually by selecting the picture and setting the Paragraph settings to check "Keep with next"), but it works well enough for us.

In the Text block of the section where you're displaying the image:
[INSERT PICTURE: filename =(«$path»), location =()][CR][INSERT FILE: filename = (Path to the attached file\Figure Caption.doc), asLink=FALSE]«$name» Diagram[CR][STYLE: NORMAL][ALIGNMENT: ALIGN LEFT][CR]

After the file has generated, search for "@@Replace^p^p" and replace it with "". Basically, Rhapsody adds in two carriage returns between the inserted Word file and the text. The "@@Replace" is just a convenient bit of text unlikely to show up naturally in the document itself. You could just as easily use "ZZZZXXX" or something similar.

Figure Caption.doc
Figure Caption.doc  (24 KB)



Edited: 23-May-2008 at 15:24 by Sean Duggan
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.