Q: Ordinate dimensions are essential elements of geographic drawings. Ordinate dimensions enable you to indicate positional information of objects and geometry. For my work, I almost always need to place x and y ordinates at the same time. Is this possible?
A: Fortunately, ZWCAD makes it possible to create new commands through the use of the LISP application interface. With the help of the following LISP routine, it is possible to place x and y ordinate dimensions in a single step.
(User-defined variable names are boldfaced.)
(defun c:OXY()
(setq pt (getpoint “Input point:n”))
(setq zg 5) ;text height is 5
(setq x (car pt))
(setq y (cadr pt))
(setq xzb (strcat “X=”(rtos x 2 2)))
(setq yzb (strcat “Y=”(rtos y 2 2)))
(setq num (strlen xzb))
(command “text” (list (+ x 2) (+ y 2)) zg “” xzb “”)
(command “pline” (list (+ x 2) y) (list (+ x 2 (* (* zg 0.85) num)) y) “”)
(command “text” (list (+ x 2) (- y 5.5)) zg “” yzb “”)
)
To use this code, follow these steps:
1. Copy and paste the above code to a Notepad file.
2. Save the file as OXY.LSP. (Be sure to modify the txt extension to lsp.)
3. Load the LISP program into ZWCAD using the AppLoad command.
4. Enter OXY to execute the function, like this:
Command: oxy
5. At the prompt, pick a point in the drawing.
Input point: (Pick a point.)
This routine uses a fixed text height of 5 units. If this height is too tall or too short, modify the number in the code, and then reload the routine into ZWCAD:
(setq zg 5); Change text height from 5
I hope that many AEC designers find this function useful, especially in the surveying and mapping Industry.
About ZWCAD
As the flagship product of ZWCAD Software Co., Ltd., ZWCAD is a powerful CAD solution, which is highly compatible with DWG format. ZWCAD meets the needs of broad-based target groups of 2D/3D design industry, including architecture, engineering, construction, mechanics, manufacturing and electronics. So far it has become the leading brand in China’s CAD industry and now it is competing successfully in over 75 other countries, with more than 150,000 users throughout the world.
For more information, please visit www.zwcad.org or contact ZWCAD team at [email protected].
(C) Copyright 2009 ZWCAD Software Co., Ltd. All rights reserved.
No Comments Found