Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Get the name of current UCS

Status
Not open for further replies.

NirVidP

Industrial
May 10, 2010
45
0
0
IN
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 found that this is because the drawing has an unsaved UCS "*No Name*" as its current UCS.

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, if the current UCS is "World" or un unsaved UCS, the value of UCSNAME is "". Also in both cases ThisDrawing.CurrentUCS returns a null object. ThisDrawing.UserCoordinateSystems.Count is also 0.

 
 https://files.engineering.com/getfile.aspx?folder=a2d03a94-2c66-4e60-886e-dc0d8e86ed5e&file=UCSname_problem.dwg
Replies continue below

Recommended for you

In an AutoLisp program, I looked at other system variables:
UCSORG, UCSXDIR, UCSYDIR
And compared these to what they should be if current UCS was "World".
 
Status
Not open for further replies.
Back
Top