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 build on the example that a Civil 3D tutorial brings, using the points-1.dwg and points.mdb files, at the end the links to download them appear.
Create Description Keys
The objective of this is to configure as Civil 3D will handle the points that we import, where they will be stored and under what criteria will be selected from the database. If we open the database, apart from the y coordinate, x, z 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 points-1.dwg file that already has layers configured for this exercise. Now in the toolbox, in the "settings" tab, select "Descriptions key Sets" and 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 as a name: "Storm" and in description "storm control points". Then we make "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 starts with POND or MHST, followed by any character will be included in the collection. We must bear in mind that this process is "case sensitive", 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 feature they have in the database. To do this, we go to the "prospector" tab and in the groups of points option we do right button, selecting "new".
We are going to create a group that we will call "storm manholes" and we will leave as Standard the style of point and labels. 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 of importing points. Once selected, you request
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 database path. 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.
In case you want to do it again, you can delete all the existing points to import them again following the steps of this exercise ..