Debugging Civil 3D .NET Errors

Posted in Civil 3D with tags , , , , , on November 22, 2013 by Kyle Nishioka

I’ve reinstalled Infrastructure Design Suite Premium 2014 (IDSP) three times now since it came out in April. Civil 3D had become so unstable that it would only run for about 10 minutes before getting an error message like the one below.

Civil 3D .NET Error

Civil 3D .NET error message “The root Visual of a VisualTarget cannot have a parent.”

What that really means is that Civil 3D tripped up on some kind of .NET app/script and the Microsoft .NET error handler also failed to handle the error. I think I’ve narrowed the source of the problem to the conversion of VBA scripts to .NET. I remember opening a DWG that had some kind of VBA script which Civil 3D asked to automatically convert to .NET. I clicked “OK” and let the conversion run. The first hints of instability started a day or so after the conversion. I’m guessing that the conversion didn’t go so seamlessly and the fallout is corrupting something within Civil 3D or the .NET installation.

The only way I’ve been able to fix this is to:

  1. Do a clean uninstall of IDSP and uninstalling Microsoft .NET 4.5. The built-in Uninstall tool included in IDSP does an OK job of removing the main components of the suite, but there are always remnants of the Suite left over.
  2. Do a manual check to make sure you’ve uninstalled all Autodesk software. Go through the Windows Programs and Features list. Sort by Publisher and look for everything from Autodesk and remove those manually. There are even more leftover files and the only way to be sure you’ve deleted everything is to go through this checklist to uninstalling all Autodesk products.
  3. Once all Autodesk products are gone and .NET is uninstalled, do a reboot and reinstall .NET 4.5 from Microsoft directly. Then do a Windows update to patch .NET 4.5.
  4. After the reboot for the patch, reinstall IDSP.
  5. Patch the various IDSP components (Civil 3D, AutoCAD, MAP 3D, etc.) and then install the VBA module for AutoCAD. Ever since the AutoCAD 2010 release cycle, Autodesk has discontinued bundling the VBA modules in AutoCAD. But, you can still install the module separately.

I just found that last step about a week or so ago. I am hoping that installing the VBA module will prevent any accidental conversion of VBA scripTs to .NET. If it doesn’t Civil 3D will still prompt you to do the conversion if it encounters a VBA script in a DWG. I recommend never converting them to .NET.

BIM 360: BIM in the Cloud

Posted in Civil 3D with tags , , , , , on June 18, 2012 by Kyle Nishioka

So I woke up at 5 a.m. to catch Autodesk’s webinar about BIM 360. My first impression is that BIM360 is going to be the preferred way to publish completed designs to your project team. The integration of Navisworks and Infrastructure Modeler into Autodesk’s cloud services is a natural fit to round out their Design Suites. Create a Civil Infrastructure model for feasibility analysis or conceptual presentation and push it up to the cloud for others to view and comment on it. Then pull the revisions back to your desktop. Sounds pretty cool and it’s definitely worth checking out, however I just can’t see it being a big part of my workflow. The Navisworks sharing to the cloud looks more promising for my day-to-day work. If a design team could push a model of their progress sets up to the cloud and create a cloud-based Navisworks clash detection report, that would would certainly be worth pursuing.

Anyway, check out this series of videos demonstrating BIM 360.

Pipe Structure Shows Up at Wrong Station in Profile View

Posted in Civil 3D with tags , , , , , on May 30, 2012 by Kyle Nishioka

Memo to my future self. If a pipe structure should appear at station 0+00, but shows up somewhere totally wrong, verify the insertion point’s location. The insertion may have snapped to some object near, but not quite on, station 0+00. Because of whatever algorithm Civil 3D uses, the result may appear odd. This catch basin was inserted a fraction of a foot to the left of station 0+00 and Civil 3D somehow placed it at station 15+XX.

Plan and profile view of a pipe network gone wrong

If a structure shows up at an unexpected place on the profile view, check the insertion point of the structure.

AutoCAD font corruption when plotting to PDF

Posted in AutoCAD with tags , , , , on March 7, 2012 by Kyle Nishioka

I recently had to troubleshoot a plotting problem that would occasionally corrupt the text when we made PDFs using AutoCAD’s DWG to PDF.pc3 plotter driver. Most of the text would render properly, but occasionally some text objects would be unreadable. They would appear as blank boxes, or other aberrations.

Font corruption problem

The root cause is the choice of font and how fonts are displayed in PDFs. TrueType fonts have often been a problem for AutoCAD and I’m pretty sure this is one of the more obscure problems that could happen when you use TrueType fonts in your drawings. When a PDF is opened in Adobe Reader, text is displayed using the fonts loaded on your computer. When you send that PDF to your friend with another computer, the text is once again displayed. But the text is displayed using the fonts installed on your friend’s computer. If your friends doesn’t have the exact same fonts that you had when you made the PDF, this font corruption can happen.
How to fix PDF font corruption
Modify the default DWG to PDF.pc3 plotter driver. There is a semi-advanced setting that can help AutoCAD render fonts correctly regardless of what fonts happen to be installed on the computer viewing the PDF.

1. Start a new drawing and click the “Big A” button, go to Print and the click Page Setup.

How to get to the Page Setup dialog box

Launch the Page Setup Dialog box

2. Click the Modify button. Select the DWG To PDF.pc3 plotter driver and click Properties

Page Setup dialog box

Edit the DWG to PDF.pc3 plotter driver

3. Now you’re in the Plotter Configuration Editor. Open the Custom Properties for this plotter driver and change the Font Handling settings to “Capture all” and check the box “As geometry”. This will make AutoCAD plot every text object as a bunch of lines rather than as text. This way, it will not matter what fonts are installed on the computer that opens the PDF.

PDF plotter settings

Settings for Autodesk DWG to PDF plotter driver to embed fonts within the PDF

4. Save the changes to DWG To PDF.pc3. I would also rename the .pc3 to avoid overwriting the original DWG To PDF.pc3.I’ve been using this modified .pc3 driver for a few weeks now and I haven’t seen any recurrence of the font corruption problem. When I was researching this problem I read that this could make your PDFs larger. However, I have not seen any significant uptick in file size. Not that file size would matter when your title sheet is messed up.