I want to get the Properties of each printer type in Revit .

I want to get the Properties of each printer type in Revit .

DinhMinhDuc
Contributor Contributor
1,051 Views
4 Replies
Message 1 of 5

I want to get the Properties of each printer type in Revit .

DinhMinhDuc
Contributor
Contributor

I want to get the Properties of each printer type in Revit .
I got the printer types and properties of each printer type in Windows (Link: https://www.codeproject.com/Articles/14379/How-to-Show-a-Popup-Window-for-Printer -Properties)
I haven't been able to figure out how to link between the windows printer object and the Revit printer object (when setting the printer properties in windows, the revit printer doesn't recognize it).
Is there an API that supports setting the Properties property of each printer directly in Revit or setting it indirectly through the printer properties of windows? Thank you so much !properties.png

0 Likes
Accepted solutions (2)
1,052 Views
4 Replies
Replies (4)
Message 2 of 5

bxw
Enthusiast
Enthusiast

Have a look at the PrintManager Class.  It should let you get/set printing properties for the current document.  

https://www.revitapidocs.com/2019/81f215a5-8124-ebfc-c637-463f46f80937.htm

Message 3 of 5

RPTHOMAS108
Mentor
Mentor
Accepted solution

Last time I did this task it was 50% Revit API and 50% Windows API.

 

You can get/set the name of the paper sizes and destination trays etc. with PrintManager for the current device set in Revit but to get the names of all available printers and properties of those without switching device in Revit PrintManager then you need to use Windows API via p/invoke.

 

As a starting point there wasn't a way of getting the printer names available via Revit API alone, you would have to use Windows API or external .net features for that. That code project is not 100% relevant because what happens when you close the dialogue? There is no result you can then use.

Message 4 of 5

DinhMinhDuc
Contributor
Contributor
Accepted solution

  

0 Likes
Message 5 of 5

DinhMinhDuc
Contributor
Contributor
I would like to have more Preview functionality. Is there any API support? Help me . Thank you so much
0 Likes