Add block at cursor
Add block at cursor
(OP)
In order to add a block reference in a drawing using VBA the code is
ThisDrawing.ModelSpace.InsertBlock Pt1, BlockName, 1, 1, 1, 0
but that assumes that I want to put it in a specified location. How can I bring the block in on the cursor so the user can place the block wherever they want it?
ThisDrawing.ModelSpace.InsertBlock Pt1, BlockName, 1, 1, 1, 0
but that assumes that I want to put it in a specified location. How can I bring the block in on the cursor so the user can place the block wherever they want it?





RE: Add block at cursor
http://mechcad-insider.blogspot.com/
"The fear of the Lord is the beginning of wisdom"
RE: Add block at cursor
It's pretty hard to get that using VBA. It's easier to obtain using LISP.
The other alternative is to put the block in a pallet. This will create a button that you can use to specify layer, scale, rotation etc.
RE: Add block at cursor
RE: Add block at cursor
I run this very operation as a simple macro, with the above steps. Don't know the exact code you'd use for Vb, but this is the logic, anyway.
Good luck-
C. Fee