ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ZWCAD Tip: X and Y Ordinate Dimension in a Single Step</title> <meta name="description" content="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 object......" /> <meta name="keywords" content="ZWCAD Tip: X and Y Ordinate Dimension in a Single Step" /> <link href="/css/support.css" rel="stylesheet" type="text/css" /> <link href="/css/art.css" rel="stylesheet" type="text/css" /> <script language="javascript" src="/inc/Print.js"></script> <script language="javascript" src="/Menu/one.js"></script> <script language="javascript" src="/Menu/two.js"></script> <link href="/Menu/menu.css" rel="stylesheet" type="text/css" /> </head> <body onLoad="init()"> <!--Head--> <div id="Top"><div class="topLine">&nbsp;</div> <div id="topBack"> <div class="topImg"> <a href="/index.html"><img src="/images/ZWCAD-LOGO-02.gif" alt="" border="0" /></a> <img src="/images/index_14.gif" style="margin-bottom:0px;" alt="" width="276" height="23" hspace="10" /> </div> <div id="topRight"> <div class="topRight_1"> <a href="http://www.zwcad.com/" target="_blank">-N‡e</a> | <a href="http://www.zwcad.jp/" target="_blank">åe,gžŠ</a> <a href="SiteMap.asp"><img src="/images/index_10.gif" align="absmiddle" border="0" /></a> </div> <form method="get" action="http://www.google.com/search" target="google_window"> <div class="topRight_2"> <ul> <li class="seaLeft_1"><img src="/images/index_15.gif" width="20" /></li> <li class="seaText"><input type="text" id="keyword" name="q" class="keyword"/> <input name="as_sitesearch" type="hidden" value="zwcad.org"> <input type="hidden" name="forid" value="1"> <input type="hidden" name="ie" value="UTF-8"> <input type="hidden" name="oe" value="UTF-8"> <input type="hidden" name="safe" value="off"> <input type="hidden" name="flav" value="0000"> <input type="hidden" name="hl" value="en"> </li> <li class="seaSubmit"><input type="image" src="/images/index_20.gif" align="bottom" value="Search" name="sa"/></li> </ul> </div> </form> </div> </div> <div id="topMenu"> <ul> <li class="menuLine">&nbsp;</li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li class="menu1"><a href="/index.html">HOME</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu1" class="menu2"><a href="/cad-software.html">CAD PRODUCTS</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu2" class="menu3"><a href="/cad-software-download.html">DOWNLOAD</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu3" class="menu4"><a href="/cad-purchase.html">PURCHASE</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu4" class="menu5"><a href="/cad-software-support.html">SERVICE &amp; SUPPORT</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu5" class="menu6"><a href="/partner.asp">PARTNER</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li id="menu6" class="menu7"><a href="/cad-customer-success.html" class="TopMenu">CUSTOMER SUCCESS</a></li> <li><img src="/images/bg2.gif" width="2" height="31" align="absmiddle" /></li> <li class="menuLine"></li> </ul> <div style="clear:both"><script language="javascript" src="/Menu/menu.js"></script></div> </div> </div> <!--End Head--> <!--Adv--> <div align="center" style="margin-top:2px;"> <a href="http://www.zwcad.org/DownFile.asp?DownType=1&ID=21"><img src="http://www.zwcad.org/images/ZWCAD2010.jpg" /> </div> <!--End Adv--> <!--Main--> <div id="Main"> <!--Left--> <div id="mainLeft"> <!--Position--> <div id="Position"> <div class="posiText"><a href="/index.html">Home</a> &gt; <a href="/cad-software-support.html">Service & Support</a> &gt; <a href="/cad-software-support/cad-tips&tricks.html">Technical Tips</a> &gt; ZWCAD Tip: X and Y Ordinate Dimension in a Single Step</div> <div class="posiLine">&nbsp;</div> </div> <!--End Position--> <!--List_1--> <div id="listCont"> <ul style="height:28px;"> <li class="Title_1"></li> <li class="Title_2" style="width:609px;"> <div><b>" ZWCAD Tip: X and Y Ordinate Dimension in a Single Step</b> </div> </li> <li class="Title_2" style="width:80px"><b style='color:#333333;'>May</b> 21, 2009</li> <li class="Title_3"></li> </ul> <div id="artText"> <div class="artCont"> <P align=justify><B>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?&nbsp; </B></P> <P align=justify><B>A:</B> 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. </P> <P align=justify>(User-defined variable names are boldfaced.)</P> <P>(defun c:<B>OXY</B>()<BR>(setq <B>pt</B> (getpoint "Input point:\n"))<BR>(setq <B>zg</B> 5); text height is 5)<BR>(setq <B>x</B> (car <B>pt</B>))<BR>(setq <B>y</B> (cadr <B>pt</B>))<BR>(setq <B>xzb</B> (strcat "X="(rtos <B>x</B> 2 2)))<BR>(setq <B>yzb</B> (strcat "Y="(rtos <B>y</B> 2 2)))<BR>(setq <B>num</B> (strlen <B>xzb</B>))<BR>(command "text" (list (+ <B>x</B> 2) (+ <B>y</B> 2)) <B>zg</B> "" <B>xzb</B> "")<BR>(command "pline" (list (+ <B>x</B> 2) <B>y</B>) (list (+ <B>x</B> 2 (* (* <B>zg</B> 0.85) <B>num</B>)) <B>y</B>) "")<BR>(command "text" (list (+ <B>x</B> 2) (- <B>y</B> 5.5)) <B>zg</B> "" <B>yzb</B> "")<BR>)</P> <P align=justify>To use this code, follow these steps:</P> <P align=justify>&nbsp;&nbsp; 1.&nbsp;Copy and paste the above code to a Notepad file.</P> <P align=justify>&nbsp;&nbsp; 2.&nbsp;Save the file as OXY.LSP. (Be sure to modify the <B>txt</B> extension to <B>lsp</B>.)</P> <P align=justify>&nbsp;&nbsp; 3.&nbsp;Load the LISP program into ZWCAD using the <B>AppLoad</B> command.</P> <P align=justify>&nbsp;&nbsp; 4.&nbsp;Enter <B>OXY</B> to execute the function, like this:</P> <P align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command: <B>oxy</B></P> <P align=justify><STRONG>&nbsp;&nbsp;&nbsp;</STRONG>5.&nbsp;At the prompt, pick a point in the drawing. </P> <P align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Input point: <I>(Pick&nbsp; a point.)</I></P> <P align=justify>This routine uses a fixed text height of 5 units. If this height is too tall or too short, modify the number in the&nbsp; code, and then reload the routine into ZWCAD:</P> <P align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq zg <B>5</B>); Change text height from 5</P> <P align=justify>I hope that many AEC designers find this function useful, especially in the surveying and mapping Industry.</P> </div> <div style='line-height:30px;margin-top:10px;background:#F8F8F8;border:solid 1px #CCCCCC;'> <div style='text-align:left;padding-left:10px;'> Last: <a href='/cad-software-support/cad-tips&tricks/2009521103307 AM9489.html' title='ZWCAD Tip: Bisecting Angles Easily'>ZWCAD Tip: Bisecting Angles Easily</a> </div></DIV> <div style='line-height:30px;margin-top:10px;background:#F8F8F8;border:solid 1px #CCCCCC;'> <div style='text-align:left;padding-left:10px;'> Next: <a href='/cad-software-support/cad-tips&tricks/200961222154 PM1642.html' title='How can I run ZWCAD normally on Windows Vista?'>How can I run ZWCAD normally on Windows Vista?</a> </div></div> </div> <ul style="height:10px"> <li class="Bottom_1">&nbsp;</li> <li class="Bottom_2" style="width:689px;">&nbsp;</li> <li class="Bottom_3">&nbsp;</li> </ul> </div> <!--End List_1--> </div> <!--End Left--> <!--Right--> <div id="mainRight"> <!--Column--> <div id="rightComm"> <div class="rightTitle"> <div id="LinkTitle"><a href="/cad-software-support.html"><strong>SERVICE & SUPPORT</strong></a></div> </div> <div class="rightList_1"> <a href="/cad-software-support/cad-demo.html">ZWCAD Demo</a> </div> <div class="rightList_1"> <a href="/cad-software-support/cad-documentation.html">Documentation</a> </div> <div class="rightList_1"> <a href="/cad-software-support/license-registration.html">License and Registration</a> </div> <div class="rightList_1"> <a href="/cad-software-support/cad-tips&tricks.html">Technical Tips</a> </div> <div class="rightList_1"> <a href="http://www.zwcad.org/forum/">ZWCAD Forum</a> </div> <div class="rightList_1"> <a href="/cad-software-support/cad-faqs.html">FAQs</a> </div> <div class="rightList_1"> <a href="/SupportRequest.asp">Support Request</a> </div> </div> <!--End Column--> <div id="rightCon"> <div><img src="/images/index_85.jpg" width="224" height="44" /></div> <div style="background:url(images/click.gif);width:224px;height:32px;"> <script language="javascript" src="http://float2006.tq.cn/static_card.js?ltype=100&name=&uin=8214445&utf8=1&onlinepic=http://www.zwcad.org/images/click.gif&offlinepic=http://www.zwcad.org/images/click.gif&where=escape(document.referrer)"> </script> </div> </div> <div id="rightForum"> <div> <a href="http://www.zwcad.org/forum/" target="_blank"> <img src="/images/Company_55.gif" border="0" /> </a> </div> </div> <div class="rightLine_1">&nbsp;</div> <div class="rightConList_1"> <a href="mailto:sales@zwcad.com" style="color:#666666">sales@zwcad.com</a> </div> <div style="background-color:#f2f2f2;line-height:1px;"> <div class="rightLine_2">&nbsp;</div> </div> <div class="rightConList_2"> 86-20-38259726 </div> <div class="rightLine_2">&nbsp;</div> <form name="EmailForm" method="Post" action="EmailAction.asp" target="_blank" onSubmit="return EmailCheck(this)"> <div id="rightMail"> <div class="mailTitle"><a href="/news/newsletter.html" style="color:#000;">ZWCAD Newsletter Subscribe >></a></div> <ul> <li class="mailText"> <input type="text" id="Email" name="Email" align="absbottom" value="Your Email" style="color:#666666;" onfocus="if(this.value=='Your Email'){this.value='';this.style.color='#000000'}" onblur="if(this.value==''){this.value='Your Email';this.style.color='#666666'}" class="mail" /> </li> <li class="mailSubmit"><input type="image" src="/images/mail_10.gif" /></li> </ul> </div> </form> </div> <!--End Right--> </div> <!--End Main--> <!--Footer--> <div id="Bottom"> <div class="bottomLine"></div> <div id="bottomText"> <ul> <li class="bottomCont_1"></li> <li class="bottomCont_2"> <div class="contLeft"> &copy; 2010 ZWCAD Software Co., Ltd. All rights reserved. | <a href="/about-zwsoft.html">About ZWSOFT</a> | <a href="/Policy.asp">Privacy Policy</a> | <a href="/Terms.asp">Terms and Conditions&nbsp;&nbsp;</a> | <a href="/contact.html">Contact us</a> | <a href="/resource.html">Resource</a><br />All trademarks,trade names or company name referenced herein are used for identification only and are the property of their respective owners.<br /><!--b>ZWCAD software: reliable 2D CAD, 3D CAD drawings and drafting software solution, compatible with AutoCAD and with unique features.</b--> </div> <div class="contRight"> <img src="/images/index_165.gif" width="205" height="25" alt="" /> </div> </li> <li class="bottomCont_3"></li> </ul> </div> <div class="bottomLine_2">&nbsp;</div> </div> <!--End Footer--> <div style="display:none"> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-6182144-1"); pageTracker._trackPageview(); } catch(err) {}</script> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-1526878-1"); pageTracker._trackPageview(); } catch(err) {}</script> <script src='http://w.cnzz.com/c.php?id=30009022&l=1' language='JavaScript' charset='utf-8'></script> </div> </body> </html>