CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 7512

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 - www.cadstudio.cz
(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)))
 )
(princ) 
) 
ACAD
100% *  CAD 
27.3.2009    13624×  
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   



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


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