insert blocks on many points

Discussion in 'AutoCAD' started by mboychuk, Feb 9, 2004.

  1. mboychuk

    mboychuk Guest

    I have many points that have to have a block inserted on them. Does someone have a LISP that would do this for me. I Had one but when my computer crashed I lost it.

    Thanks

    Mike
     
    mboychuk, Feb 9, 2004
    #1
  2. mboychuk

    bruno Guest

    mboychuk:

    (mapcar '(lambda (x) (command "insert" x "" "" "")) listofpoints)
     
    bruno, Feb 9, 2004
    #2
  3. Are your points 'POINT' entities? Or are they stored in a data file.

    If the latter, ASCPOINT (http://www.caddzone.com/free.htm) will
    insert blocks (or a copy of anything you select) at every point it
    reads from a data file.



    Copyright (c)2004 Tony Tanzillo
    Unauthorized reproduction expressly prohibited.

    Had one but when my computer crashed I lost it.
     
    Tony Tanzillo, Feb 9, 2004
    #3
  4. mboychuk

    Rudy Tovar Guest

    ;ALIST defined as point list.

    (setq cn 0)
    (while (setq pt (nth cn alist))
    ;(vla-insertblock ADoc InsertionPoint, Name, Xscale, Yscale, Rotation)
    (setq cn (1+ cn))
    )

    someone have a LISP that would do this for me. I Had one but when my
    computer crashed I lost it.
     
    Rudy Tovar, Feb 9, 2004
    #4
  5. mboychuk

    Jim Claypool Guest

    Rudy,

    What is ADoc in (vla-insertblock ADoc InsertionPoint, Name, Xscale, Yscale,
    Rotation)

    )
     
    Jim Claypool, Feb 10, 2004
    #5
  6. mboychuk

    Mark Propst Guest

    Jim,
    that needs to be any block object
    ie it can be: modelspace, paperspace or a named block definition object
    (where ever you wanted to insert the block 'Name')
    in other words the owner object of the new block reference insertion object
    to translate the vba help files to vla... the "Object" in the vba docs
    always becomes the first arg to the vla(x) function in lisp
    hth
    Mark
     
    Mark Propst, Feb 10, 2004
    #6
  7. mboychuk

    Jim Claypool Guest

    Mark,
    I am really dense today. Can you give me an example of putting a block named
    TEST in modelspace at point PT?
    Thanks,
    Jim
     
    Jim Claypool, Feb 11, 2004
    #7
  8. (vl-load-com)
    (setq myMS (vla-get-ModelSpace (vla-get-ActiveDocument
    (vlax-get-Acad-Object))))
    (setq pt '(12.0 12.0 0.0))
    (setq myIns (vla-InsertBlock myMS (vlax-3d-point pt) "Test" 1.0 1.0 1.0
    0.0))


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    Mark,
    I am really dense today. Can you give me an example of putting a block named
    TEST in modelspace at point PT?
    Thanks,
    Jim
     
    R. Robert Bell, Feb 11, 2004
    #8
  9. mboychuk

    Jim Claypool Guest

    Thank you very much.

     
    Jim Claypool, Feb 11, 2004
    #9
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.