inserting a block with attributes (accept all defaults)

Discussion in 'AutoCAD' started by Greg McLandsborough, Nov 17, 2004.

  1. Can someone please let me know how to insert a block with attributes and
    accept the defaults (or place an empty string " " into it) I need to do this
    for a variable number of Attributes.

    I have tried this
    (vl-cmdf "-Insert" "Myfile.dwg" ins-pt scale scale blk-ang (repeat 10 ""))

    Thanks for any help
     
    Greg McLandsborough, Nov 17, 2004
    #1
  2. Greg McLandsborough

    T.Willey Guest

    Turn "attreq" off.

    Tim
     
    T.Willey, Nov 17, 2004
    #2
  3. Greg McLandsborough

    Don Butler Guest

    You might be able to modify this. With ActiveX, the attribute values are
    added after the Insert is inserted.

    (defun bpc:insrt (blk insertpt scale rotation / doc space)
    (vl-load-com)
    (setq insertpt (trans insertpt 1 0))
    (setq doc (vla-get-activedocument (vlax-get-acad-object)))
    (if (and
    (= (getvar "tilemode") 0)
    (= (getvar "cvport") 1)
    )
    (setq space (vla-get-paperspace doc))
    (setq space (vla-get-modelspace doc))
    )
    (setq obj
    (vla-insertblock
    space
    (vlax-3d-point insertpt)
    blk
    scale
    scale
    scale
    rotation
    )
    )
    (vlax-release-object space)
    (vlax-release-object doc)
    obj
    )

    Don
     
    Don Butler, Nov 18, 2004
    #3
  4. Thanks Tim,

    Probably should have looked at the System Variables (actually I knew this
    just forgot)
     
    Greg McLandsborough, Nov 18, 2004
    #4
  5. Greg McLandsborough

    T.Willey Guest

    Greg,

    Always happens.
    Glad it was something easy.

    Tim
     
    T.Willey, Nov 18, 2004
    #5
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.