各位热心的大虾向你请教问题,我编写两段段插块的程序,圆我能插到指定点,为什么线的不能?程序如下:
'创建直线块 Dim sblockobj(0) As AcadBlock Dim insertionpoint(0 To 2) As Double insertionpoint(0) = 2014#: insertionpoint(1) = 1436.5: insertionpoint(2) = 0# Set sblockobj(0) = acadApp.ActiveDocument.Blocks.Add(insertionpoint, "lineblock") '创建直线块 Dim stp0(0 To 2) As Double Dim enp0(0 To 2) As Double stp0(0) = 2014: stp0(1) = 1436.5: enp0(2) = 0 enp0(0) = 2016: enp0(1) = 1436.5: enp0(2) = 0 Set plnObj = acadApp.ActiveDocument.ModelSpace.AddLine(stp0, enp0) Dim sblockRefobj As AcadBlockReference insertionpoint(0) = 2014#: insertionpoint(1) = 1436.5: insertionpoint(2) = 0# Set sblockRefobj(0) = acadApp.ActiveDocument.ModelSpace.InsertBlock(insertionpoint, "lineblock", 1#, 1#, 1#, 0) '插入块
'插入直线块
insertionpoint(0) = 2038.8: insertionpoint(1) = 1436.5: insertionpoint(2) = 0# Set sblockRefobj(0) = acadApp.ActiveDocument.ModelSpace.InsertBlock(insertionpoint, "lineblock", 1#, 1#, 1#, 0)
为什么不能插到我指定的(2038.8,1436.5)点?
还有如果我想镜像很多对象时,我该怎么办?谢谢!
我的联系方式:E-mail:wfcst2004@163.com qq:46184430, |