Automating landscape plans

Once sufficient skill has been developed using CAD software like AutoCAD and IntelliCAD, many drafters want to use the power of the programming languages built into the software to develop their own applications. This is not a trivial task and requires considerable planning.

This module discusses the development of a 'project charter' (a plan) for the development of a suite of software tools which can be used to speed the development of landscape plans.

Background

The stimulus for this module came from discussions with Darrell McLeod, a landscape contractor based in Melbourne, Victoria, Australia. The charter set out below (termed pass 1) was written by us (Design Cad staff) after a telephone conversation with Darrell McLeod. The first draft of the project plan (pass 1) will be sent to Darrell for comment and review. We hope to review the draft and update it including Darrell's comments to produce a second version of the brief - pass 2. We expect that this iteration process will occur several times before we have the project plan 'bedded down' and ready to be sent to our programmers. We are essentially working as systems analysts at this stage of project definition.

The brief and charter (pass 1)

This project aims to develop a software application suite which will increase the speed and accuracy of CAD landscape plans. We want the designer to be able to visit a prospective site, note the location, soil type, microclimatic conditions etc. and then return to the office, feed this site information into a database and generate a list of plants suitable for use on the site. Thus we produce a sub-set of plant data from the master database. 

We then want to be able to draft with AutoCAD or IntelliCAD and have access to the subset of information, dragging into the CAD plan, symbols which match the characteristics of the species being inserted. Finally, the application will have a tool which will count the number of species used in the complete landscape plan and automatically generate a planting schedule as a block for inclusion into the plan. The application must have a facility to update the block information should changes be made to the species in the plan .

1. Database

Data describing the salient features of various plants used in landscape plans will need to be held in some type of database. The database must have the capacity to hold a considerable amount of information about each plant and the capacity to handle thousands of plants. 

The database will need to be a relational database, because there are some key pieces of information about each plant species which must be incorporated into a planting schedule within a CAD drawing while there is a host of other desirable (but not critical) information about the species which must also be stored. 

The key fields required to meet local council planning regulations are a code (up to 5 characters), the botanical name, the common name, the height, the expected canopy diameter and the number of instances of that plant in the design.

The favoured database is Microsoft Access because:

  • Databases developed in Access can be migrated to Microsoft's SQL database for multi user and web based access at a future time.

  • Access is a relational database. A relation will need to be built between the fields that local council requires and the myriad of other data about a particular plant species that may be required - flowering time, bark consistency, fruiting, suitability as a street tree etc. 

 Excel will not be used to hold data because it is a flat file database, not a relational database.

2. Output from the database

Once the location of design site is known and various criteria such as type of planting plan required (formal, Australian native, cottage etc.) determined, the operator will run a query which will generate a comma delimited an ASCII text file, sorted in height order, containing a list of species suitable for the design.

This text file will be used in the next phase of the application - i.e. creating the landscape plan.

3. The software tools

The software to be used to produce landscape plans will be SIACAD IntelliCAD 4. This stable version of IntelliCAD is compatible with AutoCAD 2004 and runs the AutoLISP programming language. AutoLISP will be used to create this application, because it is the simplest of AutoCAD/IntelliCAD programming languages. Our company has the AutoLISP programming skills to create an application which we will call 'planscaper' which will incorporate a run-time version of Access to generate the text file mentioned above together with a set of protected AutoLISP programs. 

We may migrate the application to Visual Basic for Applications at a later stage.

Pseudo code:

The application will be pre-loaded every time IntelliCAD is booted. A configuration file which links the database to the text file and codes is read on each start up.

Toolbar item 1: Place the plant in the landscape plan.

1. Click the first toolbar item. Nominate the size of the species that you wish to place into the plan typing a two letter code - (Tall Tree [TT], Small Tree [ST], Large Shrub [LS], Medium Shrub [MS], Small Shrub [SS], Ground Cover [GC], Climber [CL] etc.). If possible, we will provide the user with a set of toolbar options for each category of plant size - these may well be nested options on the toolbar, just like entity snap options.

The application examines the text file generated from the database and pops up the text screen and returns a list of species (and codes and canopy diameter) that meet that criteria - that height group in the text file generated by the original database query.

2. Type the code (e.g. EUCI = Eucalyptus citriodora) and the application pulls the block for that species from the block library. A particular block is drawn that typifies the plant (in this case E. citridora). This information is kept in the database and hence in the text file. The database keeps a register of the symbol to be used. The same symbol would be used for EUCI (and other Eucalypts e.g. EUSI - Eucalyptus sideroxylon - and a number of other plants would share the same block symbol). The symbols would be drawn full size in mm with an expected canopy diameter at 10 years. Each symbol has one attribute (for code) associated with it. This attribute will be a hidden attribute with pre-set value of XXXX. A layer convention proposed by the American Institute of Architects will be used - the symbol will be created on a layer L-PLNT. 

The symbol will be placed in the drawing at a scale of 1.0. 

(Version 2 of the application will vary the scale around 1.0 (by 10-15%) to get some variety in symbol diameter in the landscape plan). 

The code (EUCI in this example) is placed as a hidden attribute in the landscape plan.

The block is drawn in such a way that shadowing can be applied at a nominated sun angle for effect.

If the drafter does not wish to identify the code for the plant at this early stage, the application simply draws a circle of 'standard' diameter for the selected height. 

Toolbar item 2: Label the plant

A second AutoLISP program is run (again from the toolbar) which extracts the code data from the stored attribute and allows the drafter to position the label identifying the plan anywhere in the drawing. 

If the symbol has not been identified, the user is now given the opportunity to do so. 

This program will allow a group of circles in an adjacent  clump being labelled (say) EUCI (4 OFF).

Toolbar item 3: Apply shadowing

This AutoLISP program has already been written. provided that the plant symbol has been drawn correctly, the user can nominate a direction for the sun and a shade edge is drawn on the symbol.

Toolbar item 4: Flag those symbols not yet tagged.

This application identifies those symbols that have not yet been identified with a CODE. These will all have the hidden attribute set at XXXX.

Toolbar item 5: Extract a plant schedule.

This item interrogates the drawing, flags any symbols not yet coded and if there are none, generates a plant schedule in the form of a block. The application totals the number of each individual plants of each code and gets botanical name, common name, height, etc. from the original database text file. This information is placed as a block at the bottom of the drawing sheet. 

The application needs to be designed in such a way that it can be run again if new plants are inserted into the CAD plan. The block containing the (original) schedule would be removed each time this occurred and the new one put in its place.

4. Base information and testing

Sufficient data needs to be provided in order to develop and test the application. These data should include:

CAD Drawing sheets containing a typical schedule block with approved field data (number, code, botanical name, height etc.). 

CAD drawing of a typical landscape plan which meets specification for presentation.

Copies of CAD standard that the company works to. 

Copies of a typical database with sufficient entries >100 to enable sufficient testing.

CAD block library of tree and plant symbols.

Creating blocks for landscape design work.

Start a new drawing. 

Choose the start from scratch option.

   Make sure that to create the block in tiled model space, not paper space.

Set the layer at L-PLNT, colour BYLAYER.

Use the circle command to draw a tree.  The circle will centred on a Cartesian coordinate of 0,0 with an appropriate diameter (of course you need to be aware if you are working in meters or millimeters - we want mm). 

Place a marker in the centre of the circle as shown in the figure below. Just draw two intersecting lines. These should cross at 0,0 and be of an appropriate size.

An aside

We could have used the POINT command. However, the point will not necessarily show properly. You need to change the pdsize system variable which controls the size of the point figures (except for pdmode values of 0 and 1).  A pdsize setting of 0 generates the point at 5 percent of the graphics area height (default).

A positive pdsize value specifies an absolute size for the point figures. A negative value is interpreted as a percentage of the viewport size. The size of all points is re-calculated when the drawing is regenerated.

Set the pdsize to be 100 units. The result should be similar to that below.

  

 

To make the block, use the BLOCK command.

You are asked for a name. 

Think about naming conventions. 

The block name EUCALYPT will do for a symbol used to represent a Eucalypt. PINE, GRASSTREE, YUCCA, SOFTSHRUB, HARDSHRUB etc. are all candidates for sensible block names.

This block may represent a street tree. You may wish to call it TreeStreet because you may have another called TreeParklands (a tree with an aggressive root system). TreeTallStreet and TreeTallParklands might be better. 

Hint

Careful naming allows for greater control over the drawing at a later stage if the names are organised and easy to recall.  You can then select all blocks beginning Tree* in a design which will select all of the trees. 

You are then asked for insertion point. Make sure you select a defined geometric point. 

E.g. cen circle in this case.

Because we are using point at the centre, the insertion point could be a node. This insertion point is the anchor point when you insert a copy on the block into a different part of the drawing.

Now select entities. In our example, there are only 3 entities, the circle and the two intersecting lines.

Hit enter and the original entities disappear.

Now use the OOPS command to put them back, otherwise you will have to insert your new block back in the same position.

Now type block and ?

Your new block will be on the shelf.

The preferred option to make the block reappear is in fact not to use the OOPS command, but to use the INSERT command and paste a copy of the block into the drawing. This is a good because if every tree is inserted as a blocks it becomes a simple matter to count them at a later stage. 

Now make a new layer L-PLNT-PRESENTATION and put a more elaborate representation of the plant symbol on that layer.

L-PLNT-ELEVATION

L-PLNT-3D 

are layers which will contain much more information and lead ultimately to the creating of an 'intelligent plant symbol'. 

Multiple insert

Don't forget that the MINSERT command can be used to insert multiple copies of the same block into a drawing. This works very well in landscape use.