Examples
2Dto3D.LSP
- Visual LISP Examples for 2D to 3D conversions
2Dto3D - Utility to change entity Z value
C:Carpet - Reduce all Z values to zero
C:2Dto3DByHand - Manual selection of entities to change
C:2Dto3DbyProx - Z update by proximity to Z elevation tag
getTheStartPoint - Utilily to get object start point
AREAGAMES.LSP
- Visual LISP Examples for area calculations with block data
C:EXAMPLE1 - Calculate area based on border-object in block
GetBlockArea - Get the area utility function
GetBorderObject - Search block definition for border object
C:EXAMPLE2 - Calculate area based on attribute values
get_ATTS - Return a list of tags and attribute values
put_ATTS - Write a list of tags and attributes to a block insert
ATTRIBS.LSP
- Visual LISP Example application for attribute manipulations
C:ATTOUT - extract attributes and block info
C:ATTINP - import attributes and block info
ATT:REPLACE - replace attributes in a block insert
ATT:GETS - get attributes attached to a block insert
BLOCKATTRIBS.LSP
- Visual LISP Example utility to update redefined blocks with attributes
C:BLOCKATTRIBS - Command function to update blocks after redefining
ATT:REPLACE - replace attributes in a block insert
ATT:GETS - get attributes attached to a block insert
BLOCKFUN.LSP
- Visual LISP Function set to append objects to a block
AppendBlock - append entity to existing block definition
RemoveBlock - remove entity name from block defintion
Get_Block_Ref_Obj - return object reference given block name
CHANGES.LSP
- Visual LISP Example to change layers and Z values.
Layer_Update - change layers given selection set and nested list of layer names.
Z_Update - change Z elevations of a selection set.
Ent_Z_Update -change Z elevation for a single entity.
C:TEST1 - Layer conversion demonstration.
C:TEST2 - Z conversion demonstration.
CTEXT.LSP
- Visual LISP Example to change text and mark revision.
C:CTEXT - command function to mark change text
DATES.LSP
- Visual LISP Utility set for converting various date formats.
AcadCalendar - Given Julian date from AutoCAD DATE variable, returns string MM/DD/YYYY.
AcadJulianDate - Determines base value (Midnight) for AutoCAD DATE variable given the month, day, and year.
AstroCalendar - Given astronomical Julian date,
returns string with MM/DD/YYYY format.
AstroJulianDate - Given month, day, year returns Julian date as
determined by the Naval Astronomical Observatory.
DayOfWeek - Given month, day, year returns string with the
day of the week.
DayOfYear - Given month, day, year return integer number for
day of the year.
isLeapYear - Given year returns T if leap year, nil otherwise.
DBREAK.LSP
- Visual LISP Routine to break dimension lines (regenerating dimensions will erase breaks!)
C:DBREAK - Break dimension lines command function.
DETAIL.LSP
- Visual LISP Routine to create detail enlargements in model space
C:DETAIL - Detail enlargement command function.
DIRSEARCH.LSP
- Visual LISP Utility function for directory searching.
DirSearch - Directory search utility function.
SearchThese - Recursive directory search utility function.
DRAWCHART.LSP
- Visual LISP Example Function to draw a text chart or table from a list of data
DrawChart - Utility function for chart processing.
DetermineColHeight - Figure out which column is tallest.
DetermineRows - Figure out where rows start in Y.
Draw_The_Cells - Draw the linear grid for the chart.
Add_A_Line - Utility to draw a line object.
Add_A_Text - Utility to insert text.
Col_Total_Size - Find X width and Y height of a column.
Get_Column - Get column data as nested list.
Cell_Size - Determine cell size from data.
Verify_data_List - Verifies format of input data list.
HARRYDIALOG1.LSP
- Visual LISP and DCL example of Dialog box control
C:HD1 - Hot Tip Harry's Dialog example command function.
varies - Example call back functions for dialog box control.
nth-replace - Replace Nth value in a list utility function.
nth-remove - Remove Nth value in a list utility function.
INOUT.LSP
- Visual LISP Utility to determine if point is inside or outside of boundary.
InOut - Utility to determine if a point is inside or outside geometry.
Line_Arc - Compute intersection of line and arc.
Line_Arc_Loop - Looping work horse for Line_Arc.
Find_Lim - Apply tool for point list testing.
C:TestIt - Basic test example.
LastPlot.LSP
- Visual LISP Example to display last records from plot log file.
GetLayoutObject - get current layout object reference.
GetPlotConfigs - get active document plot configurations reference.
GetPrefObj - get preferences object reference.
GetPrefOutput - get preferences output object reference.
GetPrefFiles - get preferences files object reference.
GetPlotLogName - retrieve plot log file name from preferences.
ParseCSV - parse input line in comma format to list.
C:LastPlot - command function to display data from plot log file.
LAYERSWAP.LSP
- Visual LISP functions that manipulate and swap layer names.
LayerSwap - utility that does the layer name change work.
C:TEST - example that calls LayerSwap for all open documents.
C:DEMOLAYER - utility to modify layer name prefix/suffix for selected entities
LENGTHS.LSP
- Visual LISP Example functions using entity object lengths.
getTheLength - return length value for an entity
sumLengths - sum the length values found in a selection set.
findTheLongest - returns ename of longest object in selection set.
findTheShortest - returns ename of shortest object in selection set.
findLengthTest - generic length test utility given selection set.
LINESLOPE.LSP
- Visual LISP Example command to annotate sloped line.
C:LineSlope - command function to place percentage slope dimension.
DrawArrow - draw a solid arrow utility.
LWPLINES.LSP
- Visual LISP Utilities for manipulating lightweight polylines
LWPOLY_SHOW - Given Entity list, prints points in polyline.
LWPOLY_NTH - returns point, bulge, and widths of segment N.
LWPOLY_CHANGE - change nth point, bulge and widths.
LWPOLY_2_POLY - convert a lightweight poly to a traditional poly.
MATH.LSP
- Visual LISP Utility function set for math operations.
RTD - radians to degrees.
DTR - degrees to radians.
TAN - compute tangent.
ARCCOS - compute arccosine.
ARCSIN - compute arcsine.
SEC - compute secant.
COSEC - compute cosecant.
COTAN - compute cotangent.
VectMag - compute vector magnitude.
UnitVect - compute unit vector.
VectAdd - add two vectors.
VectAngle - vector angle.
ApplyCoeff - apply a coefficient f(x)=L0+L1*X+L2*X^2...
MATRIX1.LSP
- Visual LISP function set to perform matrix math, block point conversion
MatrixOrder - Determine size of rectangular matrix.
AddMatrix - Add matrices of like size.
MultMatrix - Multiply matrices.
MatrixFlip - Row-based to/from Column-based.
BuildBlockMatrix - Construct transformation matrix for block insert.
BlockPnt->WCS - Convert point from block definition to insert location.
NLENGTHEN.LSP
- Visual LISP function for modified delta lengthen command.
C:NLENGTHEN - Command function for new lengthen command.
*ERROR* - embedded defun in command function.
PFUNC.LSP
- Visual LISP function to plot a function Y=f(X) with f(X) as a form.
C:PFUNC - Command function to execute plot.
PLCHOP.LSP
- Visual LISP Example to chop a section out of a polyline.
C:PLCHOP - Command function to chop vertices from a pline.
GetVertexPoints - User input of two vertices from same pline.
REACTOR.LSP
- Visual LISP Example application for entity reactors.
C:CONNECT - Connect two circles with a line.
Connection - Draw a line between two circles.
ConnectFix - Reactor function when a circle changed.
WierdSorting.LSP
- Visual LISP Examples for demonstrating the sort utilities.
C:ENTITIES - Example to sorted list of entity counts.
C:ESORT - Example that sorts entity points by X then Y.
SortWierdFormat - Example to sort sheet set reference numbers.
C:SORTREFS - Example command function for SortWierdFormat utility.
QuickArrow - GRDRAW example to draw line with arrow head.
ParseNumbs - Parse string into list of numbers.
XDATA.LSP
- Visual LISP Example application for extended data manipulation.
X_DATA_GET - get extended data list from entity.
X_DATA_ADD - add extended data to entity.
X_DATA_DEL - remove extended data from entity.
X_DATA_APPIDS - build list of registered applications.
NTH_SUBST - substitute nth member in list.
C:EST - estimation example application shows use of
extended data to house bill of material info about objects.
XLSEEK.LSP
- Visual LISP Example to search an Excel Spreadsheet.
Excel_Record - Search for a match in column A of work sheet.
Close_Excel_Links - Close object linkage to work sheet.
ColLetter - Given a number returns letter as per Excel columns.
XLSEX1.LSP
- Visual LISP Example to write a list to an Excel Spreadsheet.
List_2_Excel - Write a list of data to a spread sheet.
ColLetter - Convert column number to Excel style letter label.
XLSOBJ.LSP
- Visual LISP Example to link to Excel Spreadsheet, update variable reference.
Link_2_Excel - Set up link to Excel worksheet objects.
Update_Variable - Sends new value to variable named in spreadsheet.
Close_XL - Close link to Excel worksheet object.
Keep on programmin' - Bill Kramer