﻿ ZWCAD Tip: X and Y Ordinate Dimension in a Single Step - Suggerimenti & Trucchi - ZWSOFT - Costi benefici CAD/CAM per AEC e MCAD

# ALL Prodotti Servizio&Supporto Testimonianze Centro di stampa function all_ni_ma(){ document.getElementById('ma_de_bi').value='search'; document.getElementById('cao_ni_ma').value='init'; document.getElementById('ma_bi').name=''; document.getElementById('siteid').name='siteid'; } function madebi(){ document.getElementById('ma_de_bi').value='content'; document.getElementById('cao_ni_ma').value='lists'; document.getElementById('ma_bi').name='catid'; document.getElementById('siteid').name=''; }   Italiano Deutsch English Español Italiano Português Русский 日本語 简体中文   Compra ora! Facebook Twitter Linkedin Youtube Google+

ZWCAD Tip: X and Y Ordinate Dimension in a Single Step

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: "))
(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 "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 "")
(command "text" (list (+ x 2) (- y 5.5)) zg "" yzb)
(princ)
)

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.

Print PDF
﻿
© 2017 ZWCAD Software Co., Ltd. All rights reserved. | A proposito di ZWSOFT | Privacy Policy | Terms and Conditions | Contattaci | Site Map
All trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners.