Serena Dimensions: open Files with correct Filename

At work we use Serena Dimensions for Version Control.
Double-clicking a sourcefile opens the code in the editor of your choice, but unfortunately Dimensions doesn’t provide a meaningful filename as the clicked element is downloaded to a temporary file and the editor shows just the name of the temporary file.

After requesting an improvement in the Dimensions community i got some great hints from Paul Caruana and finally implemented the following workaround:

  • Create a batch file
    echo off 
    set dimexe="c:program files (x86)serenadimensions 12.2cmprogdmcli"
    set ueexe="c:program files (x86)ultraedituedit32"
    set fi=%2
    set fi=%fi:"=%
    set ver=%3
    set ver=%ver:"=%
    set typ=%5
    set typ=%typ:"=%
    set tmpfile=C:tmp%fi%.%ver%.%typ%

    echo parms: %*
    echo file: %fi%
    %dimexe% FI %1 /USER_FILENAME="%tmpfile%" /EXPAND /OVERWRITE
    %ueexe% %tmpfile%
  • Create a new „Tool“ inside Dimensions:
    •  Menu „Tools“ -> „“Customize Menu and Toolbar“; Tab „Tools“ -> Create a new Tool (Star-Button), choose a name (e.g. „MyEdit“).
      Configuration: 
      • Command: C:fooprojectscmeditcmedit.cmd
      • Arguments: $[Specification] $[Filename] $[Revision] $(Product):$(Workset) $[type]
      • Start In: c:foo

This gives me a „MyEdit“ Entry in the Context Menu which downloads the file & launches Ultraedit with a meaningful filename – Mission accomplished!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert