NirantarVidyarthee Posted July 6, 2021 Posted July 6, 2021 I have received the attached drawing from one of my clients. (I have removed geometry to maintain confidentiality. But it retains the essence of problem that I have). I have to write VB/A program that extracts data from this drawing. For that I need to know the extents of the drawing. The system variable ExtMin shows a value of X (98331) which is greater than the X (92817) of min. point (left bottom corner of the border) of existing geometry. I have tried everything (purge, overkill, audit, recover) but can't find a way to correct the value of ExtMin. Assuming that this drawing is corrupt and can't be recovered, then I have another problem. How can I programatically find that the ExtMin value of this drawing is wrong and hence this drawing is corrupt. ExtMin Problem.dwg Quote
NirantarVidyarthee Posted July 6, 2021 Author Posted July 6, 2021 (edited) OK. On digging deeper I found that the current UCS of the drawing was "*NO NAME*". When I manually changed if to "World" then ExtMin value was correct. Now my problem is how to find out, in VBA, that the drawing is using an unsaved UCS as the current UCS. Because in both cases the value of UCSNAME is "". Also in both cases ThisDrawing.CurrentUCS returns a null object. ThisDrawing.UserCoordinateSystems.Count is also 0. Edited July 6, 2021 by NirantarVidyarthee Quote
danellis Posted July 6, 2021 Posted July 6, 2021 Could you put a couple of lines at the start of the routine to save the UCS as something temporary and set the UCS to World. You'd then be able to put a similar line at the end of the routine restoring the temporary UCS. That would save you having to worry what the UCS actually was (I'm kinda impressed you manage to open the drawing without setting the UCS to world lol) dJE Quote
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.