Solved

Image as External Reference dwg file

  • 19 January 2016
  • 4 replies
  • 22 views

Badge +2

Hi,

If dwg file is attached to dwg file as external reference then we can know with attribute autocad_xref_name. Is there any possibility to know if image is attached???

Pratap

icon

Best answer by jovitaatsafe 2 May 2019, 22:45

View original

4 replies

Badge +5

Not quite sure I understand all of your question. But my experience of rasters and the CAD writer is that if you use rasters as a surface texture, or just as a positioned image in a DWG it will just be a image file in the same folder as the DWG is written out to.

When you open the DWG in CAD you have to have the image in folder as well and CAD should open the image in the right place- or as a surface texture. I have noticed though that Autocad can be quite picky about this and have noticed bugs in Autocad 2014.

I don't believe an image is ever 'attached' to a DWG, it is just written out side by side with it.

@pratap I might be off track here but didnt fully understand your question.

When you insert an image into an Autocad drawing (2019) it is treated like a regular reference file in that it appears in the reference file manager where you can perform certain operations, like assign a relative or absolute path etc.

The problem is that when FME reads the DWG file it treats these image references as standard raster files and does not provide the properties listed for the image reference such as path. The issue we have is that were are trying to standardize on thousands of DWG files to have relative paths with regards to the images, but some still have Absolute paths and we want to track these down.

Userlevel 1
Badge +11

Hi @gns388,

I checked in with our cad experts and I can confirm that image external references reading in as rasters is expected behaviour. In other words, while the image is an external reference, it will be read in as a raster entity, not an xref entity.

 

The path information is stored on the feature as 'autocad_raster_filename'. Unfortunately this will always be the full path if the raster was read successfully.

 

A potential workaround would be to move the dwg away from all referenced images, such as by placing the dwg in a separate parent folder, and then try to read it again. By moving the dwg drawing into a different folder, this will break the relative paths. So any external image referenced with a relative path will fail to read, and any absolute path will read successfully, outputting valid features. From there I expect you would be able to use a StringReplacer or other string transformer to fix the paths. Hope that helps!
Badge +2

Hi @gns388,

I checked in with our cad experts and I can confirm that image external references reading in as rasters is expected behaviour. In other words, while the image is an external reference, it will be read in as a raster entity, not an xref entity.

 

The path information is stored on the feature as 'autocad_raster_filename'. Unfortunately this will always be the full path if the raster was read successfully.

 

A potential workaround would be to move the dwg away from all referenced images, such as by placing the dwg in a separate parent folder, and then try to read it again. By moving the dwg drawing into a different folder, this will break the relative paths. So any external image referenced with a relative path will fail to read, and any absolute path will read successfully, outputting valid features. From there I expect you would be able to use a StringReplacer or other string transformer to fix the paths. Hope that helps!

Too Old question :)

I think, I have posted based on FME 2014.

Thank you for the response

Reply