[softwarelist] Re: Referenced images and DDL

  • From: Anthony Hilton <ajh@xxxxxxxxxxxxxxxxx>
  • To: Ovation Pro List <davidpilling@xxxxxxxxxxxxx>
  • Date: Tue, 26 Jun 2007 17:53:25 +0100 (BST)

In <URL:news:local.opro> on Tue 26 Jun, David Pilling wrote:
> In message <Marcel-1.53-0626115135-064ZSTv@xxxxxxxxxx>, Anthony Hilton 
> <ajh@xxxxxxxxxxxxxxxxx> writes
> >David Pilling - Is there any way to use a dummy path (even OvationPro$Dir)
> >when reading a DDL file with relative picture references so that the
> >{filepath} can be resolved when the file has been saved and is re-opened?
> 
> My first thought is that when a DDL file is loaded, things work as if a 
> new document had been created - just like if you click on the icon bar 
> icon. The point being that such a new document does not have a 
> {filepath} - because it has never been saved.

Sorry I didn't make my meaning clear. In light of the last paragraph which
was snipped (an OPro document with a relative path may also hold a
no-longer-valid full path), is it possible to make OPro put in something for
a full path (which is valid even though that is not where the referenced
pictures are) when creating the new document from the DDL? I mentioned
OvationPro$Dir because it will always evaluate to a valid path.

> 
> One idea is that you set the RISC OS CSD in such a way that if 
> {filepath} evaulates to the null string references work.
> 
> So:
> 
> {filepath}.^.sa00"}
> 
> would evaluate to
> 
> "".^.sa00
> 
> the CSD (set via F12 or a task window using the dir command) would have 
> to be one level below the file sa00 - e.g. create a temporary folder and 
> set the CSD to it.

The folder containing the document and the pictures has a folder called
TempCSD and TempCSD is set as the CSD from the filer. The DDL from the
document is saved to the same folder as the document and the pictures.

A new document from the DDL still results in no pictures and a type=5 error
when trying to open the Reference dialogue box.

> Obviously you could edit the DDL, but that means losing the relative 
> paths, although you could get them back again using the collect feature.

I have checked that absolute paths in the DDL file are maintained and the
pictures referenced when a new document is created from the DDL, and when a
new DDL is made from the descendant document.

Dave Thomas - This is the bit you need to work round the problem - use search
and replace on the DDL file to make the relative paths absolute and a new
document will still have referenced pictures, just not be so portable.

Are these behaviours the same in the Windows version?

> I think one of the original ideas was that these paths can contain macro 
> expansions ({filepath} of course is an example) which can involve system 
> variables.
> 
> So you could define a macro - call it myfilepath with a body of
> {filepath}
> 
> when you want to use something other than filepath you just redefine the 
> macro body as
> 
> <MyPics$Dir>

My understanding of Dave's original post was that he had a document with
embedded pictures which he changed to all referenced by relative paths and
then took a DDL file as insurance but found that he lost the references. So,
given the fairly frequent advice when a document exhibits problems to "save
as DDL and start from there" this is going to cause problems for anyone using
referenced pictures in a document of significant size.

Is there an easy way (a global way) to change all pictures in a document from
embedded to referenced? I can see the other way is relatively easy and
catered for with buttons in the Reference dialogue box. I suppose this would
involve saving the picture data out from the document to the directory
specified in Collect all referenced pictures.

Perhaps an easier fix would be to evaluate the relative path to an absolute
path when saving DDL. It might also be useful to solely (I wrote simply but
realised it is unlikely to be simple to implement) change the reference to
relative if the relative path evaluates to the folder specified in Collect
referenced pictures instead of making copies with a new name.



Anthony

-- 
ajh@xxxxxxxxxxxxxxxxx


Other related posts: