andybone Posted April 15, 2009 Share Posted April 15, 2009 Hello all, I have some code that gets a bounding box for an object, and draws a plot window with the coordinates to plot to a PNG file. I know the code is working correctly, because it is fine 90% of the time. However, on the other 10% it gets the coordinates (which I can confirm are correct), but draws the plot window off to the top right. As I say, the code is working correctly. I think it is a problem with the drawing it’s self. If I copy all the data into a new drawing, the plot window is then correct. I have done everything I can think of to fix it, Purge, Audit etc, but I cannot get it to work. Does anyone have any idea what would cause this problem and how to fix it? Thank you in advance for you help. Quote Link to comment Share on other sites More sharing options...
JohnM Posted April 15, 2009 Share Posted April 15, 2009 When you paste it into another drawing are you pasting it to the same coordinates? AutoCAD does have some issues with some command functions when the object is way out there. Move the object(s) closer to 0,0 and see if the error still happens. Run the audit command on you drawing. Your template could be corrupt. Quote Link to comment Share on other sites More sharing options...
andybone Posted April 16, 2009 Author Share Posted April 16, 2009 The problem was, the UCS needed to be translated from local to world for the plot window coordinates. PT1 = ThisDrawing.Utility.TranslateCoordinates(PT1, acWorld, acDisplayDCS, False) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.