Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Can the MathCAD Prime API print (or export to PDF) via the API?
Hi,
From the help pages it appears you can print.
>>>>>>>>>>>>>
About PTC Mathcad Prime and Automation API Integration
The PTC Mathcad Prime Application Programming Interface (API) is an automation interface that provides a mechanism for communicating with PTC Mathcad Prime from within another Windows application, including a custom stand-alone application that users write.
You can use the API with PTC Mathcad Prime 3.1 or higher.
User Guide
The user guide describes the hierarchy of automation classes, their properties, methods, and events. These classes allow you to:
Open or close PTC Mathcad Prime
Control the appearance of windows
Open, recalculate, save, or print worksheets
>>>>>>>>>>>>>>>>.
I do not know if the API prints to the default printer or if you can select the printer.
You may have to set a pdf printer like "PDFCreator" as windows default printer.
The entire API doesn't have a "print" class, method, or event.
I assume the user guide is only available a part of the $9,000 SDK? What a joke.
@ERLTUSer wrote:
The entire API doesn't have a "print" class, method, or event.
I also read from PTC announcement that the automation classes would allow us to "Open, recalculate, save, or print worksheets ". Maybe thats not true??
In this thread
https://community.ptc.com/t5/PTC-Mathcad-Questions/Save-Mathcad-Prime-Worksheet-as-pdf/td-p/177090
Luke Westbrook from PTC confirmed, that " the Mathcad Prime API currently does not support a method to save as or print to PDF."
This is no surprise and does not necessarily mean that printing to a standard printer is not possible via the API.
I assume the user guide is only available a part of the $9,000 SDK? What a joke.
According to this thread
https://community.ptc.com/t5/PTC-Mathcad-Questions/NEW-API-for-Mathcad-Prime-3-1/td-p/12388
the answer is "yes". Ridiculous, indeed!
For anyone looking for an answer: https://community.ptc.com/t5/PTC-Mathcad/Save-Mathcad-Prime-Worksheet-as-pdf/m-p/671721/highlight/true#M190620