Pictures in DXF Export

Pictures in DXF Export

Anonymous
Not applicable
675 Views
7 Replies
Message 1 of 8

Pictures in DXF Export

Anonymous
Not applicable

Morning yall,

 

I have an iLogic rule that asks if I want to export a DXF (yes/no) every time I save an Inventor DWG. In some of our drawings we have pictures and those don't get included in the DXF export. Can DXFs handle pictures? How can I have it include the picture as well? Any other options? Thanks!

0 Likes
676 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
As an addendum to this, since I'm pretty sure DXF is a plain text file and can't hold any "fancy" information such as a picture, is there any way to test whether or not a drawing sheet contains an image or not? I could have it check if an image is in the drawing, and if so, export as DXF AND export as PDF. That would solve my problems. Thanks.
0 Likes
Message 3 of 8

alewer
Advocate
Advocate

Try this:

 

Public Sub CheckForOLE()
  'Get the drawing doc
  Dim oDrawingDoc As Inventor.DrawingDocument
  Set oDrawingDoc = ThisApplication.ActiveDocument
  'Check for Referenced OLE File
  If oDrawingDoc.ReferencedOLEFileDescriptors.Count <> 0 Then
    'Your code for .pdf export
  End If
End Sub

 Let me know if this works.

0 Likes
Message 4 of 8

alewer
Advocate
Advocate

Sorry, I gave a VBA sample instead of iLogic. Try the following instead:

 

If ThisApplication.ActiveDocument.ReferencedOLEFileDescriptors.Count <> 0 Then
    'your code for .pdf export
End If

 

Good luck!

0 Likes
Message 5 of 8

Anonymous
Not applicable

Thanks for the code, sir. It seems that it still exports a PDF regardless. I suspect this may be due to the fact that our company logo in the title block is an image. Any way of getting around that?

0 Likes
Message 6 of 8

Anonymous
Not applicable
Regarding the above, I changed the ilogic from <> 0 to > 1 (to account for the image in the title block) but it still seems to export a PDF regardless.
0 Likes
Message 7 of 8

Anonymous
Not applicable

The weird thing is, in the template itself, ThisApplication.ActiveDocument.ReferencedOLEFileDescriptors.Count returns 2. When I create a new drawing and do NOTHING to it, it returns 1.

0 Likes
Message 8 of 8

alewer
Advocate
Advocate

I don't see this behavior: With an image embedded in a title block, I get a count of 1 whether I've opened the template or created a new drawing with it. Can you post your template? What version/service pack are you using?

 

If you prefer, you can PM me your email address and we can discuss this without your needing to publicly post your template.

0 Likes