Portal Home > Knowledgebase > CityCAD Online Help > Exchanging information > Importing files > Importing DXF models


Importing DXF models




There are three ways you can import DXF information:

Overview of DXF Import Options

 

DXF Base Map

DXF City Item

DXF to URB

Recommended uses Importing OS base maps, contour maps or other geometry to be 'traced' over with CityCAD routes.

Adding 3D objects to enhance the visualization - street furniture, buildings.

Adding whole blocks or masterplans that have already been worked up in detail. You can import a CAD model which will be automatically broken up into City Items and each placed directly into your model at the correct positions relative to each other.

Importing a network of route centrelines or building outlines, which will be converted into CityCAD routes.
How many can I import? Several DXF base maps can be imported. You can import any number of DXF files into your library, and then assign them to any City Item in your model. You import one DXF CAD model at a time. After each import, the lines become CityCAD routes in your model. You can repeat this several times to add new routes.
Snap to DXF? Yes - you can snap to DXF Base Maps and adjust the snap tolerance in the Snaps Preferences) No - if you are drawing routes in CityCAD they will not snap to anything on a City Item. The lines become CityCAD routes with nodes at each end, and you can snap to them in the normal way.
3D Faces? No - wireframe model only imported. (Although 3D lines will be displayed in 3D) Yes - faces and lines imported. No - lines are converted into CityCAD routes.
Layer Control? Yes - you can switch visibility of layers on and off once it is imported. Yes - you can switch visibility of layers on and off once it is imported. You can choose which layers to import, but once they are imported and converted to CityCAD routes they will no longer have layer information.
Can be moved? No - although you can remove a base map and then re-import it at a different location. Yes - you can move, rotate, cut, copy and paste City Items. Yes - the DXF lines are imported and converted to CityCAD elements which you can then move, copy and modify as required.

Import DXF Base Map

To import a DXF base map, either:

  • Click the Import button on the Standard Toolbar and select 'DXF Base Map...' or ...
  • Select File Menu: Import: DXF Base Map...

The DXF Import dialog will then appear with the 'Add DXF Base Map' tab selected:

{image}

At the top, you can use the tabs to switch between the three modes of DXF import

Base Maps

In this window, the Base Maps grid displays which DXF Base Maps have been imported into your city model.

  • You can add new base maps by clicking 'Add New Base Map'
  • You can remove base maps by selecting them in the grid and clicking 'Delete Base Map'
  • You can reload the DXF base map by clicking the 'Reload Base Map' button.
  • You can adjust the visibility and colour of each base map by using the controls in the grid.

Adding New DXF Base Maps

If you click 'Add New Base Map', then a dialog will appear where you can select a DXF file to import. Once you have selected it, then the DXF Import dialog appears:

{image}

  • The top panel ('Add DXF Base Map') displays information about the file you are importing, and allows you to select which layers to import. By default, all layers are selected.
  • Click the drop-down menu next to 'Select Layers' to select which layers you want to import. You can also click the buttons to the right to select All or None of the layers. Once you have selected the layers you require, the total number of importable elements is displayed below. CityCAD can import lines, polylines, arcs, circles and ellipses. Other objects cannot be imported in a base map.

Select Insertion Point panel

This controls where the DXF Base Map will be located in your CityCAD model. There are three ways of doing this:

  • Click 'Auto Position' to automatically place the objects in the DXF file near the zero point of your CityCAD model.
  • Click 'Reset to Zero' to map the zero point of the dxf file to to the zero point of the CityCAD model.
  • Enter exact coordinates to locate a specific point in your DXF file to a specific point in your CityCAD model.

Scale Panel

This controls the scale of the DXF base map being imported.

You can type in a scale factor to be used when importing the DXF information. For example, if you type '2', then the drawing units will be scaled down by a factor of 2. The higher the number, the smaller the DXF file will be when it is imported. (The size of one unit in the DXF file in relation to a drawing unit in the CityCAD model is displayed in brackets for reference)

Hint

The longest element in the DXF layers is displayed for reference and this can sometimes be a helpful reminder of what units the DXF file is in.

For example, if the longest element is 114, then it might possibly be a map file with roads in metres. However, If the longest element is 114000, then this might suggest the DXF file is a survey drawn in millimetres.

Advanced Import Settings

These allow you to refine the way that DXF geometry is interpreted when it is imported into the CityCAD model. If you check the 'Flatten 3D Model' check box, then the z-coordinate of all points will be set to zero.

When arcs and other curved lines are imported into CityCAD, they are broken up into several smaller straight lines.

  • As described by the diagram, 'Arc Tolerance' is the minimum deviation allowed between the line of the true arc and any point on one of the straight sections.
  • 'Arc Min Segment Length' is the minimum length of a straight section.
  • 'Small Geometry Filter Snap Tolerance' - if any points in the DXF model are less than the distance set here, then they will be snapped together. This can be useful if lines in a DXF model do not match up exactly.

Click 'Reset' to restore original defaults, 'Cancel' to exit without importing the DXF file, and 'Import' to proceed to import the DXF file.

The file will then appear in the Base Maps Grid.

Import DXF City Item

To import a DXF City Item, either:-

  • Click the Import button on the Standard Toolbar and select 'DXF City Item...'
  • Select File Menu: Import: DXF City Item...

The DXF Import dialog will then appear with the 'Add DXF City Item' tab selected:

{image}

You can use this to create and manage your own library of DXF models which can be applied to City Items in your models.

There are two libraries:

  • My DXF Library - these are models that are stored with your configuration files (ie. 'embedded' or 'permanent' files). They are specific to your PC and will be available to add to any file you create or open.
  • File DXF Library - these are models that are stored with the current CityCAD file (ie. 'file-specific' or 'temporary' files). If you use a model from 'My DXF Library' in the current file, then a copy of the model will be automatically saved with the file.

All the models in each library is available in the Type menu in the General group of the City Item Properties panel.

When a model is used from 'My DXF Library', a copy of that model will be saved within the file so that if you send the file to someone else, the model will be visible.

For this reason, the same model may appear twice in the 'Type' menu - the first will be the model in your 'My DXF Library', and subsequent copies will be in the 'File DXF Library'.

When you delete a model from 'File DXF Library', if any models exist in your model they will be deleted. If a model is saved with the file (in the 'File DXF Library') but there are no instances of it ie. no City Items which use that model, then you can click 'Purge All' to remove these from the file to save memory. Please use this carefully as it means that if you send the file to someone else who does not have that model in their 'My DXF Library', then they would not be able to add that item to the model.

Auto-Import CAD Model

This option allows you to quickly import a CAD model and place it in the model at specific coordinates. Blocks (DXF blocks, not CityCAD blocks) will be detected in the DXF file and you can choose whether to import the whole model as one City Item, or import each DXF block as a separate city item.

{image}

Controls

  • Add New Model - you can browse for a DXF file and it will be imported into the library. By default, the filename will become the name of the model, although you can change this after it is imported.
  • Update from File - this allows you to over-write a model in your library with a DXF file. Please note that this may change the appearance of City Items in your model.
  • Add to File/My DXF Library - this creates a copy of the selected model in the other library. For example, you can use this if you want to extract a model from a file and place it in your permanent library to be used in other models.
  • Delete - this will delete the file, and will also delete any City Item which uses it.

DXF City Item Grids

  • Name - this will be displayed in the 'Type' menu in the City Item Properties panel.
  • No. in Model - this displays the number of City Items in your current CityCAD model which are using this DXF model.
  • Visibility - you can use this drop-down menu to choose which layers are visible in the model.
  • Line Visibility - check this box if you would like line information to be displayed as well as faces.
  • Stops Isovists - check this box if you would like the City Item to block isovists (if the object is a building then you may want to check this box. If the object is a lamp-post or similar smaller object, then you might want to de-select this so that it doesn't affect the isovists.
  • Base Point - you can adjust the 'base point' of each instance of the model. This is the coordinates of the point in the DXF file which defines where the object is located in the CityCAD model.

When setting the base point, you have four options:

{image}

  • Enter specific coordinates
  • Click 'Zero' to use the zero point of the dxf file.
    {image}
  • Click the middle 'Auto Position' button to place the base point at the south-west corner of a bounding box around the DXF City Item geometry.
  • Click the right 'Auto Position' button to place the base point at the centre of the bottom surface of the bounding box around the DXF City Item geometry.
  • Scale - enter a scale factor. To reduce the size of the object by a scale factor of 2, enter '2' in this column.

Click 'OK' to exit the window.

Import DXF to URB

Caution

This is a more complex procedure than the other two methods of importing DXF files, and may require some experimentation to import successfully.

Please note this feature will only convert 3D lines from a DXF file into CityCAD Routes, and create default blocks in any areas which are enclosed by those routes. It will not interpret any 3D geometry in the model into CityCAD blocks.

To import a DXF file and convert it to URB, either:

  • Click the Import button on the Standard Toolbar and select 'DXF to URB...' or
  • Select File Menu: Import: DXF to URB...

The DXF Import dialog will then appear with the 'Import DXF to URB' tab selected.

{image}

Import DXF as Routes panel

  • The top panel ('Import DXF as Routes') is where you can choose which file and which layers to import. Click the 'Browse' button to select a DXF file to import.
  • Click the drop-down menu next to 'Select Layers' to select which layers you want to import. You can also click the buttons to the right to select All or None of the layers. Once you have selected the layers you require, the total number of importable elements is displayed below. CityCAD can import lines, polylines, arcs, circles and ellipses. Other objects cannot be converted into CityCAD routes.
  • Convert Lines to Route Type - choose what type of CityCAD Route the lines in the DXF file will be converted to.
  • Create Block Type - if the routes enclose any areas and a block is created, this controls the type of block which will be created. You can choose from any block settings combination in the Settings Library

Avoiding Glitches

{image}

  1. Please make sure the the route type you have selected is appropriate for the information you want to import.
  2. Most CityCAD Route types are several metres wide, but DXF lines that are imported could be only a few centimetres long. If DXF lines are imported which are very short relative to the width of the route type, then the you may experience glitches. This is because there may not enough room to construct kerbs at the corners of the roads.
  3. If nodes are a reasonable distance apart (more than about 10m or so), then a normal street type such as 'Small Residential Street' can normally be used. To avoid problems, set the Small Geometry filter to a higher level, such as 5 or 10m.
  4. If in doubt, try using 'Boundary Routes' when importing blocks, and then change them into larger routes as required.
  5. If you want to import the outlines of buildings, then we recommend you select 'Boundary Route' as the Route Type. You may find it easier to select 'Open Space Block' in the 'Create Block Type' control, as these can be easier to see on the ground. Once the blocks are created, you can then click on them and set the properties as required.

Select Insertion Point panel

Line information in the DXF file will be converted into CityCAD routes. This panel controls where those routes will be located in your CityCAD model. There are three ways of doing this:

  • Click 'Auto Position' to automatically place the objects in the DXF file near the zero point of your CityCAD model.
  • Click 'Reset to Zero' to map the zero point of the dxf file to to the zero point of the CityCAD model.
  • Enter exact coordinates to locate a specific point in your DXF file to a specific point in your CityCAD model.

Scale Panel

This controls the scale of the DXF line information being imported.

Advanced Import Settings

These options are the same as when importing a DXF base map (above)

Click 'Reset' to restore original defaults, 'Cancel' to exit without importing the DXF file, and 'Import' to proceed to import the DXF file and convert it to CityCAD Routes.

Hint

If you find that you cannot easily draw the geometries you want in CityCAD, then you can use your normal CAD program to draw route centrelines, and then import them into CityCAD as a DXF file.

{image}



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Importing data (Views: 5423)
Importing images (Views: 8283)