CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 2858 

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    7739x  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 10222:How to add keyboard pan (shift view) to AutoCAD?
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?


Back   All CAD Tips All CAD tips&tricks

How to create AutoCAD geometry from Excel? « | » How to detect all DWG files containing Xrefs?

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:
Link your AutoCAD texts with Excel tables/sheets. Export. Change. Import.
Try DwgText 2015 More info


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