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.


Blog Widget by LinkWithin