Thursday, October 13, 2016

Plotting Stuff

Well, I’ve been told writing stuff down and explaining stuff makes things easier to remember. So the point of this blog post is so I remember most of the stuff in it.

So I was on the phone with an architect and he mentioned the numerous yellow boxes around the text in my newly created PDF. Now I know from experience they don’t have any negative downsides and when printed again the yellow boxes go away. But I realized I didn’t have a good reason to explain why those yellow boxes are there. So I decided to find out the reason why.


Well it turns out people wanted searchable text in PDFs. The main reason AutoCAD to PDFs are not searchable are due to a design decision from a long time ago about how to create fancy text in AutoCAD using SHX fonts. The fonts aren’t actual fonts, but a representation of fonts using stuff. So to make things searchable Autodesk could have removed support for SHX files or come up with another solution. The solution Autodesk came up with is to add comments to all of the SHX text as the actual text. This way the PDF is searchable through the comments and the text shows up as it has been historically.

So if you want searchable text without the yellow boxes then you’ll want to use True Type Fonts since PDFs can render them as long as the font is loaded into the machine. So if you don’t care about the searchable text you can turn off the feature by setting the system variable EPDFSHX to 0. Not this is only available on AutoCAD 2016 Service Pack 1 and above. In 2017 a new system vairable PDFSHX was added to AutoCAD.

This knowledge Network Article has more info.

In other news HP celebrated it’s 25th Anniversary with SPAN Architects, one of the principles received the first HP large format printer to in 1991.

Wednesday, October 05, 2016

Profile Tangent At MidPoint

Sometimes a profile is split across section views. This may mean if we label a tangent at the midpoint it might disappear from view. In order to get it to show up we can use some magic of not showing a label segment.

So create a line label segment and set it to start at the Anchor Tangent Start and end at the Anchor Tangent End In View. Then set the Visibility to False. Note that the order does not matter.


Then go to the Grade component and anchor it to the middle of the hidden line. Now the label will stay at the midpoint of the tangent shown in the view.


Here is a link to a sample drawing.

When Good Sheets go Bad

If you use Civil 3D across multiple years and use Sheet Set Manager you might run into a problem of bloated Sheet Sets. This happens when you open say Civil 3D 2016 and modify the Sheet Set Publish options. This adds some special AEC items into the Sheet Set. Then when you open the Sheet Set in Civil 3D 2013 and modify the Sheet Set Publish options the program doesn’t know what to do with the added AEC Items.

Now a normal response might be to take that data and say I don’t know what to do with it so I’m going to ignore it. Unfortunately AutoCAD says I don’t know what to do with the data so I’m going to copy it and put it into a junk draw. Which is fine if it only did this once. Instead when the Sheet Set Publish item is saved again, AutoCAD finds the same bad data, says I don’t know what I’m going to do with it so copy it again and put the new copy in the same junk drawer. So now I have at least 3 copies of the data. The original and two copies. Do it again and the problem doubles. Keep the actions going and now you’ve got a monumentally bloated sheet set.

So how does one solve this issue? Well the first think I did was search for a solution on line. I didn’t find anything directly related. Only vague reports of something going wrong. This led to an old forum post on AUGI by RK McSwain which pointed to JTB World tools to see the data in an XML file and delete it and then magically the XML file was to turn back into a Sheet Set. Well it looks like from that post to now modifying the XML file no longer turns it back into the same Sheet Set.

So I contacted JTB World to see if he had a solution and it just so happened he did have one in development. This however didn’t benefit me since I had an immediate need for it so I wrote my own App to handle the removal of the bad data. I haven’t had time to publish the App, but JTB World has. You can not only purge bad data, but also merge and merge copy Sheet Sets. You can find more information about the app from this location: JTB DST Tool

Tuesday, July 19, 2016

April Fool’s Day

Unfortunately, or fortunately depending on your opinion of the day, I missed doing an April 1st day post this year. Well to make up for it I’m going to show how you can prank your coworkers next April 1. The first thing to do is install Infraworks on their computer. Then teach them how to do expressions.

Well that’s not the entire prank, only the first part of it. Before you teach them how to use expressions go into their computer and find the appropriate language folder. For US English it is:

C:\Program Files\Autodesk\InfraWorks 360\en-US

Then open up the  ExpressionEditorTooltips.json in your favorite text editor. Then go through and change any of the descriptions to funny work appropriate phrases.


The next time they open up Infraworks the phrase will show up in the expression editor when they hover over the words associated in the json file. Have fun!


Saturday, July 16, 2016

Subassembly Composer SurfaceOffset Target

Sometimes we want to know where a point above a surface might be located. Something like what’s in this idea. While I haven’t tried this in a drawing, this method might work to replicate it.

First create an Auxiliary Surface Link.


In the properties set the Start X and End X distances to an expected design area width. I’d use 0 to 50 ft if my right of way was 50’ wide. In the image below I’m using two points to determine the X distances to use. Also set the Depth to the required value. This will adjust the link to be above (negative) or below the surface and create a link that follows the surface above or below the surface at the specified distances.


Then create your other links as necessary. Remember you can use Intersection Points to find the intersection between the Auxiliary Surface Link and your design.


I haven’t tried to run this in a drawing, but I suspect it should work. Here is a link to an SAC packet with the properties shown in this post.

Wednesday, July 13, 2016

Creating Formulas for SAC

When creating formulas for Subassembly Composer (SAC) it can get confusing on how you want to set up checks and even look up values. For instance you may want to grab a value from a table to determine the dimensions to use. Recently I’ve started using Excel to help me grab the appropriate values.

I start by creating an enumeration, under the view tab in SAC, and add an item for each case. If I have a complex table I will use the CONCATENATE option to join the strings together.


The formula for the enumName is:


Then I can copy and paste the value from Excel into SAC without having to think too hard.

Then I can build If/Then statements to grab the appropriate value from the table of data.


So the formula for the various item looks like this:


The CHAR(13) is a carriage return so once in SAC everything is formatted nicely.

The IF/Then values are then combined in another cell, something like this:


No I can easily build expressions to find values from a table in SAC.


Wednesday, June 01, 2016

Convert 3DPolyline Elevations to Surface Plus Height

So lets say you get some 3D Polylines with an elevation value of a pole height, so lets say around 6’, but not constant. You want to then take the 3D Polylines and then create duplicate 3D Polylines with elevation of a surface plus the elevation of the varying 3D Polyline. If the 3D Polylines had a constant elevation it would be easy to just project to surface and then move the 3D Polylines up the required distance. If the elevations are variable it makes it a harder program to solve.

First of my preference would be to solve this through programming an app, which wouldn’t be too difficult. But in this case I don’t have the 3 or 4 hours required to create the program. So in this case I’m going to do this just using Civil 3D surfaces and 3D Polylines.

The first step is to create a 3D Polyline at 0 elevation that encompasses the entire project area. This will then be used in a surface that I’m going to call Zero. In the drawing I’ll also have an EG-100 Elev surface with a 3D Polyline set to an elevation of 100, so I can check the elevations easily.

No take the 3D Polylines with pole heights and add it to a new surface. I’m calling mine Orig3DPolys. Now this surface has the wrong elevation that I need to do the math on. In order to the elevations I need to create a volume surface and compare it to the Zero surface. This will convert my elevations from positive to negative (and from negative to positive if required). I’m going to call it Orig3DPolysInverse.

Now I need to add this volume surface to a TIN surface by pasting it in. I’m calling this surface Orig3DPolysInverse-ToTIN. This will allow me to then create a new volume surface since you can’t directly use a volume surface in another volume surface.

I can then create another volume surface to get the elevation difference between the Orig3DPolysInverse to the EG-100 Elev surface. This will give me the surface plus the height of the EG surface. I’m going to call it New3DPolys. I can then add in some surface labels to check my math and I can see everything works out well.


The last step is to project the copy of the original 3D Polylines to the New3DPolys surface.

Here is a picture of my surfaces:


Here is a link to the file if you want to double check my steps:

Wednesday, May 04, 2016

Dynamic Assembly Labels in Civil 3D

Brian Hailey over at the Civil 3D Plus blog recently did a post entitled Dynamic Assembly Labels in Civil 3D. I thought for sure he missed something, since his process is way labor intensive. Plus when I create Assemblies they are automatically dynamically labeled, I don’t have to do a thing at all.

At first I thought Brian missed a setting in Civil 3D that turns on this wonderful feature. Then I remembered he knows the product inside and out and I should check to see why my version of Civil 3D was broken in such a spectacular way.

It turns out my installation has this program called the SincPac. Within the SincPac there is a command called SP_LabelAssemblySettings. This command has an option to automatically label new subassemblies and it automates the steps laid out by Brian.

LabelAssembly Settings Dialog

So while Brian had to do a bunch of clicks for each and every subassembly he creates; all I have to do is create a subassembly and BAM! my Assembly is labeled. I’d call that a Dynamic Assembly Label. So if you want to save your self a minute of work when creating an Assembly then you should try out the SincPac.

Disclaimer: I write programs for the SincPac (although not this one). Here is my latest improvements to the Sewer Lateral Linking Command.

Friday, April 29, 2016

Band Aid BIM–Structures in Profile Views

Ever want to show structures in profile views? Ever notice how if you have a non-symmetric structure it doesn’t show correctly? If so then go vote for this idea over in the forums.

Evidently having crappy BIM is “as designed” over at Autodesk. From a company that is constantly cramming BIM down our throats through marketing you’d think they would at least have the common courtesy to show structures properly in profile view regardless of their wonky geometry.

Friday, April 15, 2016

Band Aid BIM–Surface Subgrade

Autodesk continues to push Band Aid BIM through blogs and advertising. Now I’d prefer to have actual BIM instead of Band Aid BIM. Band Aid BIM is the worst kind of BIM there is. It pretends to be something it isn’t. One big sign Civil 3D is Band Aid BIM is there is no concept of existing pavements. Does Autodesk not believe that the sea of black and white stuff doesn’t exist in the world. Autodesk sometimes sites the amount of infrastructure the US and the World will need to do in the coming years, but doesn’t create tools to process it?

One common task done is to remove existing pavement. Well since there isn’t any existing pavement objects in Civil 3D we have to employ Band Aid BIM to model this. The first thing we have to do is create a polyline that encompasses the areas of existing pavement. Then in order to simulate an existing pavement we need to create a new surface. I called mine XPaveArea. Then paste in the existing ground surface and then add in the pavement areas as boundaries. Now lower the XPaveArea surface the desired distance that represents the pavement sections. So I created a cross section to show the surfaces at this point.


Now I need to create an existing subgrade surface that represents surface the contractor is expected to build from, in my case called XGND-Datum. After all we don’t want to pay the contractor twice for the same work (removing the pavement and then calculating the cut/fill from the top of pavement).


Now in the resulting picture we can see we are screwed. Most pavement has vertical or near vertical edges. Civil 3D has decided to drop the surface down and then triangulate to another triangle a far distance away from our surface. In the area of landscaping what happened to our surface? Shouldn’t it jump up to the XGND surface? This means more work in this Band Aid BIM situation. We have to create another surface to fill in the gap for the median. See pasting surfaces pastes in holes as nothingness rather than the surface as it should do.

So to fix this we now have to add in information to the XGND surface. So create a surface with the XGND surface and then add the holes for the XPaveArea as boundaries. Then paste that into the XGND-Datum Surface. This is the result:


Well that sucks the triangulation doesn’t work. So now we need to create offsets of the boundaries at a small amount, say 0.001 units and then apply the boundaries in the correct order. This will let Civil 3D know how the vertical data should be handled at this location.


So looking better. To fix the outer edges of the pavement we need to add in a breakline to the XGND-Datum surface that represents the existing ground surface a small distance away from the boundary, say 0.001 units. Don’t forget about this command:


Once we do that we finally get a half assed, Band Aid BIM solution to the problem.


So how to fix this tragedy? I guess ask for Civil BIM first. If Autodesk refuses, like they currently are doing despite marketing BIM, I guess we can settle for these ideas on the Idea Station:

Pasted surface interaction with abutting surfaces

Pasted surface interaction when the top surface has more than one boundary

Surface Thickness

Band Aid BIM Improvement - Paste Surface Options

Friday, April 01, 2016

Slope or Grade Label

Civil 3D is dumb. Just the other day I was placing labels on the plans and I remembered an age old convention:

“If the grade is flat use a percent label, if it’s steep use a slope label.”

If that is a convention I run into time after time, then why does Civil 3D by default make me choose the correct style? Wouldn’t it be easier to have one label adjust based on the grade? Well we can overcome this obvious deficiency in Civil 3D by building a grade/slope label that does just that. We can create two expressions. One will return a positive number if a percent is required and a negative value if a slope is required. The other will do the exact opposite. Then we combine those into one label by setting the expression value to not show if it’s negative. That way we get one label to do both jobs. No longer having to place a label and then realize you have to swap it for another one. If you want to show a negative sign, then you are out of luck.

Here is a link to a file with an example.

Monday, March 28, 2016

NCS Site Layers

This post is brought to you by WareFlix who provided the NCS layer list of site design tools used in this blog post. WareFlix provides who provides a Custom eLearning Platform for Architects, Engineers and Contractors.

Civil 3D is not built for site development. One proof of this is the lack of NCS layers that relate to site design. In order to have them you have to add them yourself. A quick way to add the layers to a Civil 3D is to create a script file. A script file allows you to run a variety of commands from a text file. The first step is to create a list in Excel (or Google Docs) that contains the layers you want to create as well as the layer properties you want to be populated.

A link to the Excel file used may be found at this link.

Once the data is filled out create a new cell with a formula that will add in the layer. It should look similar to this:

="(if (tblsearch ""LAYER"" """ &TRIM(A263)& """)(princ)(command ""-layer"" ""N"" """&TRIM(A263)&""" ""C"" """&TRIM(B263)&""" """&TRIM(A263)&""" ""LT"" """&TRIM(C263)&""" """&TRIM(A263)&""" ""D"" """&TRIM(D263)&""" """&TRIM(A263)&""" """"))"

The result value should be something like this:

(if (tblsearch "LAYER" "C-TINN")(princ)(command "-layer" "N" "C-TINN" "C" "White" "C-TINN" "LT" "Continuous" "C-TINN" "D" "Triangulated irregular network" "C-TINN" ""))

The tblesearch checks to see if the layer exists, if it does nothing is done. If it is not found then the layer is created with the settings in the Excel file. The formula could be changed to just change the properties by replacing the (princ) with a revised second part. So the (princ) would become:

(command "-layer" "C" "White" "C-TINN" "LT" "Continuous" "C-TINN" "D" "Triangulated irregular network" "C-TINN" "" "")

The formual would be:

="(if (tblsearch ""LAYER"" """ &TRIM(A266)& """)(command ""-layer"" ""C"" """&TRIM(B266)&""" """&TRIM(A266)&""" ""LT"" """&TRIM(C266)&""" """&TRIM(A266)&""" ""D"" """&TRIM(D266)&""" """&TRIM(A266)&""" """" """")(command ""-layer"" ""N"" """&TRIM(A266)&""" ""C"" """&TRIM(B266)&""" """&TRIM(A266)&""" ""LT"" """&TRIM(C266)&""" """&TRIM(A266)&""" ""D"" """&TRIM(D266)&""" """&TRIM(A266)&""" """"))"

Then either copy and paste the column E into AutoCAD or paste it in a text document and then save it as a .SCR file like this one:

A link to the final script file may be found at this link.

Then drag and drop the scr file into AutoCAD and it will either create the layers or update them.

There are also other ways to do this such as lisp routines that you find doing Google Searches.

Thursday, March 17, 2016

Freaking Context Values

Couldn’t find a list of Civil 3D COM contexts so here is a list of some of them. Feel free to leave more in the comments. These are for AeccPartDataRecord information.

120  Geometry_Distance2D

200  Catalog_Domain

201  Catalog_PartType

202  Catalog_SubType

203  Catalog_PartName

204  Catalog_PartSizeName

205  Catalog_PartDesc

206  Catalog_ID

208  Catalog_PartID

212  Catalog_PartHide

215  CustomSize

216  DataVersion

217  Content_Type

300  Material_Type

301  WallThickness

400  SweptShape

401  PipeDiamter

402  PipeInnerHeight

403  PipeInnerWidth

405  MinCurveRadius

406  FlowAnalysis_Manning

407  FlowAnalysis_HazenWilliams

408  FlowAnalysis_DarcyWeisbach

Epson Drivers

If you have an Epson SureColor Tx270 series plotter make sure to see if you need the updated firmware. There appears to be some improvements that may be useful for you.

Tuesday, February 16, 2016

Back Ground Mask Toggle

Have you ever wanted to turn on or off back ground masks on a gaggle of mText objects? If you have then you’ll want to check out the SincPac and it’s BG Mask Toggle Tool. It allows you to either turn on or off the Back Ground Mask or turn it on. Here is a short video showing it in action.

Thursday, February 04, 2016

Editing Alignments

Sometimes we want alignments to always to be tangent. Often times when moving alignments we want to temporarily turn off tangency so we can move the alignment were it needs to go.

To do this go into the Alignment Layout Tools, grid view.


Then change the Tangency Constraint column to something Fixed. Then you will be able to move segments without it trying to keep the tangency. Once done go back in and change the Tangency Constraint to Floating or Free to get tangency back.

Digitize Section: DigitizeSectionTo3DPoly

Have you ever gotten drawings or PDFs from people, but without the data that made up the sections? If so then this post is for you. The scenario that I’d use this tool in the past would be if I was a contractor and received some PDFs of the sections. I’d then go through and digitize the sections, scale them and then transfer them to plan view. I’d then use the 3D polylines to create a surface I could use to do quantities. In order to facilitate the process quicker I wrote the DigitizeSectionTo3DPoly to do the steps without me having to think too much. The command may be found in the SincPac and the help file may be found here.

I also created a video showing it in action:


Blog Widget by LinkWithin