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
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.
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?
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.
<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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register