VB | Custom Paper Size

VB | Custom Paper Size

snappyjazz
Collaborator Collaborator
700 Views
2 Replies
Message 1 of 3

VB | Custom Paper Size

snappyjazz
Collaborator
Collaborator

In Inventor I was able to pass a custom paper size to the "DrawingPrintManager" (See top screenshot below). I am trying to setup the same print command in AutoCAD, but clearly the format is different. I admit I am new to programming in AutoCAD. I get the feeling that the custom sheet size is set in the plotter driver, which is outside the realm of the AutoCAD API. However I ran Kean Walmsley's mplot which spits out a list of the media sheets/device. It shows that a "Custom Size" exists for this device. I'm not sure if that's a glimmer of hope or if I should be put out of my misery. 

 

snappyjazz_0-1676060805223.png

 

snappyjazz_2-1676061384874.png

 

0 Likes
Accepted solutions (1)
701 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor
Accepted solution

AutoCAD can only print on available paper sizes, defined by the plotting devices, either a real printer, or a devices represented by *.pc3. 

 

So, if you want a custom paper size that is not available form existing printing devices, you would need to define one, either updating an existing *.pc3 file (such as "DWG To PDF.pc3"), or create your own custom *.pc3 file.

 

Unfortunately, there is no API exposed to do it. You would need to do it manually by running "Add-A-Plotter Wizard".

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3

harikowshik_molugu
Community Visitor
Community Visitor

Hi,

I need to programmatically convert a DWG file to a JPG file using the AutoCAD .NET API. Is it possible to create custom paper sizes for the selected .pc3 file through the API, similar to how we do manually by clicking the Properties button in AutoCAD after going with the PLOT command?

Any guidance or examples would be greatly appreciated.


In my research, I have got some examples like

PlotInfoValidator validator = new PlotInfoValidator();
validator.MediaMatchingPolicy = Autodesk.AutoCAD.PlottingServices.MatchingPolicy.MatchEnabledCustom;
int itIs = validator.IsCustomPossible(plotInfo);


0 Likes