UCS, how to find existing saved names?

W. Kirk Crawford

Usenet Archive
Joined
Apr 21, 2000
Messages
81
Reaction score
0
I discovered that I needed to change the UCS.

So; (command "UCS" "s" "TEMP")
(command "UCS" "n" "v")
(do something)
(command "UCS" "r" "TEMP") now that works.

But if I have to I have to rerun the routine again, UCS "TEMP" already exists. Replace it? <N>

Where to find the list of names of saved UCSs?

W. Kirk Crawford
Rochester Hills, Michigan
 
I think (tblsearch "UCS" <name>) would tell you if <name>exists.

For a complete list of saved UCS names, you could use the old way... (defun UCSNames ( / UCS Names) (while (setq UCS (tblnext "UCS" (not Names))) (setq Names (cons (cdr (assoc 2 UCS)) Names)) ) (reverse Names)
)

Or, you could use the ActiveX style...
(defun UCSNames ( / Names)
(vlax-for UCS
(vla-get-usercoordinatesystems
(vla-get-activedocument
(vlax-get-acad-object)
)
)
(setq Names
(cons (vla-get-name UCS) Names)
)
)
(reverse Names)
)

Wow. The older way does look easier, but give it up.
 
Where to find the list of names of saved UCSs?

One way....

(setq ucslst ')
(vlax-for x
(vlax-get (vlax-get (vlax-get-acad-object) "ActiveDocument") "UserCoordinateSystems" ) (setq ucslst (cons (vlax-get x "Name") ucslst))
)
 
Kirk,
Why even worry about it? If all you want to do is go
back to a previous coordinate system then use the
previous option of the ucs command. Don't save
them before setting up a new one.
 

Latest threads

Back
Top