Getting DataTables to Work (Rails)

My personal cliff notes in getting this up and running ASAP (without worrying about AJAX or server-side processing). That come come later. I suppose it’s a problem that you want to have.

Read More

Accessing AutoCAD Path and Directory Names (AutoCAD .net API)

A code snippet to show you how to get at some common path / directories. I tend to use the methods of combining, because occassionally, AutoCAD’s current drawing path is not it’s current drawing path (when for example you use the Database.Filename property of the .net API) - but instead, what is returned is a path deep in the bowels of Window’s temp directory comes up. And that’s obviously the wrong value. So a hack I tend to use is to combine the drawing name (excluding the path) and the directory of where the drawing currently resides, and to combine the two using a System.IO.Paths.Combine(...) method (you’ll have to pass in the appropriate parameters of course) to come to the desired answer.

Read More

Add if Layer is Missing (AutoCAD .net API)

A very handy method. Often detailers will ask for something to be placed on a particular layer. But since they are using a 100 different drawing templates without any consistency nor standards, the onus is on you to impose that standard on them. So you’d have to check for a layer and add it if it doesn’t already exist. Anyways, that’s enough griping: here is the code:

Read More