Jump to content

Plot window error


andybone

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...