AutoCAD LT General

Active Member
Posts: 8
Registered: ‎03-28-2012
Message 1 of 4 (444 Views)

Command Line -plot scale error or problem.

444 Views, 3 Replies
02-08-2013 02:48 PM



I could really use some help here as I cannot quite understand why AutoCAD 2011 LT is behaving this way. This post applies to plotting using the command line for batch plotting purposes.


So I have written a program that outputs an AutoCAD script that prints numerous drawings quickly. The script file obviously uses the AutoCAD’s command line as its input interface. Where I have run into problems is actually printing the file to the correct scale.


Anyone that is familiar with the command line interface in AutoCAD knows that most of the time when a command is issued and the user is prompted for input, AutoCAD also presents a <default option> at the end of the prompt that can be selected by using a hard return or simply giving no input. This default option is what I rely on for my batch processing as each drawing has slightly different plotting options such as paper size and scale. I have had much trouble with the following prompt;


Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1=1>:


This prompt can be found by using the following 4 line script;


-plot Y Model

Adobe PDF


Inches Landscape N E


The error or problem that I am experiencing is that when the default <1=1> scale is used it does not actually plot at this scale. However if the default is <1=1> and 1=1 is provided as user input the correct scale plots. 


In the following example the prompt will be left blank or responded to as shown and the resulting plot.log entry is presented.


(Prompt and response) Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1=1>:

(Plot.log entry)  P:\......\Componant_Xsection.dwg,Model,2/8/2013 3:30:43 PM,Adobe PDF,Letter,1:0.934093,


(Prompt and response) Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1=1>:1=1

(Plot.log entry)  P:\......\Componant_Xsection.dwg,Model,2/8/2013 3:29:47 PM,Adobe PDF,Letter,1:1,


As you can see by using the default the actual scale printed is incorrect at a 1:0.934093, but if you manually enter the scale 1=1 then it is plotted at the correct 1:1 scale


Please if anyone could help me that would be much appreciated. 



*Expert Elite*
Posts: 21,596
Registered: ‎11-06-2003
Message 2 of 4 (441 Views)

Re: Command Line -plot scale error or problem.

02-08-2013 03:07 PM in reply to: mcconley

IMHO as a long time code writer, if you want 1:1 you should always code it to be 1:1, and never "default".

How do you know the default is truly 1-1 and not 1=0.934093? Rounding display errors are very common in AutoCAD.

Is 0.93493 always the problem, or is this only observed in one file?


Perhaps two choices for a user, one to put in what they need, and one that defaults to 1:1 automatically (no user options): a better approach. Remember, if your going to ask your user to make more than one entry/selection it's best to simply call the PLOT command pop-up for them to use.


Worth a test though: when your -PLOT is complete, save the changes to the pagesetup but cancel going through the plot process. Then call the PLOT command pop-up: anything different or wrong that needs to be fixed?

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Active Member
Posts: 8
Registered: ‎03-28-2012
Message 3 of 4 (434 Views)

Re: Command Line -plot scale error or problem.

02-08-2013 03:41 PM in reply to: pendean

Thank you for your response pendean,


It has been helpful in further determining the root cause of the inaccurate scales being printed. I believe that instead of the default shown in the prompt <1=1>, the actual default in the AutoCAD code reads <Fit>. Someone has probably just miscoded a switch in the program. 


I tried the test / comment in the last paragraph of your reply and indeed after saving the settings after the -plot command the GUI prompts shows the Fit to paper option checked under Plot Scale.


The reason I know that the plot setting is 1:1 or whatever the drawing is set to be is when using the PLOT GUI pop up dialog box the correct default scales are presented for the drawings. Simply using all the defaults for the GUI box plots the drawing at the correct scale.


The reason that I simply do not just specify the scale is because the purpose of this exercise is automation. If one has to evaluate and input a scale for hundreds of drawings instead of the program using the scale that has been previously defined by the drafter, it kind of defeats the point of batch plotting.


This one looks like it is chalked up to a bug in AutoCADs code.

*Expert Elite*
Posts: 21,596
Registered: ‎11-06-2003
Message 4 of 4 (414 Views)

Re: Command Line -plot scale error or problem.

02-11-2013 04:57 AM in reply to: mcconley

<fit> is not <1:1>: it would appear your users would benefit from having more than one macro to use. Automation only works if it's what your users want, not what you can only program.


You might benefit from incorporating predefined pagesetups from your templates using -PSETUPIN command for your users: but again, think of their needs and wants (and their behaviors) when automating.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community