[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.
Auto-Draw Railroad Tracks
Tip# 3399 By Don Bruce On 15-Apr-2010
5
Rated By 2 users Downloaded : 1077
Categories : Linear Objects
Software type : AutoCAD 2011
Rename File To : RRL.LSP
Draw railroad tracks based on preset rail gauge and tie spacing.

CAD Systems Manager Don Bruce has submitted a routine to quickly draw railroad tracks based on preset rail gauge and tie spacing. The program constructs the railroad ties along a line, arc, or polyline that you select. Load the LISP file, then start the command by entering RRL at the Command line. A new layer named C-RAIL-TRAK will be created for the tracks and ties. The rail gauge is set to 4.72' in the code, with appropriate comments so it is easy to make changes if required. Nice job, Don.

 

Average Rating:
5


User comments
Comment by Anonymous
Posted on 2010-04-19 14:58:24
I'm running Autocad Mechanical 2010. I get the following message when I try to run your lsp: Macro: Railroad Layout from Line/Arc/Polyline; error: no function definition: VLAX-GET-ACAD-OBJECT
Comment by Bruce,Don
Posted on 2010-04-19 17:15:29
If you do not have the autoload function for Visual LISP COM interface, you will need to add this to the routine. Simply place (VL-LOAD-COM) at the beginning of the lisp file and the functions should be made available.
Comment by Bruce,Don
Posted on 2010-04-19 17:22:11
Also note; this routine was written to show various "draw on demand" and other lisp functionality. A much simpler approach to this type of routine is to use the Offset command along with a "tie" block and Measure command for tie spacing (with block aligned to selected linework). Just another option to think about.
Comment by Haas,Tim
Posted on 2014-07-18 11:59:48
I'm new to LISP routines. I have some very basic programming background. We would like the tie dimensions to be 0.75' wide and 8.5' long. I am trying to do this with very little success.


Log In