There are a batch of CAD charts, including the road center line and planned plot data. The road center must contain text labels and each road must contain a road name text. A plan plot also needs to contain a label, and a plan plot has a label.
Data such:
Check whether the data meets the standards, and the data standards may be inconsistent. For example, the road center line of A is on the ZX layer, and the B is on the zxx layer. Follow the previous practices to open vs, create a project, introduce esri dll, and then a painful coding + debugging process.
Next I will explain how to use arctoolbox to complete this task. First, we need to complete the following steps:
- Open a CAD file
- Road center line will be recognized
- Road Center Line Buffer
- Recognize text notes
- Note on using road buffer to determine falling into the buffer zone
- Generate result table
Specific operations:
- Add a variable and set the data type to CAD Drawing dataset.
- Identify road center line:
1) Add the Select data tool and set the child data element to "polyline ". Set as Model Parameter
2) Add the make layer tool to set inputfeatures to the polyline data selected from the CAD file.
3) because the layers on the road center line are uncertain, You need to modify them in real time. Add the variable, set the type to string, change the name to "road center line layer name", and set it to model parameters. Make layer tool's express select this variable
- Road Center Line Buffer
1) Add the buffer tool and set the input features to be equal to the recognized road center line.
2) set the output path
3) set buffer parameters: Right-click the buffer tool and make variable -- from parameters -- distance. Set as Model Parameter
- Recognize text notes
Operation similar to Road Center Line Identification
- Spatial Relationship judgment
1) Add the sptial join tool and set taget features as the result data after the road center line is buffered;
2) set join feautres as the annotation layer data.
3) select one-to-one for join operation.
4) set the result Field
- Generate result table
1) Add Table select Tool
2) Set expression to join_count <> 1 (only data that does not conform to the standard is saved in the result table)
The created model is as follows:
Double-click the running interface, as shown in the following figure:
Check Results:
- as you can see, blue is the data that meets the standard, and its colors do not comply with the standard.
1) One path name follows multiple Text Standards.
2) No path name is marked.
- the check result table only records the CAD entity handle that does not conform to the standard elements. The check result table can be provided to the data processing personnel for convenient data modification.