insert

Discussion in 'AutoCAD' started by Louis, Jun 3, 2004.

  1. Louis

    Louis Guest

    is it ppssible in lisp to insert a drawing like using (Command "insert" ...
    without using (command ...??
     
    Louis, Jun 3, 2004
    #1
  2. Louis

    Jürg Menzi Guest

    Hi Louis

    With ActiveX:
    (vl-load-com) ;initialize ActiveX support
    (vla-InsertBlock
    (vla-get-ModelSpace
    (vla-get-ActiveDocument
    (vlax-get-acad-object)
    )
    )
    (vlax-3d-point InsPnt) ;Insertion point
    "BlockName.dwg" ;add path if necessary
    1 1 1 0 ;X-, Y-, Z-scale, angle
    )

    Cheers
     
    Jürg Menzi, Jun 3, 2004
    #2
  3. Other than inside a defun command, you can (in a screen or pull-down or
    tablet menu item, for instance) intersperse ordinary macro-type or
    script-type elements (as though you were typing them in) with lisp
    expressions:

    ^C^C-LAYER S <theLayerYouWant> ;+
    -INSERT <theBlockOrDrawingName>
    \<predeterminedScaleFactorIfYouWant>...etc......

    along with lisp pieces like (setq) things to save insertion points or
    rotation angles for later reference, and so on.

    Just use -INSERT with the hyphen in front of it, to bypass the dialog box.

    Kent Cooper, AIA
     
    Kent Cooper, AIA, Jun 3, 2004
    #3
  4. Louis

    Louis Guest

    thanks,

    Louis
     
    Louis, Jun 4, 2004
    #4
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.