In this post we will see how to import data from an external database, although we will have to consider some extra aspects in the handling of points. We will base ourselves on the example that a Civil 3D tutorial brings, using the files points-1.dwg and points.mdb, at the end there are the links to download them.
Create Description Keys
The objective of this is to configure how Civil 3D will handle the points that we import, where they will be stored and under what criteria it will select them from the database. If we open the database, apart from the y, x, z coordinate we see the description field (DSC) contains the type of point so we want to be able to filter these points.
First we open the file points-1.dwg that already has layers configured for this exercise. Now in the tools space, in the “settings” tab, we select “Descriptions key Sets” and we right click and choose “new”.
This opens a panel where we will put the name of the set, which we will give name and description.
I am using the name "Storm" and the description "storm control points". Then we do "accept".
Now let's define how Civil 3D will handle the filter both to import the data and to select the layer where it will be stored.
We expand the set by right clicking and selecting "Edit Keys", which allows us to see the properties in panorama mode.
Here we are going to add two codes, the first one that is called POND *, here we will select that the Layer V-NODE-STRM
And the other MHST *, we will change the format to STORM MH in the second case, which would imply that this would be its label but the first one will leave it as $ *, for the description to come complete and always on the same layer.
This would imply that any point whose description begins with POND or MHST, followed by any character will be included in the collection. Keep in mind this process is "case sensitive", it implies that it is case-sensitive.
In both cases, both the style and the label style disable them. In order to control them at the point group level, which is the next thing we will do.
Finally we select the green arrow in the right corner to save the configuration.
2. Create groups of points
Now what interests us is that the imported points are grouped, in this case according to a characteristic that they have in the database. To do this, we go to the "prospector" tab and in the point groups option we right click, selecting "new".
Let's first create a group that we will call “storm manholes” and we will leave the point and labels style as Standard. Then in the match filter (raw Desc Matching) we choose MHST *, this would make all the points that have this In their description they would go to this group.
The second group we will call "Detention Point" will leave as filter POND *, always leaving Standard in the style of point and label although the latter can be done at once to the group called "_All Points".
Of course, if we see the Query Builder tab appears this we have chosen in SQL, which implies that someone who mastered this code can do more complex things.
3. Import points from the database
The most complicated thing we have done, now what comes is to import them.
Always on the prospector tab, select Points with the right mouse button and choose "Create".
This displays a panel with different options, in this case we will use the one on the far right to import points. Once selected, request us
It should be clarified that in the format you can choose other data import options such as text separated by commas, spaces and different forms of point order, x, y, z coordinates
Here we choose that the import is from an external database and then we select the path of the database. We leave the lower alternatives unselected, then ok.
The final result can be displayed by right clicking on "_all points" and choosing the zoom to full view of the points.
When the mouse pointer over the points, the tool tip shows the properties of the point, it is necessary to make a right click on each group of points and select the properties, in case of the yellow icon with an exclamation point, select The update option.
To do the exercise you can download here The dwg file With imported points.
If you want to do it again, you can delete all the existing points to import them again by following the steps in this exercise.