File Description Size
cv-andrearicci_it.pdf Curriculum Vitae, in italiano 430KB
cv-andrearicci_en.pdf Curriculum Vitae, in English 430KB
arsurvey-lisp.7z Autolisp that draws a triangle, given three sides, insertion point and direction.
Usefull to draw survey's sketches. Instructions inside.

AutoCAD tips

Fields and drawing properies

In autocad there are those fantastic text object that are the fields. They can give you many values such as an object's area, or any other object's property, and update it as the property itself changes. I use them a lot to get information about the drawing itself and place them in the titlebox. Information such as the filename, for later retrival, the ctb/stb used to print, the layout printed, and even the units of the drawing and the page size.

File: Drawing1.dwg
Tab: Model
plot: 5/5/2018
plotstyle: FP-medium.ctb
viewscale: 10
(1mm=0.1000 m)
scaleName: m1:100
units: Meters (m)
paper: A3 297 x 420 mm
ltscale: 0.200000
xrefs:  $(XREFS)??
images: $(IMAGES)??

Let's see how to do it.

Start any text and by clicking inside it with the right button choose "insert field". You can choose a category or go straight to your variable. You can also apply some formatting. Some are pretty strightforward, let's see the previous sample infos. I'll use the category/fieldname and then the field's code that you can place directly in the text

You can even use formulas, such as in __(## On the drawing units (insunits) ####

It's very important to set the units both for the current drawing and for the blocks. AutoCAD uses this information to scale the insertiono of both blocks and xref. If you evre try to insert an inch block you'll be comple1mm=0.1000 m)__, where I used:

Then you can use Diesel macros, as I did to convert the meaningless insunit variable to a meningful unit name:

Putting all theese infos in an AutoCAD output (paper or pdf) you will be able to do it again in the future, once you'll forget one or the other information.

You may experiment with fields in block's attribute, wich may refer to the single block instance property, such as an automatic Y-value height dimension: %<\AcObjProp.16.2 Object(?BlockRefId,1).InsertionPoint \f "%lu2%pt2%pr0%zs8">%.

Download the sample file fieldSample.7z 160 KB .

On the drawing units (insunits)

It's very important to set the units both for the current drawing and for the blocks. AutoCAD uses this information to scale the insertion of both blocks and xref. If you ever try to insert an inch/foot block in a meter file you'll be completed deceived by wierd scaling values (if you're like me working in ISO units, remember to start new drawing with the acadiso.dwt template, otherwise the imperial units will persecute you - autodesk is an USA company).

Still, some of my works are in meters and some in centimeter (rarely in millimeters) so I like to know what's the current unit. You can check (and set) the current units with format>units menu but I like to have it in the satus bar. Insunit is a numerical variable that has to be converted to a meaningful unit to be read. So you have first to convert the numerical value to a meaningful word then to place it in the status bar. You can do that with two commands:

modemacro $(index,$(getvar,insunits),"-,in,ft,mi,mm,cm,m,km,µin,mil,yd,Å,nm,μm,dm,dam,hm,Gm,au,ly,pc")

or, for longer unit names:

modemacro $(index,$(getvar,insunits), "n/a,Inches,Feet,Miles,Millimeters,Centimeters,Meters,Kilometers,Microinches,Mils,Yards,Angstroms,Nanometers,Microns,Decimeters,Dekameters,Hectometers,Gigameters,Astronomical Units,Light Years,Parsecs")

unfortunately, this has to be done for every single drawing. To make it permanent you shall edit/create an acaddoc.lsp file inside the support file search path with the following content:

(SETVAR "modemacro" "UNITS: $(index,$(getvar,insunits),\"-,in,ft,mi,mm,cm,m,km,µin,mil,yd,Å,nm,μm,dm,dam,hm,Gm,au,ly,pc\")")

units in taskbar