Need help with odd plotting problem

dhaverstick
Advocate
Advocate

Need help with odd plotting problem

dhaverstick
Advocate
Advocate

I have created an addin to batch create pdf files from AutoCAD Plant3D isometric drawings. The addin will create a pdf file of the entire drawing using the plot type of PlotType.Extents and then it will create a pdf of a part of the drawing using the plot type of PlotType.Window. The addin works without any issues. However, occasionally a blank pdf file is created when using the plot type, PlotType.Window. When I investigated what was going on, I have determined that something is wrong internally with the drawing file but I have no idea how fix the file or program around the anomaly.

 

I have attached a copy of a drawing with this behavior as well as two pdf files, PDF File Created Using Extents.pdf and PDF File Created Using Window.pdf, to illustrate what I am seeing. One pdf file was created using PlotType.Extents. The other was created using PlotType.Window but the window corners specified are DocumentDatabase.Extmin and DocumentDatabase.Extmax. Both were created using the plot scale, StdScaleType.ScaleToFit. The pdf files should be identical but they are not. The pdf file created using PlotType.Window only contains a portion of the drawing. The drawing being printed is an ANSI C size drawing which is 22"x17". The coordinates returned by DocumentDatabase.Extmin are pretty close to 0,0 and the coordinates returned by DocumentDatabase.Extmax are pretty close to 22,17.

 

Does anyone have any idea what trick I can pull to make this behavior go away?

 

Thanks,

 

Darren Haverstick

Paul Mueller Company

 

 

 

 

0 Likes
Reply
364 Views
2 Replies
Replies (2)

Gepaha
Collaborator
Collaborator

I have a plug-in that does something similar and everything seems to work correctly.

Are you sure you have set SetPlotWindowArea correctly?

Without seeing the code it is difficult to say what is going on. Post the relevant code, especially where PlotSettingsValidator is set up so that someone can help.

0 Likes

dhaverstick
Advocate
Advocate

My code works perfectly on 99% of the drawings. On just a few do I get this behavior. I know it is something specific to the drawing in question because I can copy the drawing's geometry and tables and paste them into a different drawing and the newly modified drawing will work with my code just fine.

 

Darren

Paul Mueller Company

0 Likes