Are you taking advantage of Fields?

What is a Field?

Fields are placeholders in a text string that are sourced from a data element or property value. Many of us have gotten accustomed to seeing a Drawing number automatically set in the Title Block, based on the file name. As shown below.

Sample Title Block using a Filename Field element to auto populate the Drawing number.

This is extremely useful for making sure you have the right drawing number in your title block. There are a number of advantages this offers. It prevents people from making a copy of the file and updating it instead of the actual drawing. Well it doesn’t actually prevent them from doing that, but then when they plot their file it stands out that it is a copy.

So if the file gets a new name, the drawing number automatically updates. Cuts down on confusion. It is pretty frustrating when you have two prints, that are different drawings but share the same drawing number. That will happen if someone copied the file and then failed to update the Title block Drawing number Attribute. What happens when you issue two different drawings with the same Drawing number? Ouch. That is a mess and I hope your Document control group catches that before sending it out to your client.

I think most of us can agree, that is a pretty cool feature. Fields have been around for a number of years now, 2005 I believe. That’s 15 years ago!

What else are they good for?

Fields can be expanded to use Sheet Set information and help keep more of your title block information more consistent. Project Name, Site Name, Project Site Location. All of those could be tied to an element in a sheet set or other property. I won’t dive to deeply into Sheet Sets or the other external properties you can take advantage in this Post, but recommend you look into what else you can do to take advantage of this feature. I will however talk about how you can take advantage of them in your drawing.

You can link data from one entity to another.

Sample Block Diagram using Field Data pulled from hidden text elements.

Above you can see the highlighted field area that are controlled by something else. These attributed blocks are automatically updated when a simple text string is updated. This will take your template to a whole new level, if done right.

So how do you set that up?

Fields are just another part of AutoCAD. The interface is not the most conducive for setting this up, but you can use AutoCAD straight out of the box and set this up. I have created some useful AutoLISP routines to make it more efficient, but I’ll show you how to do this with just AutoCAD.

First you will need the Source and the Destination AutoCAD entities present in your drawing.

S1 = The Instrument Type
S2 = The Tag Number Prefix
S3 = the Tag Number (minus prefix)

First lets get the S1 field Data to go into the ATTRIBUTE spot. Run the Field Command.

Select Object on the left side of the dialog.
Select the Select Object Button and then select the PT (Instrument Type) Attribute.
Next Select Value in the Middle (Property Column – Wow notice all those properties!) Then select Uppercase in the Right Column (Format – See the Preview). Highlight all the Text in the Field Expression Box, Right Click and Copy. Then Pick Cancel. (If you select OK AutoCAD will start placing an Mtext entity with the Field Expression as the text value. (you can hit cancel if you accidently hit OK)

Double Click on the ATTRIBUTE (Attribute Tag inside the Cable Tag Block) to edit the Value. and paste the value inside of it.

Notice the Value shows a Shaded PT in the Value Spot. That’s part 1 complete.

Next we need to repeat the process to get the other two parts of the CABLE Tag.

This one is slightly different as this entity is TEXT, so the Dataa we want is in the CONTENTS Property. Select Uppercase and Then highlight the Field Expression and right Click Copy.

Double click the Cable Tag Attribute (Currently showing PT).

Click in the Value Area and then make sure you are at the end of the text string type in a separator “-” and then paste the Field Value. Should now look like it appears above.

Let’s now get the third part of the Tag. Run the Fields Command and do the same steps but now pick the S3 (Source 3) Text Entity.

Now we have the Last part of the Cable Tag. Right Click and Copy. Make sure that Preview shows what you expect it to be “S3”

Double Click the Cable Tag Attribute and add the suffix (aka part 3).

Be sure to click to the end of the Value or you may erase the other two parts you worked so hard to get to. Add a separator “-” and then paste the next Field Expression (Ctl+C)

While we have the Last part Tag Number, we can go ahead and update the Instrument bubble to link to that value as well. Double Click on the ATT of the Instrument Bubble. and paste the value into the attribute.

Paste the same thing in this Attribute of the Instrument Bubble.

Ok That’s neat and all but that was a lot of work for two text values.

Yes it actually is. It would be way easier just to edit the values and be done. Would it? As we all know, change is inevitable. Copying is what we do a lot of, and consistency is king! Let’s copy 4 more instruments down. Update the Instrument Types to as shown below.

Make sure you copy the Instrument Tag, Cable and Tag as a group. Copying as a group creates new links associated with the new copies. Notice the Cable Tags have not changed. If you copied them right they will however actually be linked to the right Instrument Tag. If you copy something that has a link to another entity and that entity is being copied as well. AutoCAD will set the field data to be associated to the new entities. Pretty awesome feature. If you copy something that has a link to an entity that is not in the selection, then it leaves the field data association as is.

Why aren’t my cable tags updated?

There are a few things to understand about Fields. One the update based on the settings in the FIELDEVAL AutoCAD Variable.

Screen capture of the AutoCAD 2019 Help System for the FIELDEVAL System Variable. This is a Bitcode value so it means you can add the values together and make it work with multiple things considered. I Typically set mine to 31.

Once you have the FIELDEVAL set to Evaluate to at least include “Updated on regeneration,” Then you can simply do a REGEN or REGENALL to get the fields to evaluate the expressions.

Notice the Cable Tags are all updated properly.

Still more benefits. Change! The Project Just came back and updated the Site’s Prefix and the tag number for the instruments is now known. Site prefix is “PA-01” and the Tag Number the instruments share is 2003. Update the S2 Text string to “PA-01” ad the S3 Text String to “2003”. Regen and look at the results.

That was easy!

Now imagine if you used this in a wiring diagram and all your wire tags were linked to the instrument’s tag.

I hope this opens your eyes to some of the benefits FIELDS provide. If you do find you would like to start using fields, let me know and I can send you over a few useful routines for managing the field links much better than they FIELDS command.

CAD Intermediate – What is UCS for Anyway?

What is a UCS for? UCS Stands for User Coordinate System. Basically it means you can define your coordinate system for the requirements of your drawing. I can’t tell you how many times people have come to me and asked “how do I get my drawing to rotate correctly?” Yes that is a pretty loaded question. Truth is there are a variety of answers. A UCS can be used to provide better means of editing certain components in your model. It can be used for getting your border to rotate like you want it, a UCS can be used to show different views. A UCS can be used to translate from one coordinate system to another coordinate system. There are a number of applications to utilize a UCS. Do you have to completely understand what’s going on, No, but you will work better if you do.

What is a coordinate system? I believe most of us learned in School the Cartesian coordinate system in math. X and Y axis system and some even expanded into Z for 3D points. AutoCAD uses the same thing. I’m pretty sure you knew that, but trying to establish some history and base reference. The coordinate system is relative to where you associate 0,0,0. The World Coordinate System does not mean coordinates based on the world (planet earth). You could map all the points on earth into an AutoCAD drawing. What would you make 0,0,0? Where would you start? Personally Since earth is pretty much a sphere, I would set 0,0,0 to the center of the earth. Since most of us are not modeling the earth, lets stuck with relative coordinates to a site project. Your WCS will typically have 0,0,0 at a location on the site that is deemed the primary landmark. Thank you mappers and surveyors. You can also create any number of UCS’s you may need in a drawing that are relative to the WCS. Hopefully that all makes sense.

Figure 1 – Typical North Arrow arrangement

Most of the industry as I’ve been exposed to uses Up (Y-Axis positive direction) for North. (See figure 1.) This establishes the X-Axis as West(-) and East(+). Drawings come in a variety of shapes and sizes. Typically our drawing border is rectangular, and sometimes our content being presented is longer on the North/South Axis than the East/West Axis. For efficiency sake we rotate North to point to the left, but in reality all we do is rotate the border or the viewport in the case of Paperspace. The border/viewport is what adjusts to the content we do not actually physically rotate or change the North/South Axis. (See figure 2.) It is important to keep your model in your projects WCS (World Coordinate System) consistent. You can create as many UCS’s as needed for however many uses you may need.

Figure 2 – North to the Left

Most people have problems working on their drawings in this rotated mode. Note: I am using model space to show the concepts. In order to plot this drawing and annotate in the traditional method we can create a UCS to Rotate how we see our drawing. (See figure 3) Notice the UCSICON in the lower left corner. This is the origin of the UCS and it shows Y-Axis up and down, yet North is clearly left and right. We can annotate and work with our drawing in this state for personal preferences, and even plot form here. If we switch to World Coordinate System though, we can see the UCSICON is now showing Y-Axis going left to right as the north arrow shows.

Figure 3 – UCS for working

Figure 4 – WCS for real coordinates

If you wish to improve your knowledge, then I recommend getting to know some of the commands below.

UCS – use this command to set or create a UCS.

                Tip: Quickly reset to WCS by entering UCS[Enter][Enter]

DDUCS  – This is a Dialog based UCS command. It allows you to see any UCS’s defined in the current drawing as well as some other functionality.

PLAN     – This command sets the view of the current UCS (could be WCS) to X axis left to right and Y axist Up and down.

UCSFOLLOWS    – This is an AutoCAD Variable that controls if the PLAN view automatically adjust based on UCS settings. If you change the UCS, it will then automatically create the same effect as the PLAN command.

NAVVCUBE         – This controls the display of the Navigation Cube. Really useful for navigating in a 3D environment.

Navvcube – easily navigate the view of your model.

-VIEW   – (notice the dash in front) This can quickly get you to views if you don’t have the NAVVCUBE up or prefer the keyboard

TIP: -VIEW[Enter]_sw[Enter] This will switch you to SW isometric view

Other views include: _top ; _front ; _right ; _left ; _back ; _bottom

DVIEW – You can use this command for some different approaches to finding a desired UCS.

3DORBIT – Allows some free from manipulation of the view of your model.

Keep in mind that once you get the view the way you want, you can create a UCS based on that view by using UCS[Enter]V[Enter]

When working in 3D you will find you utilized a number of UCS’s to help facilitate your modeling. Just keep in mind that any actual coordinate references should be made in WCS. If you insert a block it will come in based on the current UCS. If you want it to come in based on WCS, make sure you reset to WCS before inserting it. When referencing other files, you will want to use the WCS in most circumstances. Same applies when using COPY w/BasePoint from one drawing to another. Make sure that both drawings are in WCS, unless of course you want to place relative to a UCS.

Good luck and let me know if this helps you understand the AutoCAD UCS.

CAD Intermediate – Linetypes and LTSCALE

Linetypes offer the drafter a means of differentiating drawing content and is an effective means for scope presentation as well. Linetypes along with line weights (we will cover line weights in another post), and line type scale can help improve the quality of your drawing significantly. A well done drawing can present the content clearly by using linetypes properly. Linetypes have been around as long as drafting has been around, (assumption on my part, they probably came along after a generation or two of drafting). There are accepted standards for linetypes that we can take advantage of. There are also special linetypes we can use. We can further expand on these linetypes using LTSCALE and / or pre-scaled versions of linetypes. All of this together provides a great way to define your drawings purpose. Use your linetypes properly in conjunction with LTSCALE and your drawings will not only be of better quality, but also easier to work on and use by others.

As an industry “standard” we see linetypes like “CENTER”, “PHANTOM”, “DASHED”, “HIDDEN” and more. I am not going to break down each type, but we know what these are pretty much used for. CENTER is for representing a CENTER Line, easy enough. PHANTOM is typically used to represent a limit of some sort, like Drawing limits or Skid Limits. DASHED and HIDDEN are pretty much the same but vary in size or scale for that matter. Typically DASHED OR HIDDEN mean beneath something, or implied connection, or even identify scope of work by others. So each linetype we use in our drawings means something and is not just arbitrarily used to differentiate. When working with other disciplines, you should understand what their linetypes are representing. It is beneficial for you to understand why they used a particular linetype. Make sure your linetype is appropriate for your purpose. Review the end result. Does your underground conduit look like underground Piping? Is that the look you are going for? Does your Pipe look just like the ditch running next to it? (See Figure 1) You should be able to manipulate the drawings appearance to identify clearly what is going on. Control is much easier when everyone draws bylayer. See my post bylayer for more on that. Text associated with certain lines helps identify and differentiate as well. Keep relevant information in your drawing to add clarity. Not all line work from other disciplines is needed in your drawing to present your design.

Figure 1

Note: Linetype definitions are stored in your drawing file and are not reloaded each time you open the drawing. If you find that your linetypes don’t match across drawings, you may in fact have a different definition in one of your drawings.

Another aspect of a linetype is the LTSCALE applied to it. Typically each company or even each company’s discipline has a standard LTSCALE. What is LTSCALE? LTSCALE is the scale factor applied to the generation of a linetype. If a line normally has a line for 0.5” and then a gap of 0.25” then repeats, it means that patter repeats at those distances. If you drew a line 5” long it would have 7 – 0.5” segments in it. If you had a scale of 0.5 it would then mean that same line would have 14 segments 12 at 0.25” and 2 at 0.1875” The difference is to make sure the line does not end on a gap. AutoCAD handles all that for you though. You can test this with the DASHED linetype, since the definition of it is as described above. Make sure you start with LTSCALE set at 1.0 and CELTSCALE at 1.0. I highly recommend NEVER changing CELTSCALE to anything other than 1.0. I will discuss that shortly. LTSCALE controls the linetype generation in your drawing and is stored in your drawing. That means it applies to the drawing you set it in only. If you use a scale factor of 48.0 in your drawing and your standard LTSCALE is 0.5 then your LTSCALE would then be 24.0. Take advantage of the scaled linetype definitions like CENTER2 (half sized center) See Figure 2

Figure 2 – What’s important in this sample?

Wait what about Paper space shouldn’t LTSCALE be 0.5? Yes and No. It depends on your environment and how your company standards work or even how your drawing works. If you have a drawing using paperspace and multiple scale factors in your drawing then you want to use paperspace to control LTSCALE set it to the value desired, 0.5 in this instance, and be done, just make sure PSLTSCALE is set to 1. I won’t get into too much discussion on these to avoid confusing this post, or just making it really long. Short explanation is. There are a few variables that affect LTSCALE. (LTSCALE, CELTSCALE, PSLTSCALE and MSLTSCALE). Do a little research and understand the difference. We will stick with Model space for our plot environment on this post.

TIP: Did you know there are different linetype files. ACAD.LIN is typically Empirical, and ACADISO.LIN for Metric. Try and avoid mixing and matching these two. If your drawing is metric you want to use the ACADISO.LIN file, otherwise use the ACAD.LIN file.

CELTESCALE means Current Element LineType Scale. When you click on an entity and look at the properties (see Figure 3.) you will see a Linetype scale for the entity. This is where you can set a custom linetype scale for this entity and this entity alone. The value you input here will be multiplied times the LTSCALE factor of the drawing. I recommend leaving this at 1.0 always. Changing this at the entity level means it is controlled at the entity level. If you set it here and someone else references your drawing into their drawing they will not be able to control how it is displayed in their drawing. See my post on Bylayer, bylayer, bylayer to better understand why that is important.

Figure 3 – Entity Properties

Custom Linetypes are useful as well, but with proper application. You can create your own linetypes and add all kinds of cool linetypes to your drawings. The nice part is once they are loaded they are part of the drawing, so they distribute well. When creating linetypes you can also specify the use of some text or characters to display in your linetype. Be sure to use a standard font file that is distributed with AutoCAD when you do this. using a Custom SHX file will leave your drawings looking incomplete when the end user does not have the SHX file to load. SHX files are stored external of the drawing. Some of the Linetypes make use of the font selected for the Standard text style, so use with caution and understand the impact of a font change can make on your linetypes.

We have covered a lot about linetypes and LTSCALE. I can’t go over each and every linetype available as there are a large number of them that have been created and used over the years. Each line type in your drawing has a meaning or should. If you don’t know the meaning, consult with your design lead. There should be a legend sheet for your discipline that shows linetypes and what they are for. Legend sheets are not just a bunch of pretty symbols, text and lines. They mean something. Your drawings should match what is found in your legend sheets. Consistency is a quality that we as drafters should strive to meet.

On a closing note, your drawing may be used for years to come, and even longer than that. Get it right. Yes we are often rushed to meet schedules, but that does not mean quality should suffer. Poor quality now, means longer delays later in the project. From my experience, project schedules don’t seem to add time at the end of the project; however, they do get extended and run over budget, but that is not part of the plan and neither is poor quality.