Ad

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: https://1drv.ms/u/s!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:
https://twitter.com/cadpanacea/status/1127999871833653248


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.

LinkWithin

Blog Widget by LinkWithin

Ad