Tuesday, August 15, 2017

Property Set Formulas

Sometime in the recent past Autodesk enabled and advocated the use of Property Sets. It’s kind of sad why Autodesk did this, but that is another story about the lack of BIM in Civil 3D. I recently learned one can create formulas in the Property Sets and use VBScripts in the formulas. We can then use these scripts to extract information from objects. In this post I’m going to show how you can create a script to show a Pipe’s Material.

The first step is to type PropertySetDefine at the command line. This will bring up the Style Manager. image

Right click on the Property Set Definitions and select the New option. I’m using the default name of New Style. In the script I will want to use the ObjectID of the object. Note that this ObjectID is different than ObjectId found in .NET. To add this property click on the Applies To tab of the Property Set Definition select Pipe.


Then press the Add Automatic Property Definition button and select Object ID from the list.


We will need this property in the script. So now we can create a script. Note that if you don’t want to see the property in the Properties palette you can check the Visible check box to unchecked.


Now press the Add Formula Property Definition button. Then Right Click, in the Insert Property Defintions, on the ObjectID and select Insert. This will add the ObjectID to the formula box and in the Enter Sample Values list.


Next insert the following formula in the formula box. Remove the [ObjectID] from the previous step. Make sure each line


On Error Resume Next

Set oApp=GetObject(, "AutoCAD.Application")

Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.11.0")

Set obj=oCivilApp.ActiveDocument.ObjectIdToObject("[ObjectID]")


If the text ends up large press OK and then go back into the dialog box. This will reset the text height to the default size. Then go into the drawing and apply the property set by selecting a pipe and pressing the Add Property Set button.


Then the Material name should show up in the box.


You can find the list of standard Context here: if you want to use a different value.

Here is a video showing the steps:

Saturday, July 22, 2017

Some Tips

This post won’t make sense unless you want to add a block at each circle and then to go back in and renumber the blocks.
Renumber blocks Lisp from Cad Forum powered by CadStudio.
Lisp Function to add a block at selected circles. (Based on this post)
To load the lisp functions for Mac.
To create blocks with attributes for Mac.

Another renumber lisp that should work on Macs. The first one doesn't work since VLX isn't supported on Macs.

Tuesday, July 18, 2017

Migrate Settings

So you want to migrate settings according to this AKN article. Unfortunately Civil 3D doesn’t include the shortcut as indicated in the file. The easy way to run the Migrate program is to navigate to the program and run it directly.

The location of the program is here:

C:\Program Files\Autodesk\AutoCAD 2018\AdMigrator.exe

If you want the same experience as the article you can follow these steps:

  • Right click on the desktop and choose New, then Create Shortcut.
  • A dialog box should pop up where you can enter the location of the item:
    C:\Program Files\Autodesk\AutoCAD 2018\AdMigrator.exe
  • Press Next and give the shortcut a name and press finish.
  • Select the newly created shortcut, right click and go to properties.
  • In the Target box enter in the string:
    "C:\Program Files\Autodesk\AutoCAD 2018\AdMigrator.exe" /product "C3D" /language "en-US"
  • Copy and paste the shortcut to start menu where it should be located in the AKN article.

Tuesday, May 16, 2017

Statistics Tab

This post shows how to get the Statistics Tab back in Windows File Properties. The first step is to type Default Programs at the Windows Start Menu.


Then select Choose default apps by file type.


Then select the AutoCAD DWG Launcher as the app to launch DWG files.


Now the Statistics Tab will show up.


Sunday, April 30, 2017

Setting the Working Folder and Data Shortcut Project

Well a long time request has been to have the ability to set the working folder and/or data shortcut folder in Civil 3D via a code solution. Well after a long exhaustive search on how to even get the current working folder and data shortcut folder I’ve finally figured out the secret handshake.

The first thing to do is read the text file that contains the Working Folder and Data shortcut information. It is stored at:

C:\Users\Christopher\AppData\Roaming\Autodesk\C3D 2017\enu\Project Management\ShortcutFolders.xml

Replace Christopher with the current user’s name and 2017 with the current version of Civil 3D. There are plenty of examples online on how to read and process XML files, so I will leave that part out of this post.

Then modify the contents of the file, here is my current file contents.

<?xml version="1.0"?>
    <WorkingFolder path="C:\Users\Christopher\Documents\Delete" current="-1">
        <ShortcutFolder path="C:\Users\Christopher\Documents\Delete\Blah" desc="TestDescription" current="-1" uuid="Blah-0BF7567C-C01F-43dc-BA3B-93F604ACDFBD"/>
        <ShortcutFolder path="C:\Users\Christopher\Documents\Delete\asdf" desc="" current="0" uuid="asdf-F1F190A5-253C-4edc-A3C0-038919899515"/>
    <WorkingFolder path="C:\Civil 3D Projects" current="0"/>
    <WorkingFolder path="C:\Civil 3D Projects\" current="0"/>

Change the current=”0” to current=”-1” to indicate which working folder and data shortcut you want current and set the current=”0” for the data that you no longer want current.

Then save the file.

In Civil 3D run the REFRESHSHORTCUTNODE command at the command line and Civil 3D will read the XML file and update Civil 3D to the current state of the XML file.

Note that this workflow isn’t foolproof. If you have two instances of Civil 3D open they will both updated the XML file. This leads to problems of order if you are reading the file trying to figure out what the current working folder and data shortcuts folder is current.

Monday, April 03, 2017

Missing Layer State Icons

I’ve found that I was missing the Layer State Icons in the Layer Properties.


Now I rarely use the buttons now that I work on mainly small projects. But sometimes I do find it comes in handy to save layer states, especially when working with older drawings. So to get the missing layer state icons back I had to collapse the filters panel and then the icons show up.


Once collapsed and re-expanded the layer state icons stay visible.

Unfortunately, the change doesn’t stick, and the next time you restart AutoCAD you have to do the steps again.

Tuesday, March 07, 2017

Draw Order Based on Layer

I just found a new command to me. I suspect it's been in Civil 3D for a while. While it doesn't solve the issue of things being in the wrong draw order, it does provide a way to quickly put things in the correct draw order by layer. The command is called aeclayerorder (LayerOrder also works) and is an AutoCAD Architecture command. Civil 3D is built on top of AutoCAD Architecture so it has the command.
Here is the help file of the command:
Essentially type aeclayerorder at the command line and then order the layers in the list to the desired order. The layers you want to be on the bottom go to the bottom of the list. Then pressing OK will reset the draw order of objects. So easy to control draw order by layers!

Before, hatch is in front of line:


After, hatch is behind line:


Once the layers are ordered it takes like 3 clicks to get everything back in order.

Civil 3D–Hardware Evaluation NVIDIA Quadro P2000

So the question is has hardware finally caught up with poor Civil 3D architecture?

It appears that it has. I recently went to Stanford University, Center for Integrated Facility Engineering, to test out newly available hardware. NVIDIA has recently released a new line of video graphics based on the Pascal architecture and I was able to get my hands on a new P2000 video card.


The Center for Integrated Facility Engineering studies BIM and other related topics. The researcher, Forest Olaf Peterson, I was working with is interested in BIM and workspace planning in relation to Heavy Civil Construction.  The data set is a from a project modeled from a Caltrans project in Merced County that includes a bridge, retaining walls, ramps, and mainline reconstruction. The purpose of the research was to see how well modeling could be used to do workspace planning.


To start we need a benchmark of testing. I’ve got a fairly recent Dell Precision Laptop (7710) with an older NVIDIA Quadro M3000M. Using the same data set I’m seeing worse performance than I saw with the new graphics card. The drawing took longer to open and navigating the model ended up with more pauses and freezing. My laptop has a XEON CPU E3-1505M v5 @ 2.8GHz which uses turbo to increase the CPU up to 3.4 GHz.


The data set is quite old. It was started around 2013 and at the time computers had a hard time keeping up. The researcher tried out numerous video cards, computers, memory, and settings to try to get something to work. Unfortunately he spent more time waiting on Civil 3D then doing his actual research.

The video card was tested on a rebuilt computer. It had an older AMD FX-9590 @ 4.78 GHz processor on a new mother board, new memory, and a bigger cooling system. The performance was decent. The drawing opened in a relatively quick time of 1 minute and 30 seconds. The panning and zooming was improved over my laptop. There still was the freezes that occur in Civil 3D, but it was manageable to navigate the model without much of a headache. The researcher noted that performance was way better than previous hardware setups. Here is a video of the computer in action.

Here is a link to the computer specifications.


Overall the new video card performed well, better than I expected. I expected no change and was pleasantly surprised that it performs so well.

Also while I was there was a server that had been setup to try out some new technologies. The specs for the server is located here. The server setup is a bit pricey at about $35k, but it provided improved performance. The server is a SuperMicro Superserver 1028GQ-TRT + 4xM60 Design with  2x E5-2699 V4 2.2Ghz 22Core CPUs, 256GB Memory, 2x Intel S3520 150GB SSD SATA, 4x NVidia M60, DP 10GB Ethernet, 2P 8GB FC HBA, 3 Year Warranty. The server provided improved performance over the workstation. At the time of testing there was only one user on the server, so there might be some degradation of performance at full load. The server was less laggy and had improved navigation ability. Here is a video of the server in action.

The NVIDIA Tesla M60 video card in the server is based on a different technology than the NVIDIA Quadro P2000.

The video cards come out starting this month at OEM suppliers. I might see about upgrading my card when it becomes available more widely.

Note NVIDIA supplied me the P2000 video card without charge. One of the occasional benefits of being a blogger.

Monday, March 06, 2017

Monday, February 27, 2017

Profile View Stationing

Often times when we try to use a profile view with exacting numbers we get something that looks all jumbled up at the end of the profile view like this:


Now we obviously don’t wan that. So to fix this we have to ditch the profile view style and use a profile view band instead. So the first step is to turn off the major and/or minor station labels for the bottom of the profile view.

Instead we want to use Bands to show the station information at the bottom of the profile view. Then we can set up the Band Style to show the major and minor station values. In the Profile View Properties there is an option to turn off the End Station Value.


Then we get a profile view that doesn’t show the end station value and removes the overlap.


Here is a link to a sample drawing.

Sunday, January 29, 2017

Word Paste as Text

Often times I’m copying from a webpage or from another document I want to only include text. In the past I’ve created my own Macro and then created a keyboard shortcut to the macro.

I recently found an easier way to this without the macro. To do this go to the File button and choose Options. From the Word Options dialog box choose Customize Ribbon.


Then press the Customize Button. From the Categories column select All Commands and in the Commands column select PasteTextOnly.


Type your new shortcut in the Press new shortcut key and then press Assign to add it to the list. I’ve used Ctrl + Shift + V as my shortcut, but you can use what your preference. I’d avoid the standard Word shortcuts. Then Press Close and then you can use the keyboard sequence to paste as text.

Monday, January 23, 2017

Upgrading Civil 3D

Sometimes upgrading doesn’t go as planned. I recently tried to use Civil 3D 2017 and I was unable to change the annotation scale. It froze and wouldn’t come back. The reason why is that it was waiting for an upgrade dialog box to say OK. Since it doesn’t show in the UI I was unable to press it. To get everything back to normal I ran the RecoverAll on the drawing. This processed both the drawing and all of the XREFs. All of the drawings are saved as well as having the dialog box pop up where I can press the OK button.


Blog Widget by LinkWithin