Not so long ago I did a post and video called Civil 3D Survey Got Better. That included a brief section that employed the concept and use of a standard Survey Queries to optimize survey production tasks in Civil 3D. The goal there was to construct a quick and dynamic surface from nascent and unedited figures.
I followed up with a post and video about how to employ the Survey Preview Palette Tool to visualize your survey data without ever importing anything into a drawing. Productive magic with nothing up the sleeve. When it’s the data behind you’re watching…
Diverse or Perverse Perspectives Become Necessities
Civil 3D is good at civil engineering and survey data assessment provided you have great Style Tools and the Civil 3D skills with thrills to use them. Style makes a gargantuan difference. I confess to a certain amount of bias about Civil 3D Style tools. Prejudice doesn’t make us wrong – e.g. Gravity always sucks.
Which airs that weighty, Right Stuff and remembering John Glen question,
How Do We Make the Pig Fly?
Do you employ Survey Queries? Do you use External Survey Queries? Maybe not. Need help?
The current AutoCAD Civil 3D help on the topic is bad to terrible. In the help Autodesk’s technical writers try to explain how the procedural programmers attempted to make easy the complex beauty of the SQL language. That is sort of like trying to explain money to a four-year old or a University of Chicago theoretical economist. The lack of real world context is a serious problem.
In the Quick Surfaces video I briefly covered how to open, edit, update, and import external Survey Queries into a Survey Db. I mentioned and demoed the use but didn’t elaborate much on the concept of a Query Library. I received some reasonable Survey Query questions. Below are some hopeful and useful answers. First…
Some Survey Query Essentials
Two Queries For One
The Points section and the Figures section in the Survey Query Editor produce two basically independent queries for each of these two Civil 3D Feature types. True. Often the details of both are matched. The results of both queries are combined and previewed; shown in the appropriate Survey Editor panel; and/or created in the current drawing.
A Foreshortened Survey SQL Reality
I have never been able to find much of the following in the AutoCAD Civil 3D Help files other than some glossed over basic descriptions of dialog box content. Some important pieces and vital documentation are completely missing. If you don’t know anything about SQL, it is easy to get lost, confused, and frustrated by a Survey Query. If you are a Map 3D user and more familiar with data queries and SQL syntax you may be even more annoyed.
For everyone there are easy fixes and ways around most of the issues.
A query is constructed in the Survey Query Editor (or see below) from choosing or filling out:
- Properties - optional values that are either Point or Figure data related for By Query
All and None support no other Properties
- Operators - a prebuilt list of optional numeric and string comparison values
There is no error checking whether the selected Operator is valid for the type of data
There is no apparent data type checking – use the appropriate Operator type of the data type.
- Values – user supplied values with limited wildcard support
No SQL concatenation of strings is supported
Neither calculation or evaluation is supported in Value
- The appropriate (or inappropriate) AND/OR logic
The logical AND is the Editor default which is usually exclusive not inclusive
There is no support for NOT which alone speaks volumes.
Numeric Comparison Operators
These Operators are fairly self-explanatory for numeric and true|false Survey Db data types.
There is no separate between Operator – You must combine two separate numeric Operator entries with the order dangerous AND.
Text String Comparison Operators
The following is not in the AutoCAD Civil 3D Help files. Maybe the details were produced once then later deleted as nonsense? Set Theory is a mystical art to many.
All the text fields in the Survey Db can be searched only by SQL large text field wildcards.
Survey Db point data Description strings do not have text type number of characters limitations.
You can also tell this is true because of the use of “contains”, “starts with”, “ends with”, etc. in the Query Edit dialog box Operator pick lists.
There is no support classic text search SQL SELECT and LIKE methods and wildcards.
Typical old school AutoCAD type wildcards are NOT supported either.
Wildcards are not be necessary with common “starts with” conditions.
Remember a space(s) is a valid character in a string search. Spaces can bite or bless you.
- “_” the underscore wildcard character may be used to match any single character
- “%” the percent wildcard character may be used to match any group of characters
- The wildcards operate in predicate, suffix and mixed positions in the entered Value
Speaking of productive value - the reality of well-constructed and managed Survey Codes, Description Keys, Figure Prefix Db(s), and Point Groups should become a bit more obvious.
The answer to that most important question - “It’s in there.”
The following list of posts - most of which contain videos - should help you get your head around Survey Query basics, method and practice, and/or useful workflows in AutoCAD Civil 3D.
The Recent Survey Query Series
- Civil 3D Survey Query AddOn and Library
Contains a Shared Resource Library Shortcuts training video.
- Reprise Civil 3D Survey Sand Traps
Contains the workaround training video for some important Civil 3D Survey issues and benefits.
- Civil 3D Survey Query Name Rules
The Framework for Civil 3D Naming Conventions for Survey Queries in detail.
- Civil 3D Survey Query Essentials
Learn the basics of Civil 3D Survey Query usage and construction includes a video.
- Civil 3D Survey Data Assessment
How to preview and assess your data in a new Survey Db with a video.
- Civil 3D Survey Got Better
A fast and quick way to construct a quality control surface from Survey Db data.