大师们请看看
<P>本人编了下面一个程式,就是选择很多物体一起偏移并删除以前的东西,但是会出现有些是内偏,而有些外偏,而如果是一个一个选,则都会外偏,请大师们过目并指教</P><P>Public Sub ttu()<BR>Dim ssetobj1 As AcadSelectionSet<BR>Dim icount1 As Integer</P>
<P>icount1 = ThisDrawing.SelectionSets.Count<BR>While (icount1 > 0)<BR> If ThisDrawing.SelectionSets.Item(icount1 - 1).Name = "yuan" Then<BR> ThisDrawing.SelectionSets.Item(icount1 - 1).Delete<BR> End If<BR> icount1 = icount1 - 1<BR> Wend<BR> Set ssetobj1 = ThisDrawing.SelectionSets.Add("yuan")<BR> ThisDrawing.Utility.Prompt "please select object"<BR> ssetobj1.SelectOnScreen<BR> Dim i1 As Integer<BR> Dim selobj1 As Variant<BR> Dim shuz As Double<BR> shuz = ThisDrawing.Utility.GetReal("请输入偏移量 :")</P>
<P> For i1 = 0 To ssetobj1.Count - 1<BR> Set selobj1 = ssetobj1.Item(i1)<BR> Dim ofselobj1 As Variant<BR> <BR> selobj1.Offset (shuz)<BR> selobj1.Delete</P>
<P> Next</P>
<P>End Sub</P>
<P><BR> </P> http://www.mccad.net/object/acad2004/idh_offset.htm
页:
[1]