Message 1 of 6
Not applicable
05-21-2016
01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, Everyone! I am trying to batch plot blocks by using c#.
The problem is in some dwg files the plot window area got an offset, but in some files the program runs quite well. The offset looks like this:
Here is part of the code:
// get extents of the block
Point2d ptMin = block.GeometricExtents.MinPoint.Convert2d(new Plane()); Point2d ptMax = block.GeometricExtents.MaxPoint.Convert2d(new Plane()); Extents2d window = new Extents2d(ptMin, ptMax); // set plot window psv.SetPlotWindowArea(ps, window); psv.SetPlotType(ps, Autodesk.AutoCAD.DatabaseServices.PlotType.Window); psv.SetPlotCentered(ps, true); psv.SetStdScaleType(ps, StdScaleType.ScaleToFit);
In debugging, I can see the value of ptMin and ptMax is right, and the value in PlotInfo is also right, so I am really confused about it. By the way, I have change the UCS to WCS too.
Thanks for reply!
Solved! Go to Solution.

