Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pictures in DXF Export

7 REPLIES 7
Reply
Message 1 of 8
drguitarum2005
472 Views, 7 Replies

Pictures in DXF Export

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!

7 REPLIES 7
Message 2 of 8

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.
Message 3 of 8
alewer
in reply to: drguitarum2005

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.

Message 4 of 8
alewer
in reply to: alewer

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!

Message 5 of 8
drguitarum2005
in reply to: alewer

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?

Message 6 of 8

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.
Message 7 of 8

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.

Message 8 of 8
alewer
in reply to: drguitarum2005

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report