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!
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.
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!
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?
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.
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.