rb 发表于 2002-9-15 13:33:00

清问:AddMLine有哪些参数,类型如何?

housm 发表于 2002-9-15 22:46:00

你可以查看ACAD对象的相关帮助,详见正文

Creates multiple lines passing through an array of points.

RetVal = object.AddMLine(VertexList)

Object:        ModelSpace Collection, PaperSpace Collection, Block
          The object or objects this method applies to.
VertexList:Variant (array of doubles); input-only
      An array of the 3D WCS coordinates specifying the vertices for the multiline.
RetVal:MLine object
The newly created MLine object.

For example:
Sub Example_AddMLine()
   ' This example adds an Mline in model space

    Dim mLineObj As AcadMLine
    Dim vertexList(0 To 17) As Double
   
    ' Define data for new object
    vertexList(0) = 4: vertexList(1) = 7: vertexList(2) = 0
    vertexList(3) = 5: vertexList(4) = 7: vertexList(5) = 0
    vertexList(6) = 6: vertexList(7) = 7: vertexList(8) = 0

    vertexList(9) = 4: vertexList(10) = 6: vertexList(11) = 0
    vertexList(12) = 5: vertexList(13) = 6: vertexList(14) = 0
    vertexList(15) = 6: vertexList(16) = 6: vertexList(17) = 6

    ' Create the line in model space
    Set mLineObj = ThisDrawing.ModelSpace.AddMLine(vertexList)

    ThisDrawing.Application.ZoomAll
   
    MsgBox "A new MLine has been added to the drawing."

End Sub
页: [1]
查看完整版本: 清问:AddMLine有哪些参数,类型如何?