Remove reference path for rasters

Everyone,

 We have a problem that we have some files which have many "hard-referenced" raster files have been attached. I need to suppress the original location so that MS_RFDIR can supply the location. As an intermediate step, I am trying to change the path as follows:

    For Each oRaster In theRasters
        If oRaster.RasterInformation.Path = "T:\2346 Eldon Square Newcastle Phase 3\Images\Statutory Signage" Then
            sPath = oRaster.RasterInformation.Name
            sPath = "H:\2346 Eldon Square Newcastle Phase 3\Images\Statutory Signage\" & sPath
            oRaster.SetAttachName sPath
            i = i + 1
        End If
    Next

 

Which fails to work. SetAttachName requires

oRaster.SetAttachName(sPath)     'according to AutoComplete

But no brackets needed according to VBA help. Presumably the raster ref should then be re-written.

Either way I would really appreciate some help with a method to replace raster reference paths..

Thanks in advance

 

Mike 

 

Parents Reply Children
  • Yes, that's correct as far as I know. But a temp security glitch meant that a user was able to mess about with our standards.cfg with:

    MS_DISALLOWFULLREFPATH = 0
    MS_DISALLOWRELATIVEREFPATH = 0

    which allowed the full path to be inserted. Horrors.

    MS_DISALLOWFULLREFPATH  = 1
    MS_DISALLOWRELATIVEREFPATH = 1

    Have now been restored - to prevent this, of course. But I am stuck with trying to sort the residual mess out, and the "hard-referencing" of raster references is not supplanted by the MS_RFDIR search path, as far as I can see. Hence the need to write this macro.

    Thanks

     Mike