Insert block example

Discussion in 'AutoCAD' started by Guest, Sep 7, 2004.

  1. Guest

    Guest Guest

    Would someone be so kind as to post, or send me, a working example of
    a VBA project that will insert a block? I would like to have a base
    to work from for making my own, which I will gladly share.

    Thanks, Todd
     
    Guest, Sep 7, 2004
    #1
  2. Guest

    nthgg Guest

    Well here's a code snippet that should give you an idea on how to insert a block:



    Sub InsertBlock()
    Dim MyBlock As AcadBlockReference
    Dim insPoint As Variant

    insPoint = ThisDrawing.Utility.GetPoint(, "Select An Insertion point")
    Set MyBlock = ThisDrawing.ModelSpace.InsertBlock(insPoint, "C:\New Block.dwg", 1, 1, 1, 0)
    End Sub



    I really hope that this executes just fine. Coz i just coded that in my mind... cheers



    Paul June A. Domag
    nth geographics and geometrics
     
    nthgg, Sep 7, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.