Ad

Saturday, December 07, 2019

Tree View Windows Shortcuts

https://forums.autodesk.com/t5/autocad-civil-3d-wishes-read/expand-collapse-all-in-toolspace/m-p/2550004

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.

https://insider.windows.com/en-us/articles/powertoys-v012-now-available/

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
{
    [CommandMethod("FixViewports")]
    public static void FixViewportsCommand()
    {
        var doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
        var db = doc.Database;
        var ed = doc.Editor;

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

            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);
                        vpTblRec.UpgradeOpen();
                        vpTblRec.Erase();
                    }
                }

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

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

                vpTable.DowngradeOpen();

                ed.UpdateTiledViewportsFromDatabase();

                tr.Commit();
            }
        }
        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.

https://forums.augi.com/showthread.php?158968-AU222-1-A-Working-Enterprise-CUI-in-Front-of-Your-Eyes

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):

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R23.1\ACAD-3000:409\Profiles\Design\General]
"ACET-ACETMAIN-MENULOADED"="1"

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

LinkWithin

Blog Widget by LinkWithin

Ad