Search the Community
Showing results for tags 'vba insert'.
-
I'm trying to build a "smarter" insert routine for placing furniture blocks. What I mean by "smarter" is I'd like the user to be able to control, preferably by keystroke, whether to mirror the block or rotate it by a fixed angle on each depression of whatever key I decided. The problem I'm having is I don't even know how to properly "search" for help without finding mounds of nonrelevant information. The biggest issue I can't find resolution for, is being able to keep the block ghosted on my mouse throughout and having that ghosted block update with the user input until it is finaly placed. Really, the rotation could come at the end, I just want to be able to have a visible insert routine with a mirror option. What's frustrating is I know it can be done--I've seen it using a furniture vendor's proprietary ACAD applet. I have been able to take the applet apart--somewhat--but I believe what I'm looking for in this applet is LISP. I don't understand LISP all that great and I'd really like to be able to use VBA. I've been able to get small, digestible snippets of LISP to work in conjunction with VBA, but that's about it. The closest I've gotten so far, is to use several small sub routines--like: Sub BasicInsert() ThisDrawing.ModelSpace.InsertBlock InsPnt(), "TypicalD1", 1, 1, 1, Rot() End Sub Function InsPnt() As Variant Dim Pnt1 As Variant Pnt1 = ThisDrawing.Utility.GetPoint(, "Choose insertion point") InsPnt = Pnt1 End Function Function Rot() Dim rotAng As Double Dim InsPnt As Variant rotAng = ThisDrawing.Utility.GetAngle(, vbCr & "Select Angle:") End Function By closest, I mean I've figured out that I can run sub routines inside of the InsertBlock routine. Really, I don't even know if I'm on the right path with this. Another route I'm considering but don't even know how to invoke is to get VBA to replicate the live action equivalent of grabbing a block by its insertion point grip. You know, when your in ACAD and you highlight a block and then click it's insertion point grip, you now have ahold of that block until you click elsewhere in the drawing to place it. I think if I could figure that out in VBA or LISP, I could get the rest of the stuff to fall in line. Any help would be oh so greatly appreciated. Thanks!
- 3 replies
-
- user input
- modified insert routine
-
(and 2 more)
Tagged with: