CIVL 114 CIVL 114 Civil Engineering Civil Engineering Drawing Drawing Topic 8 Topic 8 AutoLISP program AutoLISP program Introduction to 3D dra Introduction to 3D dra wing wing
Dec 22, 2015
CIVL 114CIVL 114Civil Engineering DrawingCivil Engineering Drawing
Topic 8Topic 8
AutoLISP programAutoLISP program
Introduction to 3D drawingIntroduction to 3D drawing
OutlineOutline
AutoLISP programAutoLISP program
Plotting with layoutsPlotting with layouts
Inserting external reference and imageInserting external reference and image
Introduction to 3D drawingIntroduction to 3D drawing
Reference readingReference reading
AutoLISP ProgramAutoLISP Program
For CIVL102 and 114 students onlyFor CIVL102 and 114 students only
A programming language for AutoCAD A programming language for AutoCAD
““Autoplot” program:Autoplot” program:– To plot 2-D points + labels automaticallyTo plot 2-D points + labels automatically
AutoLISP ProgramAutoLISP ProgramProceduresProcedures
1)1) Download the Download the “AutoLISP program”“AutoLISP program” file from tea file from teaching.ust.hk/~civl114 and open it with Word (or ching.ust.hk/~civl114 and open it with Word (or any word processor);any word processor);
2)2) Save asSave as a “plain text” type (i.e. a text file), with a “plain text” type (i.e. a text file), with – filename = filename = “AUTOPLOT.LSP”“AUTOPLOT.LSP” ( (include the quotesinclude the quotes) ) – drive = your AutoCAD program directory drive = your AutoCAD program directory
(usually: (usually: C:\Program Files\ACAD2006C:\Program Files\ACAD2006) )
(alternatively: (alternatively: C:\tempC:\temp))
(if the computer does not allow you to save in (if the computer does not allow you to save in Program FilesProgram Files directory) directory)
AutoLISP ProgramAutoLISP Program3)3) Create your data as a text file; Create your data as a text file;
each line each line MUSTMUST follow this format: follow this format:– Easting (6 digits+3 decimals), one space, Northing, Easting (6 digits+3 decimals), one space, Northing,
one space, Point nameone space, Point name
for example,for example,123456.789 222888.333 P5123456.789 222888.333 P5234567.899 333888.222 G5-Point8234567.899 333888.222 G5-Point8
i.e. E and N must each have 6 digits + 3 decimalsi.e. E and N must each have 6 digits + 3 decimals
Point name can have any number of charactersPoint name can have any number of characters
** Do not hit enter/space when you finish typing ** Do not hit enter/space when you finish typing the last point name, just save the file! **the last point name, just save the file! **
AutoLISP ProgramAutoLISP Program
Recommended data preparation procedure:Recommended data preparation procedure:(i) prepare the 3 columns of required data (E; N; name) in E(i) prepare the 3 columns of required data (E; N; name) in E
xcelxcel(ii) copy the data and paste to word (becomes a table)(ii) copy the data and paste to word (becomes a table)(iii) (iii) TableTable – – ConvertConvert – – Table to TextTable to Text – – Separate Text withSeparate Text with ( (OtOt
hershers – type one space) – type one space)(iv) delete any space(s) after the last character at the end(iv) delete any space(s) after the last character at the end(v) (v) FileFile – – Save asSave as – (Save as Type: Plain Text) – (Save as Type: Plain Text)
** If you use the trial data on the web, make sure yo** If you use the trial data on the web, make sure you u use IE not Netscape use IE not Netscape to save it, otherwise there mto save it, otherwise there may be formatting problems.** ay be formatting problems.**
AutoLISP ProgramAutoLISP Program
4)4) Run AutoCAD, and in the command line, typeRun AutoCAD, and in the command line, typea)a) (LOAD”AUTOPLOT”)(LOAD”AUTOPLOT”) including the ( ) including the ( )
** OR ** ** OR ** (if program was saved on non-default directory)(if program was saved on non-default directory)b)b) ToolsTools – – OptionsOptions – – FilesFiles – click on the “+” in front of “ – click on the “+” in front of “
Support File Search Path”- Support File Search Path”- AddAdd (enter a permitted dir (enter a permitted directory such as C:\temp) ectory such as C:\temp)
andand
(LOAD”C:/temp/autoplot”)(LOAD”C:/temp/autoplot”)
5)5) As program requests, select the saved data fileAs program requests, select the saved data file6)6) All points in data file are plotted and labeled autAll points in data file are plotted and labeled aut
omatically!omatically!
Plotting with layoutsPlotting with layouts
Using layoutsUsing layouts
Creating a new layoutCreating a new layout
Creating multiple views in one layout Creating multiple views in one layout
Plotting multiple viewsPlotting multiple views
3D Drawing3D DrawingUser Coordinate System User Coordinate System (UCS)(UCS)
a)a) Tools – New UCS - …Tools – New UCS - …
b)b) Shortcut bar (Right click – Shortcut bar (Right click – ACAD – tick UCS)ACAD – tick UCS)
c)c) Type Type “UCS”“UCS” – N -- … – N -- …
3D Drawing3D Drawing3D orbit 3D orbit
a)a) View – 3D orbitView – 3D orbit
b)b) Shortcut bar Shortcut bar
(Right click – ACAD (Right click – ACAD
– – tick 3D orbit)tick 3D orbit)
ViewViewa)a) View – 3D viewsView – 3D views
b)b) Shortcut bar Shortcut bar
(Right click –(Right click –
ACAD – view) ACAD – view)
3D Drawing3D Drawing
DiceDice– 50 x 50 mm cube50 x 50 mm cube– 5mm-diameter 5mm-diameter
hemispheres hemispheres subtractsubtracted from the ed from the dice for the black dots dice for the black dots
– FilletFillet the edges of the the edges of the cube with fillet radius cube with fillet radius 3mm3mm