In many cases, contour lines are needed in a project. Plex.Earth 4 can be used to easily get contours for the area you are interested in, with 3 different methods.
Method 1: Contours automatically created after Terrain Import
Method 2: Generate Contours command
Method 3: Direct import of Contour Block
If you don't already have Plex.Earth, download your fully-functional weekly trial from here.
Method 1: Contours automatically created after Terrain Import
Step 1: Import Terrain Mesh Object
Step 2: Enable creation of Contour Lines after Import
Step 1: Import Terrain Mesh Object
To see how to import a Terrain Mesh object, click here to consult the respective tutorial.
Step 2: Enable creation of Contour Lines after Import
After the import of the terrain object is finished, the following window appears:
By clicking “YES” a contour block will be automatically created for your imported terrain mesh object. As you can see, you can set Plex.Earth 4 to remember your choice for future imports.
Method 2: Generate Contours command
If you have already imported a terrain mesh to your drawing, you can create contours using the “Generate Contours” command of Plex.Earth (you can find it on the Terrain tab). Then choose the terrain mesh your contours will be based on. The Contours Options Dialog Box will appear (see below for Contours Options Dialog Box explanations). Leave the settings to Automatic and click on “Create Contours”. After that, a contour block will be created.
Method 3: Direct import of Contour Block
Step 1: Change Terrain Options
Step 2: Import Terrain Mesh Object
Step 1: Change Terrain Options
There is another way to get contours directly in your drawing rather than importing a terrain object first. Click on the Import Terrain command of Plex.Earth and then click on the Options button. On the Terrain Options Dialog Box that appears, change the preferred Mesh Type as Contours and then click on Save Changes, as shown in the image below.
After that, proceed in importing terrain for the area of interest. That will give you contour lines directly.
Step 2: Import Terrain Mesh Object
Go ahead and import a Terrain Mesh object, as described here. Then instead of having a mesh with an applied contour block, you will directly get the Contours, as shown below:
Label Contour Lines
You can name the Contours you have created (with any of the methods are described above) by using the “Label Contours” command in the Plex.Earth ribbon (you can find it on the Terrain tab, as shown below):
After clicking Label Contours, you choose the Contour Block or Polylines you want to label. After this step, you can choose on the command line the following:
- Major Contours: Label only the Major Contour lines
- All Contours: Label all the Contour lines
- Text height: Change the Text Height of the label to be different than the predefined text heigh of AutoCAD
For the needs of this tutorial, we choose to name only the Major Contours. You can choose which contour lines you want to label, by choosing two points: all the crossed lines between the points will be labeled. Moreover, when you specify label points, you create an axis for the text, so as to define the direction in which it will appear in your drawing. You can also change the size of the text anytime from the Text Editor feature of AutoCAD. You can see this process below:
Tip: You can change the numeric format of the elevation that appears on the Labels created with Plex.Earth 4 using the following command: PXC_VAR_NUMFORMAT_ELEV. With this command, you can change the number of decimal points and the signs of the Labels. The predefined format of Plex.Earth is + 0.00;-0.00;0.00. Keep in mind that this command will affect all the numeric labels created from Plex.Earth 4 using other commands.
Contours Options Dialog Box and Customization
In “Method 2: Generate Contours command” above, we referred to the Contours Options Dialog Box. We can directly access it by typing the PXC_OPTIONS_CONTOURS command of Plex.Earth 4. The Contour Dialog Box is shown below:
Having enabled the Automatic Calculation of Contour Intervals, Plex.Earth 4 will calculate them considering the difference between the maximum and the minimum elevation of your terrain, as shown in the below table:
Height Difference |
Minor Interval |
Major Interval |
0-50 |
1 |
5 |
51-100 |
2 |
10 |
101-250 |
5 |
25 |
251-1000 |
20 |
100 |
1001-2000 |
40 |
200 |
2001+ |
100 |
500 |
With respect to the table, if contours are requested for an area with a height difference of about 90m for example, the minor contours will be created every 2m and the major contours every 10m. If you need to increase the density of the contour lines generated, you should deactivate the Automatic Calculation and customize accordingly:
- Base Elevation: Elevation from which the elevation of contours is calculated, for absolute elevations keep the value to zero
- Minor Interval: Interval between minor contours
- Major Interval: Interval between major contours
Note that if you choose a very low minor and major interval value for areas with a large elevation difference between their lowest and highest points, the time of calculating contours will increase and a heavy contour block will be created which may slow down your AutoCAD.
The predefined colors of Plex.Earth 4 contours are red for major contours and yellow for minor contours. If you want to change them, you can do it by un-ticking the “Use current layer for terrain contours” box and apply major and minor contours to layers with the desired color.
Further Customization and Tips
Below we refer to some tips to further customize your contours. Most of them are accessed only through the command line.
1) Change the predefined colors of contours: You can change the red and yellow contours by using the PXC_VAR_CONTMJR_COLOR command for major contours and the PXC_VAR_CONTMNR_COLOR for minor contours. With these commands, you will have to define the desired color through its index number.
2) Define the type of Contour lines: You can define if the contour lines will be polylines or splines by using the PXC_VAR_CONT_TYPE command. Contour lines are imported as a block, so to see the result of this command you have to explode the contour block.
3) Find the Minimum and Maximum Elevation of an imported contour block: Every time you create a Contour Block, with any of the mentioned methods above, you can access its information from the command line, as shown in the image below:
As you can see, besides the elevation information, you can also see the applied options, base elevation, minor and major interval.
4) Define Maximum Contours per Range: You can define maximum contours per range by using this command PXC_VAR_CONT_MAXPERRANGE
Feel free to contact us at support@plexscape.com for any questions you may have. Start your free trial today!