Author Topic: vla-insertBlock  (Read 3481 times)

0 Members and 1 Guest are viewing this topic.

velasquez

  • Newt
  • Posts: 195
vla-insertBlock
« on: November 30, 2009, 05:23:46 AM »
Hello 
I am working with vla-insertBlock. 
Does a way exist of to simulate the block being dragged while the function waits for the insert point?
Thanks

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: vla-insertBlock
« Reply #1 on: November 30, 2009, 06:15:49 AM »
Hi,

This can be done using the ET acet-ss-drag-move LISP function:
Code: [Select]
(vla-move
  (vla-InsertBlock
    (vla-get-ModelSpace (vla-get-activeDocument (vlax-get-acad-object)))
    (vlax-3d-point '(0. 0. 0.))
    BlockName
    1.
    1.
    1.
    0.
  )
  (vlax-3d-point '(0. 0. 0.))
  (vlax-3d-point (acet-ss-drag-move (ssadd (entlast))
                                    '(0. 0. 0.)
                                    "\nSpecify insertion point: "
                 )
  )
)

But it's much more simple using command or vl-cmdf:
Code: [Select]
(command "_insert" BlockName pause "" "" "")
Speaking English as a French Frog