The Classic Template Style Collection Methods are the most common template maintenance methodologies used to produce a target of collected Style resources. Many people consider a Civil 3D Template target to be their known good and their Style management end goal. This perspective produces some unrealistic expectations.
The Civil 3D Template Targets post states that we should consider any Template Style Collection Target is a management benchmark or a waypoint in our Civil 3D implementation process. The target is neither the end goal nor the sole source of the known good. Please, review the post to understand this more productive perspective on Civil 3D templates.
Until the Civil 3D 2017 release the Classic Template Methods with their the related tools and processes were the only possible methods to employ to produce a target be that a template or a collection of resources.
The Classic Template Methods
The Classic Template Methods rely significantly upon the individual Civil 3D user being accountable to consistently follow a consistent update/upgrade process based on the overwrite of named Styles from a known good drawing resource.
Any changes to the template must be systematically applied to project drawings if begun with earlier versions of a template. See the Civil 3D Style Import and Maintenance Work post for details about a workable PDCA workflow based on functional and practical change management principals.
In practice, Civil 3D Templates maintained via the Classic Template Method are generally best created and maintained by Additive methods and processes. In other words, collections of tested Styles are assembled together after development and after mandatory testing with live Civil 3D data behind.
Project and/or publication drawings inherit a Style and Settings collection from a Civil 3D template (.dwt) file on creation.
Drag and Drop By Selection Method
The mechanics of manual Drag and Drop are simple in Civil 3D. Drag and Drop By Selection Method has been functional in Civil 3D since its inception. The experiential nuance is most apparent in where and in what order you perform the basic operation.
In Civil 3D, open both a known good resource drawing and the CURRENT drawing.
In the Civil 3D Toolspace in Master View >>Settings Tab
Drag and Drop selected Style collections or individual styles from a known good resource drawing into the CURRENT drawing and employ the overwrite option.
If we don’t know the answer the overwrite prompt in advance, we already made our first maintenance and improvement process mistake. Where is the known good?
Label Style Mechanics
For Label Style collections with Parent Styles that include Child Style collections you should first select and drag and drop the child Styles. This will also automatically and correctly import the Parent Style and preserve the Parent and Child hierarchy relationship.
AutoCAD Style Drag and Drop
We employ the AutoCAD Design Center Tools to manually add AutoCAD Style resources to targets via Drag and Drop. The AutoCAD preservation of data rule (do not overwrite what already is defined) allows us to manipulate the target results by precedence (order of entry) so long as we employ exactly the same names for the AutoCAD Style references that are referenced by following Civil 3D Styles.
Not all the nuances of AutoCAD Style resources are exposed in Design Center. For example: you can drag and drop Layers, but not Layer States. Of course, we can import Layer States manually. Therefore, Insert/Explode Method and/or AutoCAD scripting are often a more practical approach.
Civil 3D Label Styles are sensitive to the order that Expression references enter the drawing. Put another way, sometimes a Label Style that employs an Expression will break if that Expression did not exist previously in the CURRENT drawing.
For Label Style collections that may employ Expressions drag and drop these resources first or employ a Style that contains references to all of these resources prior to importing Label Styles that employ them.
- You can create an Expression container Style (an +ALWAYS IMPORT style) that includes all of the Expressions inside the text component content of a single or multiple Label Styles.
- Inside a single file you can also employ multiple named text components within the Label Style to categorize the collection of Expressions references as is necessary.
Expressions are not currently generalized in the Civil 3D Object model. Expression are specific to a type of Label Style. Therefore, we probably want standardized Expression names in use for consistency and maintenance reasons.
We want to employ the Text Component Editor and copy paste techniques from separate external files to reference the Expressions in mass as outlined above and employ +ALWAYS IMPORT Styles for Label Style collections. This makes it far easier to maintain Expression consistency and make overall improvements.
Property Set Style Definitions
We can employ Property Sets to assign and access custom properties for a particular object in Civil 3D.
Property Set Definitions like Civil 3D Label Style Expressions are sensitive to order of entrance breakage issues. We can access Property Sets in Civil 3D Label Styles and some other annotative Styles. These may fail (break) without the referenced Property Set Definition(s) available when they are imported.
In practice, this point of reference failure means we need to both maintain one or more known good Property Set Definition resource drawings to proactively manage them and remember to drag and drop the Property Sets into targets.
We must drag and drop Property Set Definitions separately from Civil 3D Style, Set, and Label Style resources.
Property Set Definitions are a different and distinct form of Style that is not currently exposed in the Civil 3D Toolspace interface. Property Set Definitions are normally best-defined specific to a Civil 3D Feature (what is exposed in the Toolspace). They are not technically restrained by Civil 3D object, raw AutoCAD object, ACA (AutoCAD for Architects) object, or various other exposed object definitions in the Applies to tab of a Property Set Definition in the Style Manager.
We employ a filtered view of the Style Manager interface to define, edit, and manage them.
- We assign Property Sets either manually or automatically via the AutoCAD Properties Palette Tool in the Extended Data tab.
- A Property Set Definition specifies the characteristics of a group of properties that can be associated with an object.
These may be either manual assigned properties or automatic properties generated and derived from the resolved geometry of the object itself.
- Set the AECPSDAUTOATTACH variable to On to automatically assign Property Sets to the Applies to type(s) of object(s) in a Property Set definition.
You can drag and drop Property Set Definitions from a known good resource drawing file into another drawing or target in the Style Manager interface.
LandXML and Property Sets
Property Sets and their data are employed in many forms of data exchange in Civil 3D.
We can manage the import and/or export Property Set Definitions and data via LandXML. This behavior is controlled in the Import To and Export To tabs of the LandXML Settings dialog box.
Data References and Property Sets
Civil 3D 2020 introduced a new SyncDrefPsetToSource system variable to help manage Property Set data that may be referenced in DREFs (data shortcut references). The SyncDrefPsetToSource to control whether property sets are synchronized when you synchronize the data shortcut references.
- Set to 0 (OFF) - Property sets will never be synchronized when related data referenced objects are synchronized
- Set to 1 (ON) - Property sets will be synchronized when related data referenced DREF objects are synchronized.
Property set synchronization will occur in the host drawing only if the DREF object has been changed in the source drawing.
If the property set has been changed in the source drawing, the property set will not be synchronized unless the DREF object has been changed in the source drawing.
Play careful attention to the DREF object modification requirement. Civil 3D only checks the DREF objects for changes in the source drawing. Changing the Property Set definition or the data in the source drawing but not the DREF object to which the Property Set data is attached does not trigger a Property Set synch update.
Drag and Drop and Settings and Label Style Defaults
Civil 3D’s Style Drag and Drop functionality notably does not support Civil 3D Settings and/or Label Style Defaults (LSD) imports. We need to employ the Style Import Tool and/or build these into our targets with the Insert/Explode method in the appropriate build order.
Clean Up Maintenance
Drawings assembled with Drag and Drop method should be Audited for errors and Regapps should be purged. For some resource targets you want to Purge and Style Purge. For other template targets you don’t. You want to include the not-in-use, optional Styles.
The Drag and Drop By Selection Method works and is sometimes necessary. In practice, Drag and Drop is tedious, man-hour intensive, and prone to user error.
The Insert/Explode Method of Style Import
You can add any drawing with a collection of Styles (both AutoCAD and Civil 3D Styles) to another by employing the AutoCAD INSERT command with the Explode checkbox checked, the insertion point set to 0,0,0, and scale set to 1.
- Works for AutoCAD Style collections (layers, blocks, etc)
- Works for Civil 3D Style collection drawings
- Works for Assemblies and collections of Assemblies with some automatic naming issues for included subassemblies.
- Works for Property Set Definition style resources
- Will not overwrite Styles and referenced resources that already exist in the drawing.
Therefore, the order of the added of resource files and the included collections is important.
Most of the supplied Framework for Civil 3D templates and/or collection resources were created in an additive fashion from the supplied Style library resource drawings by the repetitive and additive use of the Insert/Explode Method. This works in the Framework because of the organized libraries of Style collections and other resources.
AutoCAD UNITS Settings and Insert/Explode
All reasonably recent releases of AutoCAD based software include system variables which control the automatic Units conversions of inserted drawings. The thoughtful and considered use of these Unit conversion system variables can be a significant benefit or a problem in the additive process of target assembly.
- When a block is inserted into any AutoCAD drawing, it is scaled automatically according to the ratio of units defined in the drawing to the units defined in the block drawing.
For Imperial Civil 3D Style collection resources typically the Units (INSUNITS) of both the target and source are set to Feet. Therefore, the target and the source agree and no automatic scaling occurs.
If you want to perform Imperial to Metric or Metric to Imperial conversions of Framework for Civil 3D resource drawings these automatic scaling System variables often play and significant role particularly in the raw AutoCAD block conversions.
Note: The Framework’s supplied AutoCAD block resources are mostly stored with INSUNITS intentionally set to 0. The blocks are constructed in a generic 1-unit square.
Three AutoCAD System variables that all employ the same numerical unit conversion values control the results.
INSUNITS (System Variable)
- Specifies a drawing Units value for automatic scaling of blocks, images, or xrefs when inserted or attached to a drawing.
- See the AutoCAD and Civil 3D help files for the table of many possible numerical unit values
If we set INSUNITS in a drawing to 0 (no units assigned), we can specifically control the automatic UNITS conversion based on our two manually assigned separate target and the source System variables.
INSUNITSDEFTARGET (System Variable)
- Sets target drawing units value when INSUNITS is set to 0
INSUNITSDEFSOURCE (System Variable)
- Sets source content units value when INSUNITS is set to 0
AutoCAD assumes you know the Units assigned in the source and that you understand how the unit conversion desired into the target is executed with these Unit conversion system variables. In other words, we should be explicit and set the appropriate values in the target drawing.
Assembly with Civil 3D Batch Save Utility Scripts
The Insert/Explode technique is reasonably easy to script and chain together into a sequential order with the SCRIPTCALL command. The scripts may include standard clean up actions.
The Civil 3D Batch Save Utility allows us to manage this sort of script collection and the application of the same to perform updates and maintenance on our target resources. The Batch Save Utility also offers the performance advantage of running without the full Civil 3D visual interface.
Post Insert/Explode Process Cleanup
Drawings constructed with the Insert/Explode Method should be Audited for errors and Regapps should be purged. For some resource targets you want to Purge and Style Purge. For other template targets you don’t. You want to include the not-in-use, optional Styles.
Recognize that Purge and Style Purge operations performed on resources may require that in maintenance and upgrade script(s) we are often best served to add purged parts back in to modify (perhaps rename) those resources at update time.
There are a variety of important other Style cleanup and fix it tools available in Civil 3D. Some of these are not easily scriptable. We will cover these tools and some critical path techniques after we initially cover the Civil 3D Reference Template Method in another post.
Reference Template Tool Method
The Reference Template Tool employs a different approach to the consistent delivery of known good Style resources. The tool allows us to build, manage, and deliver Style collection resources.
If we employ template targets that employ the Reference Template Tool and one or more resources in the Reference Template stack, the managed Civil 3D and AutoCAD Styles referenced are always dependent and conform to those in the attached source drawings. Proper systematic management of the template targets and of those external resources means the Style resources will remain current with those external resources.
Release the Power Beyond the Code
Get the Framework for Civil 3D Release 8
The Civil 3D Style Maintenance Handbook Post Series
Updates, additions, and fixes to the posts in this series are on-going.