Get & Set the Plot Settings

Get & Set the Plot Settings

200211047
Participant Participant
1,572 Views
3 Replies
Message 1 of 4

Get & Set the Plot Settings

200211047
Participant
Participant

Hello, nice people!!

 

I am the very new guy at AutoCAD api, who used to use Revit api before.

At this time, I wanna get and change some values from the Plot Settings, such as Drawing orientation or Plot style table or Plot Style Table Editor.

 

It seems there are some information from PlotConfigManager class of ObjectARX: Managed .NET Reference Guide(https://help.autodesk.com/view/OARX/2020/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_PlottingSer...), however, it confuses me little bit. 

 

Do you have any idea where I could learn with a sample code or at least get more information of this(Get and Set Plot Setting)? I am learning the AutoCAD API structure for now, however, i need to know Plot Style Table Editor and Drawing Orientation(PlotSettingValidator.SetPlotRotation(x, PlotRotation.Degrees090) doesn't work ), especially now!XD

 

image.png

 

0 Likes
Accepted solutions (1)
1,573 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor
Accepted solution

AFAIK. there is no .NET API exposed to edit plot style *ctb file (nor API for *.pc3). You can only use existing *ctb file (that is, you may have to manually create/edit the plot style to your purpose, then use it in your .NET plotting code.

 

However, PlotSettingValidator.SetPlotRotation() should work. Rotating media (paper) 90 or 270 degree would result in either "Portait", or "Landscape", DEPENDING on how the paper size is defined. When defined as portrait, 90/270 rotation makes it landscape, while defined as landscape, 90/270 rotating makes it portrait. You need to know the size, then decide how you want to rotate.

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4

200211047
Participant
Participant

Thanks a lot, mate! that information is useful, at least i tested in different way.

 

One more question!! i am coding to set up the Plot part using Get & Set, can you let me know the link where I can set up the each option? Like Plot scale, Plot options such on? Do you think can I get and set via "PlotSettingsValidator"?

0 Likes
Message 4 of 4

KurtzDavid
Enthusiast
Enthusiast
Thanks again !!!
0 Likes