czlj2008 发表于 2005-8-1 19:30:00

急需求教

<P>'急需求教,下面的程序怎样修改才可以实现measure 命令的功能</P>
<P>
<BLOCKQUOTE>
<P>Private Sub div()</P>
<P>&nbsp; Dim obj As AcadObject<BR>&nbsp; Dim basept As Variant<BR>&nbsp; Dim SSETS As AcadSelectionSet<BR>On Error Resume Next<BR>&nbsp; If Not IsNull(ThisDrawing.SelectionSets.Item("PLSET")) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp; Set SSETS = ThisDrawing.SelectionSets.Item("PLSET")<BR>&nbsp;&nbsp;&nbsp;&nbsp; SSETS.Delete<BR>&nbsp; End If<BR>&nbsp; Set SSETS = ThisDrawing.SelectionSets.Add("PLSET")<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp; SSETS.SelectOnScreen<BR>&nbsp; <BR>&nbsp; Set obj = SSETS.Item(0)<BR>&nbsp;' ThisDrawing.Utility.GetEntity obj, basept, "please pickt pl:"<BR>&nbsp; MsgBox obj.ObjectName</P>
<P>'请教下一句怎样改才可以完成measure的任务?<BR>&nbsp; <FONT color=#ee3d11>ThisDrawing.SendCommand "MEASURE" &amp; vbCr &amp; "P" &amp; vbCr &amp; "6" &amp; vbCr</FONT></P>
<P>End Sub</P>

<P>谢谢赐教</P></BLOCKQUOTE><A href="look_ip.asp?boardid=4&amp;userid=191358&amp;ip=*.*.*.*&amp;action=lookip" target="_blank" ><IMG height=15 alt=点击查看用户来源及管理,发贴IP:*.*.*.* src="skins/default/ip.gif" width=13 align=absMiddle border=0></A> 2005-8-1 19:18:34 &nbsp;<A title=同意该帖观点,给他一朵鲜花,将消耗您5点金钱 href="postagree.asp?boardid=4&amp;id=40425&amp;replyid=48993&amp;star=1&amp;isagree=1" target="_blank" ><IMG src="skins/default/xianhua.gif" border=0><FONT color=#000000>鲜花</FONT></A>(<FONT color=#ff0000>0</FONT>)&nbsp;&nbsp;<A title=不同意该帖观点,给他一个鸡蛋,将消耗您5点金钱 href="postagree.asp?boardid=4&amp;id=40425&amp;replyid=48993&amp;star=1&amp;isagree=2" target="_blank" ><IMG src="skins/default/jidan.gif" border=0><FONT color=#000000>鸡蛋</FONT></A>(<FONT color=#ff0000>0</FONT>) <A href="post.asp?action=edit&amp;BoardID=4&amp;replyID=48993&amp;ID=40425&amp;star=1" target="_blank" ><IMG alt=编辑这个贴子 src="skins/default/edit.gif" align=absMiddle border=0></A> <A title=注意:本操作将删除单个贴子 href="admin_postings.asp?action=删除跟帖&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><IMG src="skins/default/delete.gif" border=0></A>&nbsp; <A title=复制单个贴子到别的版面 href="admin_postings.asp?action=复制&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><IMG src="skins/default/copy.gif" border=0></A>&nbsp; <A title=精华 href="admin_postings.asp?action=精华&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><IMG src="skins/default/jing.gif" border=0><FONT color=#000000> 精华</FONT></A>| <A title=对发起主题用户奖励 href="admin_postings.asp?action=奖励&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><FONT color=#000000>奖励</FONT></A> | <A title=对发起主题用户惩罚 href="admin_postings.asp?action=惩罚&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><FONT color=#000000>惩罚</FONT></A> &nbsp;<A title=注意:单帖屏蔽 href="admin_postings.asp?action=单帖屏蔽&amp;BoardID=4&amp;ID=40425&amp;replyID=48993&amp;userid=191358" target="_blank" ><IMG src="skins/default/lockpage.gif" border=0></A>
<P></P>

efan2000 发表于 2005-8-1 21:46:00

<P>ThisDrawing.SendCommand "MEASURE (handent """ &amp; obj.Handle &amp; """)" &amp; vbCr &amp; "6" &amp; vbCr<BR></P>
<P>其中handent是Lisp函数,ACAD命令行可以直接接收这种类型的函数。</P>

czlj2008 发表于 2005-8-3 19:26:00

<P>谢谢啦,大哥!你真的厉害,这个问题困扰我好几个星期了,现在终于解决啦,很高兴,谢谢!</P>
页: [1]
查看完整版本: 急需求教