Skip to main content
1-Visitor
October 25, 2024
Question

Export Creo drawing to PDF using VBA

  • October 25, 2024
  • 2 replies
  • 1302 views

We want to export multiple Creo drawings to PDFs that are in a windows folder. I am considering to export using Excel based VBA macro. I combined the sample macro provided as a part of installation, Async_Mode_Example.xls & the VBA code provided at https://www.ptc.com/en/support/article/CS141963. When I run the macro it fails at model.Export line. The error thrown is pfcExceptions::XToolkitNotDisplayed. I am stuck and not able to proceed. Please help. Let me know if additional information is required. I tried with Creo7 & Creo9 but still I see the same error.

 

2 replies

24-Ruby III
October 25, 2024

Hi,

just FYI there are another methods how to do described action. For example:

  • using Distributed batch
  • playing trail file

 

17-Peridot
October 28, 2024

IpfcXToolkitNotDisplayed - Model not displayed in any window.

 

I think, the drawing was loaded in to session, but your code not display it in current window.

1-Visitor
October 30, 2024

Yes, adding call IpfcModel.Display() before call IpfcModel.Export() worked. Got this info from a ticket I raised.