Jump to content

Search the Community

Showing results for tags 'vba insert'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 1 result

  1. meyerforhire

    Interactive Insert VBA

    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!
  • Create New...