none
用VS做AutoCAD二次开发 ,将填充定义为object,之后填充就会出错?!执行到AppendOuterLoop报错?~!请高手指点一下,怎样才能填充~ RRS feed

  • 问题


  •         Dim hatchobj3 As Object
            hatchobj3 = Acadapp.ActiveDocument.ModelSpace.AddHatch(1, "ANSI31", True)
            Dim plinehatch3(0 To 0) As Object
            Dim points23(0 To 9) As Double
            points23(0) = 0 : points23(1) = 0
            points23(2) = 10 : points23(3) = 0
            points23(4) = 10 : points23(5) = 10
            points23(6) = 0 : points23(7) = 10
            points23(8) = 0 : points23(9) = 0
            plinehatch3(0) = Acadapp.ActiveDocument.ModelSpace.AddLightWeightPolyline(points23)
            hatchobj3.PatternScale = 120
           hatchobj3.AppendOuterLoop(plinehatch3)
            hatchobj3.Evaluate()
            Acadapp.ActiveDocument.Regen(True)
    2013年8月6日 7:36