[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Three VBA Point Functions
Tip# 3561 By Brian Sardeson On 15-Jan-2011
Rated By 4 users Downloaded : 396
Categories : VBA Code Modules, Programming Examples
Software type : AutoCAD 2011
Rename File To : vba-func.txt
Find the midpoint of a line, a point perpendicular to a given object, or a three-element array of doubles.

Brian Sardeson gives us three VBA (Visual Basic for Applications) functions: SnapMidPoint returns the midpoint of a given line entity, SnapPerpendicular returns a point perpendicular to a given object from a given point, and MakePoint accepts three real numbers (x,y,z) and returns a three-element array of doubles. Note that these are specialized functions intended for use inside larger routines; they will not do anything on their own. Brian has included an example function named Test_DrawWithSnaps that illustrates the use of all three of these functions. You can use this example as a guide for applying these functions in your own code.

(Note that VBA functionality is not included with AutoCAD 2010 or later, although it can be added with an add-on from Autodesk.)   


Average Rating:

User comments

Log In