Monday, 21 April 2014

Quantification Of Road Transport Particulate Matter Using Detailed Technology Emission Factors


About



More than two weeks have passed since my last post. The reason for not publishing something new was a conference, in which I had to participate and present a part of my research work. The conference was the TRA 2014 and took place in Paris. I spent almost the entire previous week there. In the paragraphs below you will find a text version of one of the papers that I presented there. If you like, you can download the original poster version in PDF format. I hope that you will find it interesting. Maybe within the week I will publish another poster from the TRA conference. 



Introduction



  • Improvement, determination and harmonization of road transport exhaust PM emission factors (EF). A number of other compounds is included (34 compounds in total).
  • Vehicles/Technologies: all vehicles / all technologies (pro-Euro – Euro 7).


Method


  • COPERT 4 and a combined methodology (literature review plus COPERT 4).
  • EFs correspond to urban, rural and highway conditions. For pre Euro - Euro 5 technologies two different urban conditions (peak and off-peak).
  • For technologies pre-Euro and Euro1 – Euro 4 (PCs and LDVs), Euro I – Euro IV (HDVs, Buses and Coaches) and Euro 1 – Euro 2 (Mopeds and Motorcycles), the database includes EFs for the EU-27 and for each country member separately.
  • For newest technologies, only one EF for each pollutant  for all EU-27 countries (it does not take into account the share of vehicles cars in different countries, the driving conditions or climatic conditions).


Results



Passenger Cars and Light Duty Vehicles

Evolution Of Diesel PC PM Limit And Corresponding EFs

Evolution of diesel PC PM limit and corresponding EFs (g/km) (Urban driving).

Evolution Of PN EFs (Particles-km) Of PCs (1.4 l -2.0 l) From Pre ECE To Euro 7

Evolution of PN EFs (particles/km) of PCs (1.4 l -2.0 l) from pre ECE to Euro 7 (Urban driving).

PSDs Of Diesel And Gasoline PCs (Euro 4, 1.4 l -2.0 l)

PSDs of diesel and gasoline PCs (Euro 4, 1.4 l -2.0 l).


Heavy Duty Vehicles, Buses and Coaches

PM EFs (g-km) For HDVs (Articulate 14-60 t) Running In Different Fuels

PM EFs (g/km) for HDVs (Articulate 14-60 t) running in different fuels.

PSDs Of Various HDVs

PSDs of  various HDVs.



Conclusions



  • A database of road transport EFs was developed  based on  COPERT 4 and on a detailed survey of the available literature.
  • Although increased accuracy may be achieved by a more detailed procedure with COPERT (when the appropriate information and data be available), significant differences are not expected given the evolution of vehicle, fuel, aftertreatment, etc, technology.


Downloads



Download

The file is in PDF format.

Sunday, 6 April 2014

Funny Engineering Pictures


Introduction



I think that the post title is quite straightforward, as it was the previous one. Below you will find a collection of 20 pictures that mocking various aspects of engineering. I hope that they will make you smile, so have fun!

Friday, 28 March 2014

Micro And Macro Modelling Of Cold Start Emissions From Road Traffic


About



From previous Monday till yesterday the 9th International Conference on Air Quality – Science and Application took place in Garmisch-Partenkirchen (Germany). I submitted a poster in this conference, which I would like to share it with you. The poster can be considered as sequel of COPERT Micro poster. In the paragraphs that follow you will find a text version of the poster, and, if you like, you can download the original version presented in the conference. I hope that you will find it interesting.



Introduction



  • During cold-start, the exhaust emissions of regulated pollutants are high, since the engine, catalyst and drive train of the vehicle have not reached their regular operating temperatures.
  •  Considering that passenger cars are a major contributor to transport emissions we tried to quantify the impact of cold start emissions on micro (per traffic link) and macro level (entire city), using measured traffic data and applying traffic and emissions modelling.
  • This study aims to quantify the contribution of cold start emissions on the overall road transport emissions in the road network of Athens, Greece. 


Methodology



Methodology

  • Athens network used: 81880 links and 36725 nodes.
  • The demand side comprised of 24 hourly Origin-Destination (OD) matrices which were corrected using hourly volume data measured by 557 inductive loop detectors installed across the city.
  • The output traffic data from PTV VISUM (traffic volume, average speed and vehicle fleet composition pet link), along with the trip length distribution, ambient temperature and parking time distribution of the entire city were inserted to COPERT Micro.
  • COPERT Micro calculated both hot and cold start emissions per traffic link following an approach that combines COPERT 4 and ARTEMIS project, respectively. 


Results



CO - VOC

NOx - CO2

Contribution Of Cold Start To Overal Emissions



Conclusions



  • 18% and 15% of the daily total CO and VOC road transport emissions in Athens are due to cold start, whereas the corresponding percentage for NOx and CO2 emissions is 7% and 2% respectively.
  • In specific traffic links, which are closer to locations where the majority of trips start, the contribution of cold start emissions is dominant, thus significantly affecting local air quality.
  • Specific cold start allocation modelling activities to road networks have to be developed to correctly allocate the cold start impact, in particular for local hot-spots.


Downloads



Download

The file is in PDF format.

Wednesday, 26 March 2014

Calling A FORTRAN DLL From Excel & VBA


Introduction



According to Wikipedia: “FORTRAN (derived from FORmula TRANslating System) is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing. Originally developed by IBM in New York City in the 1950s for scientific and engineering applications, FORTRAN came to dominate this area of programming early on and has been in continuous use for over half a century in computationally intensive areas such as numerical weather prediction, finite element analysis, computational fluid dynamics, computational physics and computational chemistry. It is one of the most popular languages in the area of high-performance computing and is the language used for programs that benchmark and rank the world's fastest supercomputers”.

Only the above paragraph is probably not enough to describe the importance of FORTRAN language on engineering and scientific world. Literally, thousands lines of FORTRAN code have been written the last 50+ years from several developers throughout the world. And, now, the big question is: why not take advantage of the code already written in FORTRAN and use it from Excel/VBA? Is it possible to do that?

Well, I have some good news, the answer is YES!  So, in this post I will try to provide you some insights about how to do it. In short, the idea is to build a Dynamic-link library (DLL) file that will include the necessary FORTRAN functions and subs, and, then, call these functions/subs (DLL file) from VBA.



FORTRAN Code



The first step on this tutorial is to build the DLL file. I used the FORTRAN code that you will find below; the FRICTIONFACTOR function is actually a FORTRAN version of an old VBA function that I developed some years ago. By the way, sorry for the uppercase in the code, but it is an old habit that I acquired when I was writing the FORTRAN code for my M.Sc. thesis.

FUNCTION  FRICTIONFACTOR (ROUGHNESS, DIAMETER, VELOCITY,VISCOSITY)
    !DEC$ ATTRIBUTES DLLEXPORT:: FRICTIONFACTOR

    !-----------------------------------------------------------------------------
    !Calculates the friction factor of a pipe using Churchill's equation (1977).
    !This equation is valid for all types of flows (from laminar to turbulent).
    !
    !Written by:    Christos Samaras
    !Date:          21/03/2014
    !e-mail:        xristos.samaras@gmail.com
    !site:          http://www.myengineeringworld.net
    !-----------------------------------------------------------------------------

    IMPLICIT NONE

    !Declaring the necessary variables.
    REAL*8::  FRICTIONFACTOR,ROUGHNESS, DIAMETER, VELOCITY, VISCOSITY ,REYNOLDS, A, B, C, D

    !Calculate the Reynolds number.
    REYNOLDS = (DIAMETER * VELOCITY) / VISCOSITY

    !Calculate the intermediate variables A and B.
    A=((2.457 * LOG(1. / ((ROUGHNESS / (3.7 * DIAMETER)) + ((7. / REYNOLDS) ** 0.9)))) ** 16)
    B = (37530. / REYNOLDS) ** 16.

    !Apply the equation.
    FRICTIONFACTOR = 8. * ((((8. / REYNOLDS) ** 12.) + ((A + B) ** (-3./2.))) ** (1./12.))
    
    RETURN

END FUNCTION FRICTIONFACTOR

SUBROUTINE DOUBLEARRAY (ELEMENTS, INARRAY, OUTARRAY)
    !DEC$ ATTRIBUTES DLLEXPORT:: DOUBLEARRAY

    !---------------------------------------------------------------------
    !Receives as input a one-dimensional array and it doubles tis values.
    !
    !Written by:    Christos Samaras
    !Date:          23/03/2014
    !e-mail:        xristos.samaras@gmail.com
    !site:          http://www.myengineeringworld.net
    !---------------------------------------------------------------------
    
    IMPLICIT NONE
    
    !Declaring the necessary variables.
    INTEGER*4, INTENT(IN) :: ELEMENTS
    INTEGER*4, INTENT(IN) :: INARRAY(ELEMENTS)
    INTEGER*4, INTENT(OUT) :: OUTARRAY(ELEMENTS)
    INTEGER*4:: I
    
    !Loop through all the elements of the array and double their value.
    DO I = 1,ELEMENTS
        OUTARRAY(I) = 2*INARRAY(I)
    ENDDO

    RETURN

END

Important notes

1. In order to build the DLL file I used the old Compaq Visual Fortran (version 6.6) compiler. I am sure that you can find a much more recent compiler (for example an Intel Fortran Compiler).

2. Be careful of the attributes required for the DLL export, otherwise the FORTRAN functions/subs will not be “visible” from VBA:
!DEC$ ATTRIBUTES DLLEXPORT:: FRICTIONFACTOR
!DEC$ ATTRIBUTES DLLEXPORT:: DOUBLEARRAY
The above lines might be slightly different for your compiler, but in any case must be included in the code (as comments).

3. Be aware of DLL dependencies. If the DLL file is going to be used in other computers (that haven’t the same FORTRAN compiler installed), ensure that is “independent”. For example, to achieve this in Compaq Visual Fortran I had to go to Project -> Settings -> Fortran tab -> select Libraries from the dropdown menu Category, select the Single-Threaded from the Use run time library dropdown menu, and, finally, press the OK button (see the picture below). Otherwise, the DLL file that the compiler built required the MSVCRTD.dll file in order to run. You can check all the DLL dependencies using a great freeware tool called Dependency Walker.

Single-Threaded Library



VBA code



And here is the VBA code that “calls” the compiled FORTRAN code from the MySamble.dll file.

Option Explicit
Option Base 1

'---------------------------------------------------------------------------
'This module contains two examples of calling a FORTRAN dll from Excel/VBA.
'The first one uses a FORTRAN function straight from the worksheet,
'while the second one calls a FORTRAN sub from a VBA sub.

'Written by:    Christos Samaras
'Date:          25/03/2014
'e-mail:        xristos.samaras@gmail.com
'site:          http://www.myengineeringworld.net
'---------------------------------------------------------------------------
                
'Declaring the function and the sub from dll file.
'NOTE: if the dll file is NOT in the same folder with the workbook, use its full path instead. Example:
'Public Declare Function FRICTIONFACTOR Lib "C:\Users\Christos\Desktop\MySample.dll"
Public Declare Function FRICTIONFACTOR Lib "MySample.dll" _
                            (ROUGHNESS As Double, _
                            DIAMETER As Double, _
                            VELOCITY As Double, _
                            VISCOSITY As Double) As Double

Public Declare Sub DOUBLEARRAY Lib "MySample.dll" _
                        (ELEMENTS As Long, _
                        INARRAY As Long, _
                        OUTARRAY As Long)

Sub CallDoubleArray()

    'Declaring the necessary variables.
    Dim i           As Long
    Dim LastRow     As Long
    Dim ArrayIn()   As Long
    Dim ArrayOut()  As Long
             
    'Activate the Sub sheet and find the last row.
    With Sheets("Sub")
        .Activate
        LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
    End With
    
    'If there is at least one value proceed.
    If LastRow >= 4 Then
    
        'Resize the arrays.
        ReDim ArrayIn(1 To LastRow - 3)
        ReDim ArrayOut(1 To LastRow - 3)
    
        'Populate the input array.
        For i = 4 To LastRow
            ArrayIn(i - 3) = ActiveSheet.Range("B" & i)
        Next i
    
        'Call the FORTRAN Sub.
        Call DOUBLEARRAY(LastRow - 3, ArrayIn(1), ArrayOut(1))
    
        'Pass the results back into sheet.
        For i = 4 To LastRow
            ActiveSheet.Range("D" & i) = ArrayOut(i - 3)
        Next i
    
    Else
    
        'Empty column, inform the user.
        MsgBox "Please enter at least one value on B column and retry!", vbExclamation, "No data"
        ActiveSheet.Range("B4").Select
    
    End If

End Sub

Important notes

1. It is essential to call the function/sub included on the DLL file using the correct data type. Here is a short list of FORTRAN data types, along with the corresponding VBA/VB 6.0 data types.

FORTRAN data types      VBA/Visual Basic data types
----------------------  --------------------------------
INTEGER*2               Integer
INTEGER*4               Long
REAL                    Single
REAL*4                  Single
DOUBLE PRECISION        Double
REAL*8                  Double
LOGICAL*2               Integer
LOGICAL*4               Long
CHARACTER*n             String*n (Passed ByVal) 

2. Note the use of Option Base 1 in the beginning of the code.
Contrary to VBA, arrays in FORTRAN are NOT zero-based, so we use this expression in order to avoid array sizing problems between the two languages.

3. In order to avoid calling the DLL file using its full path I used the following workbook open event, which changes the current directory to the folder where the workbook is located:

Private Sub Workbook_Open()

    ChDir (ThisWorkbook.Path)
    Application.CalculateFull

End Sub

If the DLL file is NOT in the same folder with the workbook, use its full path. For example:

Public Declare Function FRICTIONFACTOR Lib "C:\Users\Christos\Desktop\MySample.dll"

4. The second example (with the sub), although might looks trivial, it actually shows you how to transfer arrays between VBA and FORTRAN. Note that in the following line we use the first element of each array:

Call DOUBLEARRAY(LastRow - 3, ArrayIn(1), ArrayOut(1))


Epilogue



FORTRAN is not a dead/outdated programming language. It’s still being used by many developers/scientists/engineers. My suggestion is to take advantage of the code already written in FORTRAN and don’t re-inventing the wheel. I know that the mixing of FORTRAN and VBA is probably a little advanced topic, but the above example, along with the side notes will help you overcome many of the obstacles that you will find on your way.



Downloads



Download

The zip file contains a f90 file with the sample FORTRAN code, the DLL file and a workbook with the VBA code. The Excel file can be opened with Excel 2007 or newer. Please enable macros before using it.

Thursday, 13 March 2014

Add Text In AutoCAD Using Excel & VBA


Introduction



The previous week I published a VBA code for drawing circles in AutoCAD using data from an Excel workbook. Since I received several email requests from various blog readers, I decided to continue the subject of AutoCAD automation from Excel. So, below you will find a VBA code that will help you “send” text strings from Excel to a specific location in an AutoCAD drawing. The code might be extremely useful for filling information in a drawing legend (watch the demonstration video for example).

The code is based on the AddText method. According to AutoCAD VBA help, the structure of this method is the following:

RetVal = object.AddText(TextString, InsertionPoint, Height)

Where:
RetVal: Text object. The newly created Text object.
Object: ModelSpace Collection, PaperSpace Collection, Block – the objects this method applies to.
TextString: String; input-only. The actual text to be displayed.
InsertionPoint: Variant (three-element array of doubles); input-only. The 3D WCS coordinates on the drawing where the text is placed.
Height: Double; input-only. The height of the text. Must be a positive number.

The sample workbook that you will find in the Downloads section below requires three main user inputs (as the AddText method): the coordinates of the insertion point (in X, Y, Z) – in other words, where you want the newly created text to be inserted, the text height (like font size) and the text message that should be displayed in the drawing. Then, by clicking the “Add Text" button the text is inserted either in the active drawing (if AutoCAD is already lunched), or in a newly created drawing. If you like to insert an Excel range as a table in AutoCAD then use the (freeware) ERTAT add-in.



VBA code



Similar to the circle case, almost half of the code is used to initialize the AutoCAD object, as well as the active/new drawing object.

Option Explicit

Sub AddText()

    '--------------------------------------------------------------------------------------------------
    'Adds text in AutoCAD using data - insertion point, text height and text message - from Excel.
    'The code uses late binding, so no reference to external AutoCAD (type) library is required.
    'It goes without saying that AutoCAD must be installed at your computer before running this code.
    
    'Written by:    Christos Samaras
    'Date:          07/03/2014
    'e-mail:        xristos.samaras@gmail.com
    'site:          http://www.myengineeringworld.net
    '--------------------------------------------------------------------------------------------------
        
    'Declaring the necessary variables.
    Dim acadApp                 As Object
    Dim acadDoc                 As Object
    Dim acadText                As Object
    Dim LastRow                 As Long
    Dim i                       As Long
    Dim InsertionPoint(0 To 2)  As Double
    Dim TextHeight              As Double
    Dim myText                  As String
    
    'Activate the coordinates sheet and find the last row.
    With Sheets("Coordinates")
        .Activate
        LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
    End With
        
    'Check if there are coordinates for at least one text message.
    If LastRow < 2 Then
        MsgBox "There are no coordinates for the insertion point!", vbCritical, "Insertion Point Error"
        Exit Sub
    End If
    
    'Check if AutoCAD application is open. If is not opened create a new instance and make it visible.
    On Error Resume Next
    Set acadApp = GetObject(, "AutoCAD.Application")
    If acadApp Is Nothing Then
        Set acadApp = CreateObject("AutoCAD.Application")
        acadApp.Visible = True
    End If
    
    'Check (again) if there is an AutoCAD object.
    If acadApp Is Nothing Then
        MsgBox "Sorry, it was impossible to start AutoCAD!", vbCritical, "AutoCAD Error"
        Exit Sub
    End If
    On Error GoTo 0
    
    'If there is no active drawing create a new one.
    On Error Resume Next
    Set acadDoc = acadApp.ActiveDocument
    If acadDoc Is Nothing Then
        Set acadDoc = acadApp.Documents.Add
    End If
    On Error GoTo 0

    'Check if the active space is paper space and change it to model space.
    If acadDoc.ActiveSpace = 0 Then '0 = acPaperSpace in early binding
        acadDoc.ActiveSpace = 1     '1 = acModelSpace in early binding
    End If
         
    'Loop through all the rows and add the corresponding text in AutoCAD.
    With Sheets("Coordinates")
        For i = 2 To LastRow
            'Set the text height and the text message.
            TextHeight = .Range("D" & i).Value
            myText = .Range("E" & i).Value
            'If the height is greater than 0 and the message is not empty, add the text.
            If TextHeight > 0 And myText <> vbNullString Then
                'Set the insertion point.
                InsertionPoint(0) = .Range("A" & i).Value
                InsertionPoint(1) = .Range("B" & i).Value
                InsertionPoint(2) = .Range("C" & i).Value
                'Add the text.
                Set acadText = acadDoc.ModelSpace.AddText(myText, InsertionPoint, TextHeight)
            End If
        Next i
    End With
    
    'Zoom in to the drawing area.
    acadApp.ZoomExtents
    
    'Release the objects.
    Set acadText = Nothing
    Set acadDoc = Nothing
    Set acadApp = Nothing
    
    'Inform the user about the process.
    MsgBox "The text was successfully added in AutoCAD!", vbInformation, "Finished"

End Sub

Note that if you have AutoCAD 2010 or a newer version, you will have to download and install the VBA module, otherwise the code will probably fail. 
All links were copied from the Autodesk's website.



Demonstration video



The short video below demonstrates the result of the above VBA code. Seven lines of text are inserted in the legend of this sample drawing.




Downloads



Download

The file can be opened with Excel 2007 or newer. Please enable macros before using it.



Read also



Drawing Circles In AutoCAD Using Excel & VBA
Draw A Polyline In AutoCAD Using Excel VBA
Draw A 3D Polyline (Pipe-Like) In AutoCAD Using Excel & VBA
Excel Range To AutoCAD Table Add-In

Wednesday, 5 March 2014

Drawing Circles In AutoCAD Using Excel & VBA


Introduction



The idea of drawing objects in AutoCAD by using Excel data has been analyzed several times in this blog. We have seen how to draw polylines, 3D polylines, as well as tables, so, today we will learn how to draw circles. To tell you the truth, the code below was developed as a response to the various requests that I have received the last few weeks from blog readers, as well as from Youtube users.

The code is based on the AddCircle method. According to AutoCAD VBA help, the structure of this method is the following:

RetVal = object.AddCircle(Center, Radius)

Where:
RetVal: Circle object. The newly created Circle object.
Object: ModelSpace Collection, PaperSpace Collection, Block – the objects this method applies to.
Center: Variant (three-element array of doubles); input-only. The 3D WCS coordinates specifying the circle's center.
Radius: Double; input-only. The radius of the circle. Must be a positive number.
Remarks: This circle is created on the XY plane of the WCS.

The sample workbook that you will find in the Downloads section below requires two main user inputs: the coordinates of the circle center (in X, Y, Z) and the circle radius. Then, by clicking the “Draw Circle(s)" button the circles are being drawn either in the active drawing (if AutoCAD is already lunched), or in a new drawing. If you run the workbook with the sample data, 5 circles will be drawn in AutoCAD, which will look like the Olympic Games logo (a small tribute to the Winter Olympics that finished the previous month).



VBA code



The code is actually a loop; almost half of it is used for initializing the AutoCAD object, as well as the active/new drawing.

Option Explicit

Sub DrawCircles()

    '--------------------------------------------------------------------------------------------------
    'Draws circles in AutoCAD using data - circle center coordinates and circle radius - from Excel.
    'The code uses late binding, so no reference to external AutoCAD (type) library is required.
    'It goes without saying that AutoCAD must be installed at your computer before running this code.
    
    'Written by:    Christos Samaras
    'Date:          04/03/2014
    'e-mail:        xristos.samaras@gmail.com
    'site:          http://www.myengineeringworld.net
    '--------------------------------------------------------------------------------------------------
        
    'Declaring the necessary variables.
    Dim acadApp                 As Object
    Dim acadDoc                 As Object
    Dim acadCircle              As Object
    Dim LastRow                 As Long
    Dim i                       As Long
    Dim CircleCenter(0 To 2)    As Double
    Dim CircleRadius            As Double
    
    'Activate the coordinates sheet and find the last row.
    With Sheets("Coordinates")
        .Activate
        LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
    End With
        
    'Check if there are coordinates for at least one circle.
    If LastRow < 2 Then
        MsgBox "There are no coordinates to draw a circle!", vbCritical, "Circle Center Error"
        Exit Sub
    End If
    
    'Check if AutoCAD application is open.
    On Error Resume Next
    Set acadApp = GetObject(, "AutoCAD.Application")
    
    'If AutoCAD is not opened create a new instance and make it visible.
    If acadApp Is Nothing Then
        Set acadApp = CreateObject("AutoCAD.Application")
        acadApp.Visible = True
    End If
    
    'Check (again) if there is an AutoCAD object.
    If acadApp Is Nothing Then
        MsgBox "Sorry, it was impossible to start AutoCAD!", vbCritical, "AutoCAD Error"
        Exit Sub
    End If
    On Error GoTo 0
    
    'If there is no active drawing create a new one.
    On Error Resume Next
    Set acadDoc = acadApp.ActiveDocument
    If acadDoc Is Nothing Then
        Set acadDoc = acadApp.Documents.Add
    End If
    On Error GoTo 0

    'Check if the active space is paper space and change it to model space.
    If acadDoc.ActiveSpace = 0 Then '0 = acPaperSpace in early binding
        acadDoc.ActiveSpace = 1 '1 = acModelSpace in early binding
    End If
         
    'Loop through all the coordinates/radius and draw the corresponding circle(s).
    With Sheets("Coordinates")
        For i = 2 To LastRow
            'Set the circle radius.
            CircleRadius = .Range("D" & i).Value
            'If the circle radius is greater than 0, get the circle center and draw the circle.
            If CircleRadius > 0 Then
                'Set the circle centert.
                CircleCenter(0) = .Range("A" & i).Value
                CircleCenter(1) = .Range("B" & i).Value
                CircleCenter(2) = .Range("C" & i).Value
                'Draw the circle.
                Set acadCircle = acadDoc.ModelSpace.AddCircle(CircleCenter, CircleRadius)
            End If
        Next i
    End With
    
    'Zoom in to the drawing area.
    acadApp.ZoomExtents
    
    'Release the objects.
    Set acadCircle = Nothing
    Set acadDoc = Nothing
    Set acadApp = Nothing
    
    'Inform the user about the process.
    MsgBox "The circle(s) was/were successfully drawn in AutoCAD!", vbInformation, "Finished"

End Sub


Demonstration video



The short video below demonstrates the result of the above VBA code; 5 circles are drawn in a new AutoCAD drawing based on sample data from the Excel workbook.




Downloads



Download

The file can be opened with Excel 2007 or newer. Please enable macros before using it.



Read also



Add Text In AutoCAD Using Excel & VBA
Draw A Polyline In AutoCAD Using Excel VBA
Draw A 3D Polyline (Pipe-Like) In AutoCAD Using Excel & VBA
Excel Range To AutoCAD Table Add-In 

Wednesday, 26 February 2014

Excel Art Attack


Introduction



You probably already know that Excel is a great tool for developing financial/engineering, as well as other spreadsheet applications. In this blog for example several freeware applications have been published, demonstrating various – obvious and not so obvious – capabilities of Excel. But, what about art? Is it possible to create art in Excel? Unconsciously and spontaneously, most people will say NO; Excel was not designed and developed for art.

If you agree with the last statement, then, after reading this post, you might reconsider your thoughts! It seems that art can be created in Excel!!! Below you will find a collection of several pictures, videos and workbooks that show the artistic side of Excel. Probably the phrase “spreadsheet artists” is the most appropriate to describe these people.



Paintings/pictures



Tatsuo Horiuchi

What words can describe the work of Mr. Horiuchi? Amazing, awesome, beautiful and astonishing! The 74 years-old Japanese artist (born in 1940) started experimenting with Excel at around 2000, just before his retirement. He wanted a new challenge in his life, so, he bought a computer and started working with Excel. In 2006, he took the first place at Excel Autoshape Art Contest and he continued to create “Excel paintings” since then. Below you will find 8 of his paintings. More Excel paintings of Mr. Horiuchi can be found here, here and here.

Tatsuo Horiuchi 1

Tatsuo Horiuchi 2

Tatsuo Horiuchi 3

Tatsuo Horiuchi 4

Tatsuo Horiuchi 5

Tatsuo Horiuchi 6

Tatsuo Horiuchi 7

Tatsuo Horiuchi 8

If you don’t believe that the above paintings were made in Excel you can download two sample workbooks (Cherry Blossoms at Jogo Castle and Kegon Falls) from the Downloads section below and see with your own eyes the impressive work of Mr. Horiuchi.


Various artists

Apart from the amazing Mr. Horiuchi, there are several artists who have published several beautiful “Excel paintings”, most of which are related with video games. Before each picture you will find a link that will transfer you to the Devinatart page of the corresponding artist.


8bit Robot Battle - Excel


Darth Vader - Excel


Giratina - Excel


Kos-Mos - Excel


Laharl - Excel


Mega Man II - Excel


Pikachu - Excel


X-Wing - Excel

Bonus video: creating an anime character in Excel!




Animations/videos



Apart from shapes, some kind of art can be created by combining various chart types with some VBA code. In general, an animation effect can be easily created in Excel. The Youtube trailer of this blog for example was created by a quite simple VBA code. For really impressive animations just watch the following videos:






The above videos – and the corresponding workbooks – can be found on two really interesting sites, Engineers-Excel and Excel Unusual. The workbooks can be also downloaded from the Downloads section below.

Bonus material: a great collection of quite unusual - but still beautiful - charts can be found in this site.



Epilogue



Art can be found everywhere, even in a typical Excel spreadsheet. The creativity, inspiration and imagination of some people can really do wonders, even in Excel. So, Excel is not just rows and columns! If you have other examples of Excel art feel free to post them in the comments.

PS: the title of this post was inspired by an old TV show called Art Attack!



Downloads



Download

The zip file contains a collection of several workbooks that contain paintings and animations. Note that the copyrights of these workbooks belong to their creators. Look inside the workbooks for more information.