Wednesday
Annotation, AutoLISP, Autocad, Download, How ToAutoLISP Download: Giving Elevation Symbols Automaticly

Hello Daily AutoCAD readers,
Today, I would like to present you a tool that you can use during architectural project preparation. You have to give all of the major elevations for floor levels in all of the plan and section views. While doing this job, it is wiser to work with a “self-updating elevation” block that is appropriate according to standard elevation representations.
In this article, you will learn how to add automatically text (FIELD) property to a dynamic block that has multi view property and attribute. You can add FIELD property very easily by using an AutoLISP program.
In architectural discipline, elevation of sidewalk that is at the entrance of the building is accepted as 0.00 level. However, in AutoCAD, all of the elevations are calculated according to ground coordinate system! (wcs = world coordinate system).

Fig. 1 – Determining the value of point that is selected by using ID command.
Fig. 1 – (A): You can see the position where UCS icon is located as 0,0,0 as origin point. If you cannot see it, then you can set the UCSICON system variable to 1 or 3.
Fig. 1 – (B): It is possible to learn the value of any coordinate inside the drawing space by using ID command. For example, you can learn the insertion point of block by using this method.
Command: _ID (select the insertion point of block that is shown by letter (B))
Specify point: X = 1700.0000 Y = 2690.0000 Z = 0.0000
Dynamic block that is named as “Dyn-LEVEL-TR” has attribute property (variable text). This block that is prepared according to DIN 1356 (07.1974) norm has multiple view property.

Fig. 2 – Properties of dynamic block
Filled triangles (hatched with SOLID) is used in draft floor slab, whereas empty triangles are used in completed floor slabs. If you would like to dimension ceilings, then you have to mirror the block by using FLIP option.
If the elevation is pointing a position that is above the 0,0,0 reference point, (+) mark is placed in front of the value; whereas if it is below the reference point 0,0,0, then a (-) sign is placed in front of the value.
If the elevation is 0 (zero), then the value is written as ±0.000. The prefix ± (plus minus) is written by entering %%P.
You can change the value of attribute by using ATTEDIT or DDATTE commands. You can also do this by making double-clicking. If double-clicking is not working, then you can activate by using DBLCLKEDIT.

Fig. 3 – Changing attribute value of the block
It is possible to change the other values of blocks that has attribute property as you like (Fig. 4).
Another thing that I really like is that you can change the insertion point of attribute text to another position by using GRIP.

Fig. 4 – Editing the variable text properties of block.
| Dynamic block that has multiple view property (Parameter = VISIBILITY). |
![]() |
![]() |
![]() |
|||
| View mode: Y1 FLIP mode: Not flipped |
View mode: Y1 FLIP mode: Flipped |
View Mode: Z1 | |||
![]() |
![]() |
![]() |
|||
| View Mode: Y3 FLIP mode: Not flipped |
View Mode: Y3 FLIP mode: Flipped |
View Mode: Z2 | |||
![]() |
![]() |
![]() |
|||
| View Mode: Y5 FLIP mode: Not flipped |
View Mode: Y5 FLIP mode: Flipped |
View Mode: Z3 | |||
![]() |
![]() |
![]() |
|||
| View Mode: Y7 FLIP mode: Not flipped |
View Mode: Y7 FLIP mode: Flipped |
View Mode: Z4 |
For view and sections, you can use options that start with “Yx” letter (From Y1 to Y8). There are also some other symbols that are named from Z1 to Z4 which you can use for your plan drawings. AutoLISP program that is shown as list below filters the visibility parameter of the block and selects the Y- or Z- value that belongs to insertion point of the block.
Using the attached AutoLISP program that is given. Unit mode (%lu = linear units):
Unit mode settings that is very similar to system variable LUNITS are used by using these information.
\f “%.30q0″It shows according to unit system that is currently set.
\f “%lu1″ Unit system according to scientific operations.
\f “%lu2″ Decimal unit system.
\f “%lu3″ Engineering unit system.
\f “%lu4″ Architectural unit system.
\f “%lu5″ Raitonal unit system.
Number of decimals (%pr = precision):
It determines the number of decimal digits after comma. It is similar to system variable LUPREC and determines the precision of decimal digits. You can use the number of digits between 0 (zero) and 8.
\f “%pr0″ Numbers are shown as rounded without any commas.
\f “%pr8″ Number of digits after comma is shown as 8 (AutoCAD does not accept more then this).
Symbol that separates the directories (%ls = line separator): You can change the look of symbol that separates the directories from each other. It is possible to use another symbol instead of comma [,] which is designated by 44 as its Ascii value.
\f “%ls59″ [;] ASCII value 59
\f “%ls47″ [/] ASCII value 47
Symbol that separates the decimal part (%ds = decimal separator): It changes the look of symbol that separates decimal part of numbers. It is possible to use another symbol instead of comma [,] which is designated by 44 as its Ascii value.
\f “%ds44″ [\f "%ds32" [] Space character ASCII value of which is 32.
Prefix of suffixes (%lu = prefix / suffix):
\f “%ps[Grid spacing = ,]” Then, “Grid spacing” will be used as prefix.
\f “%ps[Circle diameter = , mm]” “Circle diameter =” will be used as prefix, and “mm” will be used as suffix.
It is an easy way to get rid of zeros: (%zs = zero space)
\f “%zs1″ Feet settings
\f “%zs2″ Inch settings
\f “%zs4″ Removes the zeros before decimal separator
\f “%zs8″ Removes the unnecessary zeros after decimal separator
\f “%zs12″ Removes the zeros before and after decimal separator
Important notes:
All drawings that are made in model space must be made by M=1:1 scale and elevations must be equal to Y-value of coordinates. Print-outs (where the details are shown) are made in layout part (paper space). While editing the variable texts by using ATTEDIT command, you can edit the automatic texts by using the short-cut menu that appears by pressing right mouse button.
You can download related files below link:
level.zip (66.4 KiB, 275 hits)
You need to be a registered user to download this file.
Post Tags:
Related Posts
Popular
- Hip tip: Increasing view resolution with VIEWRES system variable
07/03/2009 04:39 am
7 Comments - Sirince – IZMIR
07/02/2009 11:02 am
1 Comment - Visual LISP: Programming user interfaces with OpenDCL
07/01/2009 10:15 pm
10 Comments - 3D Modeling 7: EXTRUDE
06/30/2009 02:14 pm
10 Comments - Ask DailyAutoCAD: Which Notebook to Buy?
06/30/2009 12:17 pm
1 Comment
Featured Articles
- AutoCAD 2009 Update 3 Released
- Speed Up As AutoCAD 2009 Ribbon Menu Helps You!
- MEP Analysis Extension for AutoCAD MEP extended to March 31, 2009
- Recap of AutoCAD-related technologies on Autodesk Labs
- Technology Preview of MEP Analysis Extension extended to 12/31/08
- Autodesk Labs: Forward and Backward utility for AutoCAD
|













Nov 1, 2007
Reply
Dear Mr. Kocyigit,
Thank you for you articles. I am very-very interested.
I am from Indonesia, and new user of autocad.
I work at infrastructure company.
There is no enough place for autocad user to learn autocad good.
Mr. Kocyigit….
I have many file of LSP (written in .txt (notepad) file.
My boss said that I can use them to design, draw, and calculate in autocad. But i can use it at all. I really don’t understand.
I need you help to used them. Because I really don’t know.
Thank you.
regards,
Anggi
Nov 8, 2007
Reply
Mr. Kocyigit.
I have so meny time triying to use Lisp but I don know how start.
can you tell me were I can find.
thank you.
Fausto
Nov 12, 2007
Reply
Dear Mr. Muharrem Kocyigit,
Thank you very much for this Lisp. Simply I loved it because I can use it in Plan View. I am using ACA2008 and there is Automatic Elevation but in Front View).
I have put Dynamic Block in my Design Center->drag it to the drawing (level +-0,00 is moved to coordinate 0,0,0 of World UCS, moving origin to zero level does not work) ; copy to neccesary levels; issue command from my tool in Tool Palette
^C^C(load “Level_cm.lsp”);AF2LB for level in cm or
^C^C(load “Level_m.lsp”);AF2LB for level in m, select all levels and it works perfectly and looks fine.
Thank you again,
regards,
Bosko
Nov 21, 2007
Reply
Hi Anggi,
Sorry about the belated reply,
We would you help. Please send your lisp file to orhan @ taliasoft . com .
Thank you for your visit
Nov 21, 2007
Reply
Hi Fasovi,
“AutoCAD Developer’s Guide to Visual LISP” is a good book (Author Nikolai Poleschuk)
URL: http://www.amazon.de/AutoCAD-Developers-Guide-Visual-LISP/dp/1584500913/
Thank you for your visit
Nov 21, 2007
Reply
Hi Bosko,
please send your problem (drawing with lisp) to orhan @ taliasoft.com . I will verify the trouble.
Thank you
Jan 11, 2008
Reply
Would it be possible to have this work with 2005?
Chris
Jan 13, 2008
Reply
Hi Chris,
Dynamic block is only possible in AutoCAD 2006
Mar 14, 2008
Reply
Hi,
How do you set up reference zero level?
Mar 25, 2008
Reply
Hey! give some nice websites to download the Mechanical, Electrical and Plumping Designs and Sections, Elevations, Plans etc…… k.
May 26, 2008
Reply
hi
Can u pl send one lisp,which can take the x value also,means offset and elevation at the same time.
I am using Autocad2004
kind regards
Sandy
Jun 28, 2008
Reply
hi,
I is good but how i could use first level on 0.0
thanks
Nov 13, 2008
Reply
we cannot draw aautocad 2006 in computer si you can help me sir in 3d autocad drawing
Feb 17, 2009
Reply
Where can I get these files. does anyone have these?
The link is dead
Feb 17, 2009
Reply
I’ll correct the link. Please give me a day.
Regards
Feb 18, 2009
Reply
@hanslammerts
I fixed the broken link. Now everybody can download the related files.
We appoligize for the inconvenience.
Regards
Feb 18, 2009
Reply
Super cool tool,.. thanx a milion,
Would it be possible to programm it so local UCS point are read out.
The workaround then would be => set UCS to refplane => update blocks..
Not always sections are drwan relative to y=0 in WCS..
Kind regards
Hans
Feb 20, 2009
Reply
@hanslammerts
I will change this Lisp programme next week.
Regards
May 5, 2009
Reply
How I convert 3d to 2d. I mean z=0
May 31, 2009
Reply
Hi
I was wondering if there is a lisp to do the followings:
1) ReSpace Texts with any Justification
2) Filter Text Value of * in drawing
Thakns a million
Bon