![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Exporting diagrams to postscript Topic Summary: Created On: 1-Feb-2007 06:05 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am trying to produce a postscript version of a Rhapsody diagram (in Linux) in order to embed it in a latex document. Using the "print to file" option I can produce a 1-page ps file with the diagram. If the diagram is small, there is a lot of white space around it. Is there a way to get Rhapsody generate a ps image that would fit exactly the size of the diagram?
Thanks, Leonid |
|
![]() |
|
![]() |
|
Hi Leonid
I can't give you a complete answer, but perhaps an idea... The following is the code for a (Windows) VBA macro to save a diagram to a file in EMF format: [CODE]'***************************************************************************** '** exportDiagramAsEmf '** '** Export the selected diagram to a Windows Extended Metafile '** Public Sub exportDiagramAsEmf() 'Get current selected element Dim sElt As RPModelElement Set sElt = getSelectedElement 'Check that we have a diagram element selected If Not TypeOf sElt Is RPDiagram Then Dim errMsg errMsg = "Please select a diagram before running this macro." & vbCrLf MsgBox errMsg, vbCritical, "exportDiagramAsEmf" Exit Sub End If 'Prompt the user for a filename and save the diagram as an EMF file Dim objDialog Set objDialog = CreateObject("SAFRCFileDlg.FileSave") objDialog.fileName = sElt.name & ".emf" objDialog.fileType = "Extended Metafile" If objDialog.OpenFileSaveDlg Then sElt.getPicture (objDialog.fileName) End If End Sub[/CODE] I realise you don't have VBA on Linux, but I think I recall there is some cross-platform scripting available in Rhapsody 7? Anyway, if you can access the Rhapsody object model at all from Linux, you can probably replicate this functionality of this script. I don't know if the RPDiagram.getPicture function returns a Windows Extended Metafile on Linux, or some other more appropriate format. Whatever it gives you, I imagine you'll be able to convert it to Postscript... (Google lists plenty of options for EMF-to-PS.) I hope that helps, Simon ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Exporting diagrams to postscript
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.