CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 2947

CAD tip CAD tip # 6601:

Question CAD 
 %  platform  category 
Q - question

How to get World coordinates from the ID command?

A - answer The ID command returns coordinates in the current UCS. If you want to get XYZ coordinates of the picked point always in the global, world UCS (WCS) - regardles of the active user coordinate system - you can use the following simple LISP macro.

Just save it to WID.LSP, load it with Appload and start the WID command (similar to ID):

;World ID
;3/2009 -
(defun C:WID ( / pt) 
(setq pt (getpoint "\nPick a point to ID in World UCS: ")) 
(if pt
 (prompt (strcat "\nWorld  X = " (rtos (car (trans pt 1 0)) 2)
                      "    Y = " (rtos (cadr (trans pt 1 0)) 2)
                      "    Z = " (rtos (caddr (trans pt 1 0)) 2)))
100% *  CAD 
27.3.2009    9841×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 7258:Export of point- and curve coordinates to Excel.
Tip 6977:How to scale all texts in a drawing while keeping their position?
Tip 6860:The many shapes of AutoCAD UCS icons.
Tip 6572:My cursor crosshair displays rotated. Why?
Tip 5081:Ctrl+V pastes rotated text.

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
CAD Studio is not responsible for possible problems that may occur as a result of using any of these tips.