Saturday, December 07, 2019

Tree View Windows Shortcuts

I forgot about this response and the content of it. So I'm going to make this blog post to hopefully reinforce the concept so I might remember it better.

When in a tree view, like the one in Civil 3D Prospector;

The number pad keys do the following:

  • * Expands all of the branches below the currently selected branch. 
  • + Expands the currently selected branch. 
  • - Collapses the currently selected branch.
  • Right Arrow Does the same thing as +
  • Left Arrow Does the same thing as -
  • Holding the CTRL Key and Up and Down Arrows will scroll the current view.
  • Letter Key Will go to the next branch with that starts with the entered key.

Saturday, November 02, 2019

Area of Corridor Links

Getting the area of corridor links might be challenging.

If we have a constant slope, we can use the QTO feature in Civil 3D to assign the appropriate pay item to the desired link(s). Then use the Takeoff to get the area. This should result in a plan area. To get the slope area we can multiply it by a slope ratio. For example, if the slope is 2:1 we can multiply it by 1.1803398749895 to get the slope area.

If the slope isn't constant it gets harder. One option is to run the slope stake report and then calculate the slope length of the link and then use the average link length to get the area. 

Another option is to create boundaries around the slope areas we want and use the surface properties to get the slope area. 

 Got any other ideas?

Power Rename

Microsoft has released a new version of Power Toys. In it is a new feature called PowerRename.

This might be useful when having to rename a bunch of files. More than once people have acced for this type of tool.

Thursday, August 08, 2019

Ghost Viewport

Sometimes a ghost viewport will show up after using the Corridor Section Command. I haven't found a way to remove the viewport via the User Interface. Here is some c#.NET Code that appears to get rid of the bad viewport.

public class FixViewports
    public static void FixViewportsCommand()
        var doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
        var db = doc.Database;
        var ed = doc.Editor;

            if (!db.TileMode)
                ed.WriteMessage("Must be in Model Space");

            using (var tr = db.TransactionManager.StartTransaction())
                var vpTable = db.ViewportTableId.GetObject(OpenMode.ForWrite) as ViewportTable;

                foreach (var vpObjId in vpTable)
                    var vpTblRec = vpObjId.GetObject(OpenMode.ForRead) as ViewportTableRecord;

                    ed.WriteMessage("ViewportName: " + vpTblRec.Name);

                    if (vpTblRec.Name.Equals("*Active", StringComparison.OrdinalIgnoreCase) || 
                        vpTblRec.Name.Equals("Civil 3D Section Editor Viewport Configuration Snapshot", StringComparison.OrdinalIgnoreCase))
                        ed.WriteMessage("Deleting Viewport: " + vpTblRec.Name);

                using (var vpRightTblRec = new ViewportTableRecord() { Name = "*Active", LowerLeftCorner = new Point2d(0, 0), UpperRightCorner = new Point2d(0.5, 1) })
                    tr.AddNewlyCreatedDBObject(vpRightTblRec, true);

                using (var vpLeftTblRec = new ViewportTableRecord() { Name = "*Active", LowerLeftCorner = new Point2d(0.5, 0), UpperRightCorner = new Point2d(1, 1) })
                    tr.AddNewlyCreatedDBObject(vpLeftTblRec, true);



        catch (System.Exception ex)
            ed.WriteErrorMessage("Error: " + ex.Message);

Friday, June 07, 2019

Enterprise CUIx - Express Tools Keeps Loading

Way back in Autodesk University 2009 Robert Bell had a class on using an Enterprise cuix.

Sometime around AutoCAD 2013 Autodesk decided that the Express Tab wasn't being loaded, so on first profile creation AutoCAD would add the Express tab to the user's cuix. Unfortunately, the Enterprise may contain the Workspace and if the Express tab was shown the Express cui. Using the Enterprise CUI then caused the Express Tab to be added to the user cuix.

To fix this issue you can add the key AutoCAD uses to see if the Express Tab has already been loaded to the default profile in the HKEY_LOCAL_MACHINE. The Registry Key is this one (the user is shown):


Now the Express Tab won't be loaded on the first run of a user's profile.

Tuesday, May 28, 2019

AU Class Submittal: Transportation Intro Class in 90 Minutes

A real class or cover for a why Civil 3D isn't BIM class?

Class Title: Transportation Intro Class in 90 Minutes

Class description:
A fast-paced class intended to take a three-day transportation-focused Introductory Civil 3D Class and squeeze it into 90 minutes. At the end of the class an off-ramp will be modeled and cross sections will be ready to be printed. The class will cover a wide range of Civil 3D viewing, and TIN Surface operations. Roadway design will include alignments, profiles, corridors, sharing data, superelevation, and report generation. 

Class format
Instructional Demo

Length: 90 Minutes

Learning Objective 1: Create an On-Ramp including an alignment, profile, and corridor.

Learning Objective 2: Create a widening or pullout for a maintenance area.

Learning Objective 3: How to apply and modify a Superelevation for an On-Ramp.

Learning Objective 4: Create and use Surface Data.

Briefly summarize your class: A transportation class focused class on how to do a basic Freeway On-Ramp using Civil 3D.

Sunday, May 19, 2019

Export Civil 3D Table to CSV

A long desired feature is the ability to convert Civil 3D tables to a useable format. Whether it be an AutoCAD Table or Export to Excel. By long desired I mean over a decade.

I guess we don't matter, as customers, if it takes a decade to do something I'm able to do in an afternoon while I procrastinate. I'm even doing it the hard way. It would be way easier if Autodesk provided an API method of grabbing the Civil 3D Table's contents (along with Civil 3D Labels) or include the command in Civil 3D so I wouldn't have to write this stupid blog post.

This post covers how to export a Civil 3D table to a CSV file. The steps are similar if you want to export to Excel. The Title row would need to be taken care of. This could be done by looking at the Table Style and seeing if it has a Title Row included. That's for another possible blog post.

The first step is to have the user get the table. I've written the table for an Alignment Tag Label Table, you'll have to add the other types you want to run the code on.

Then we need to explode the table into its individual components. The FullExplode method handles that task. After exploding, the objects are sorted into vertical lines, horizontal lines, and MTexts.

Then the range of vertical and horizontal lines are gotten, these will be used to identify where the rows and columns are located. The Distinct() is used because the exploded tables end up having lines for each row and column.

Next the row data is processed by columns and written to the csv file.

After the data is collected the file is opened and the objects collected disposed of.

Add caption

This code is more of a proof of concept on how to export to csv. More work would be needed to make it perfect. If the table is split, then each table section would need to be exported separately.

The code may be found here:!AqAPKXdBD3fOnE6C8F-hhCnFi3nH

Wednesday, May 15, 2019

AU Idea: Theater Talk

Simply a note for future reference. Feel free to ignore or vote when AU 2019 Las Vegas proposals are voted on.

Title for Your Theater Talk: Reimagining Civil 3D Corridor Targeting

Describe the focus of your Theater Talk:

Corridor Targets assignment in Civil 3D is laborious, repetitive, and not intelligent. What if the process could be elevated from a simple one at a time process, to one that allows for multiple targets to be applied simultaneously? This talk talks about the development of such a tool. It starts with the initial brainstorming ideas and goes through the development process. I'll talk about what ideas were added and/or dropped from the tool. The talk will explore how filtering of drawing data available for targeting, sorting all of the applied assemblies into groups and subgroups of subassemblies, and pattern matching was used to reduce the time it takes to assign corridor targeting by more than 50%.

Theme of Presentation:
Work Reimagined - What We Do, How We Do

Class Focus:
Thought leadership and innovation

Link to a sample presentation you have made:

Wednesday, May 08, 2019

Workarounds all Around!

It seems like Civil 3D is just a series of workarounds to get it to work in a somewhat of fast manner. It seems like instead of Autodesk programmatically fixing the issue, they require us, the user, to implement workarounds. Slow corridor drawing? Why would you want to use the product as designed? Instead split the corridor into several drawings time wasting drawings! Who the heck wants to do that?

This post is all about a workaround to get faster printing speeds of cross sections. As mentioned in my last post, Civil 3D process all of the objects in the entire drawing when processing each and every viewport. The workaround to prevent this is to come up with a list of layers that only show up in plan view and won't affect the section views you are printing. Then set up a layer state that goes through and freezes and turns off all of the layers in plan. Now when you print you'll experience a faster printing experience. In my testing of a simple set of 8 cross section sheets reduced the print time from 3 minutes to under a minute!

Unfortunately, this doesn't help with an increasing number of cross sections in the drawing. This workaround works great and then starts declining once more sections are added to the drawing. I once saw a person start printing 75 sheets and after 4 hours it wasn't even done printing!

Why does Autodesk burden us customers with this huge negative return on investment? I don't know.

Saturday, May 04, 2019

The Problem is Civil 3D

Have you ever heard an Autodesk employee (or an independent Civil 3D expert) blame you, the user, for Civil 3D being slow? Often times you are told to split the objects into separate drawings. Told to delete labels from the drawing. Other times you are assailed on your choice of computer. Telling you that all your problems will be solved if only you spent more money on a video card or RAM. After 12 years of using the software, computer processing power has increased greatly while Civil 3D has not even come close to using Carl Bass' idea of infinite computing power, heck Civil 3D can't even use the four processors my laptop has.

When is the real cause going to be blamed? The slow inefficient software called Civil 3D.

To demonstrate it's the software's fault, simply create a new drawing, then create an alignment, then add a line segment of any length. I started with a length of 1,000 feet. Everything worked fine and the image shown below was displayed on the screen. 

I count around 12 labels shown on the screen.

Now keeping the same zoom level, create a line segment of 10,000,000 feet (~1,894 miles). Notice now that Civil 3D takes a long time. I stopped counting seconds after 60.

There are still around 12 labels shown. What the heck is Civil 3D doing? It's drawing all of those labels not on the screen! Why in the world do I need to wait for all of those labels to get drawn? Because its easier for Autodesk to blame you, the user, rather than making the fixes to improve Civil 3D's performance. In this case, Autodesk could simply get the coordinates of the current viewport and only draw the labels that need to be shown instead of all of them. If you have ever printed a drawing with lots of Civil 3D objects and wondered why it takes forever? This is the reason! It's drawing, and making sure everything is up to date, for all of the Civil 3D objects in the drawing for each viewport! So if you are printing 100 sheets with 2 viewports per sheet you are updating all of the Civil 3D objects at least 400 times! So the more objects you have the slower it's going to be. This seems like a simple geometric problem to solve. Heck, each AutoCAD entity has a Geometric Extents property just for this reason. It's unfortunate that Civil 3D doesn't take advantage of this property.

When a user zooms out, instead of showing all of the labels start to filter them based on either a user setting or a default value.

If a user tries to select the alignment labels Civil 3D freezes again, this time attempting to draw all of the label grips!

A simple formula lets us know how many labels grips would need to be drawn. Why isn't Civil 3D using AutoCADs system variables to GripObjLimit to prevent these types of drawing slowdowns? I guess Autodesk is too busy blaming its users and the user's hardware to find the time to fix the underlying issue.

Now that the post is over I'll still be waiting for Civil 3D to finish trying to draw all of the label grips. Thankfully I'm not working on a project, but often times when these long needless delays occur costing me time and money. Where can I send the bill?

PS. After 15 minutes the Civil 3D still hasn't finished trying to draw all of the grips. I guess I need to split up my alignment and get a better computer.

Saturday, February 23, 2019

Infrasucks Strikes Again!

Infrasucks strikes again in failing to provide a sane easy to use program. Infrasucks is called Infraworks by Autodesk. In my latest encounter with this product it once again fails to deliver an experience that makes me want to use this product. Evidently Autodesk wants it’s users to be frustrated in the first 4 hours of using the product.
In this case, I have a coworker who I’m foolishing helping out to get access to Infrasucks and then if he has any questions try to help him out. The coworker brings in the model from Civil 3D and then I have to answer the obvious questions on why it’s so hard to do. Why Autodesk doesn’t care about interoperability? etc, etc.
Then the coworker determines a city furniture item doesn’t exist and he learns how to create his own 3D Model in AutoCAD Civil 2.5D (using AutoCAD 3D commands) and then exporting the model to FBX, including the materials. Everything is going great at this point.
Then Infrasucks gets in the way of itself. The user imports in the FBX model into Infrasucks and goes to verify the model is being imported correctly. But the model isn’t being brought in correctly. All of the Autodesk Materials are missing. What’s up with the that? There is no messages saying why Infrasucks is refusing to show the materials. It isn’t until you get out of the dialog box and then go back in a refresh the model do you get a message on what is broken.
Doing an internet search you’ll find numerous AKN articles saying Infrasucks doesn’t include Autodesk Materials.
In order to get the Materials to show you need to download and install a same year version of the Infrasucks you are using. But there is a problem, there is no branding to let you know what year version Infrasucks you are using.

So what product should I download?
Another issue is that I already have multiple versions Autodesk Material Library installed on the computer.

By math I have 2,643 MB of Autodesk Materials installed on my computer. Why do I need to install another Autodesk Material Library? Based on the install sizes, little to nothing has changed. Why do I have to install it again just to change the year? Are Autodesk programmers so inept they can’t subtract 1 from a number? Can’t they ask their coworkers where the default install location is?
If any Autodesk programmers are reading this you can find the folder of Materials here:
C:\Program Files (x86)\Common Files\Autodesk Shared\Materials
I’ll leave it to you to learn how to get a list of folders in a folder (it’s really, really easy to do).
So I’ll continue to tell users they should call the product Infrasucks, especially since it’s been at least 4 years this problem has existed and Autodesk continues to make it hard for users to use the product.


Blog Widget by LinkWithin