Author Topic: Insert command ?  (Read 2340 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Insert command ?
« on: July 25, 2004, 10:16:27 PM »
hi all.

I'm re-making some new lisps without using AutoCAD command

I need to know how can i insert a block without using the "INSERT" command...?

i know there is a function called...         :vlr-beginInsert

but i do not know really how it work and if this can replace the "INSERT" command.


thanks.
Keep smile...

Serge J. Gianolla

  • Guest
Insert command ?
« Reply #1 on: July 26, 2004, 02:30:34 AM »
Ah, travailler le Dimanche et t'as pas les yeux en face des trous! :lol: Tu poses ta question dans General pas VLISP hackers!!
prefix vlr means Visual Lisp Reactor, so that's not gonna' work. I know of vla-AddMInsert, and vla-AddAttribute, look in that direction until someone with a better answer shows up.
Arrivederci.

sinc

  • Guest
Insert command ?
« Reply #2 on: July 26, 2004, 02:59:13 AM »
You can use the InsertBlock method.  This is a method on the Block object.  Remember that Model Space and Paper Space are block objects.  Here's an example:

Code: [Select]
(defun insertblock ()
  (setq  acadObj (vlax-get-acad-object)
           doc (vla-get-activeDocument acadObj)
           mspace (vla-get-modelSpace doc)
  ) ;_ setq
  (vla-insertBlock
    mspace insertionPoint blockNameOrFilename xScale yScale zScale
    rotation) ;_ vla-insertBlock
) ;_ defun


Refer to the "ActiveX and VBA Reference" for further details.