andyding 发表于 2007-5-11 23:45:00

[求助]如何新建座标原点?

本帖最后由 作者 于 2007-5-13 19:06:06 编辑 <br /><br /> <p>请问各位高手</p><p>(defun c:test ()</p><p>&nbsp; (setq ss (getpoint))</p><p>&nbsp; (command "ucs" "o" ss "")</p><p>&nbsp; (princ)</p><p>)</p><p>这一段用纯LSP不调用command函数如何实现。</p>

oyxx1023 发表于 2007-5-14 11:33:00

<p class="MsoNormal" align="left" style="LINE-HEIGHT: 150%;"><font face="华文行楷">vla-put-Origin</font></p><p class="MsoNormal" align="left" style="LINE-HEIGHT: 150%;"><font face="华文行楷" size="5">功能</font></p><p class="MsoNormal" align="left" style="LINE-HEIGHT: 150%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font size="3">WCS坐标值指定UCS、图块、配置或光栅图像的原点。</font></p><p class="MsoNormal" align="left" style="LINE-HEIGHT: 150%;"><font face="华文行楷" size="5">语法及参数</font></p><table id="AutoNumber2" height="1" cellspacing="1" width="648" border="0"><tbody><tr><td width="66" height="1"></td><td width="711" colspan="2" height="1"><font size="3">(vla-put-Origin Object value)</font></td></tr><tr><td width="66" height="7"></td><td width="224" height="7"><font size="3">Object</font></td><td width="379" height="7">Block, Layout, PlotConfiguration, Raster, UCS</td></tr><tr><td width="66" height="4"></td><td width="224" height="4"></td><td width="487" height="4"><font size="3">这个属性适用的对象</font></td></tr><tr><td width="66" height="1"></td><td width="224" height="1"><font size="3">value</font></td><td width="487" height="1"><font size="3">变体(双精度的三元素阵列);读/写</font></td></tr><tr><td width="66" height="1"></td><td width="224" height="1"></td><td width="487" height="1"><font size="3">3D WCS坐标值,指定对象的原点</font></td></tr><tr><td width="66" height="1"></td><td width="224" height="1"></td><td width="487" height="1"><font size="3">对Layout与PlotConfiguration对象</font></td></tr><tr><td width="66" height="1"></td><td width="224" height="1"></td><td width="487" height="1"><font size="3">变体(双精度的二元素阵列);读/写</font></td></tr><tr><td width="66" height="1"></td><td width="224" height="1"></td><td width="487" height="1"><font size="3">X与Y值,代表相对于介质左下角的原点</font></td></tr></tbody></table>

andyding 发表于 2007-5-18 23:28:00

<p>我试用这个函数,还是不能实现。</p><p>我了试用了这个函数说明中的范例,也不行。</p><p>请再指点。</p>

oyxx1023 发表于 2007-5-19 12:01:00

<p>不行总得有个理由撒.</p><p>先看看出错的提示.自己调试一下.</p>

andyding 发表于 2007-5-19 22:18:00

<p>我程序最终目的是定好坐标后用来座标标零件的(如一楼那小程序的功能)。</p><p>帮忙看下,是不是我用错了?</p><p>我用了范例,世界坐标变成灰色,但还是在原点不动。</p><p>错误: 参数类型错误: VLA-OBJECT nil</p><p>(defun c:test (/ tbdata lname echo data c70 c62 q70 q62 have)<br/>&nbsp; (setq sso (getpoint))<br/>&nbsp; (setq ss1 (car sso))<br/>&nbsp; (setq ss2 (cadr sso))<br/>&nbsp; (setq ss3 (caddr sso))<br/>&nbsp; (setq ssl (list ss1 ss2 ss3))<br/>&nbsp; (if (= (tblsearch "UCS" "andy_ucs") nil)<br/>&nbsp;&nbsp;&nbsp; (progn<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SetQ nucs<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (EntMakeX '((0 . "UCS")<br/>&nbsp;&nbsp;&nbsp; (100 . "AcDbSymbolTableRecord")<br/>&nbsp;&nbsp;&nbsp; (100 . "AcDbUCSTableRecord")<br/>&nbsp;&nbsp;&nbsp; (2 . "andy_ucs")<br/>&nbsp;&nbsp;&nbsp; (70 . 0)<br/>&nbsp;&nbsp;&nbsp; (10 0.0 0.0 0.0)<br/>&nbsp;&nbsp;&nbsp; (11 1.0 0.0 0.0)<br/>&nbsp;&nbsp;&nbsp; (12 0.0 1.0 0.0)<br/>&nbsp;&nbsp;&nbsp; (79 . 0)<br/>&nbsp;&nbsp;&nbsp; (146 . 0.0)<br/>&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp; (progn<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq tbdata (tblnext "UCS" T))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq lname (cdr (assoc 2 tbdata)))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq data (entget (tblobjname "UCS" lname)))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq a3 (cons 10 ssl))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq data (subst a3 (assoc 10 data) data))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (entmod data)<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; )</p><p>&nbsp; (vla-put-Origin andy_ucs ssl)<br/>&nbsp; (princ)<br/>)</p><p></p><p></p><p></p>

andyding 发表于 2007-5-22 23:42:00

<p>高手们再帮个忙。我VLISP一点都不懂。</p><p>好人做到底,送佛送到西。</p><p>TKS!</p>
页: [1]
查看完整版本: [求助]如何新建座标原点?