Ad

Thursday, July 16, 2020

Misc. Information

Add or Remove Ribbon Tabs

Easy Way

  • Right click on a Ribbon Tab. 
  • Choose Show Tabs, select the missing Tab

Hard Way (If the Tab is Missing Completely)

  • Type CUI at the command line. 
  • Select the Workspace to Edit on the Left. 
  • Press Customize Workspace.
  • Select the missing tab from the right side or upper main cui file or in a partial Customization Files below.
Right Click Shortcut Menus Missing
If your right click menu is missing, it can be reenabled by following the steps. 
  • Type OPTIONS at the command line. 
  • Go to the User Options tab. 
  • Make sure the “Shortcut menus in drawing area” is checked. 
  • Click the Right-click Customization Button. 
  • Uncheck the “Turn on time-sensitive right click” and make sure the remaining items are use the “Shortcut Menu” option.
Note that the time-sensitive right click can be useful to have enter as a quick right click and holding the right mouse button will show the desired Shortcut Menu. Sometimes reducing the duration is what is needed to make this a more user friendly option (125 milliseconds tends to work well).
Editing PGP File
The first step is to find the appropriate PGP file. To do so you can copy and pate the following line to the command line and press Enter. 
(findfile "acad.pgp")
This will let you know the command alias file that is currently being used. 
If one copies the path given, remove the duplicate “\”s.
The file may be opened in a Text Editor to be edited or the Express Tools => Command Aliases may be used to modify the file in a dialog box. 
PickAdd
The PickAdd variable toggles how objects are selected. 
  • If PickAdd is set to 0 then to select multiple objects the SHIFT key needs to be held down while selecting objects. 
  • If PickAdd is set to 1 then selected objects are added to the collection without holding down the SHIFT Key, but to unselect objects the ESC Key needs to be pressed.
I like using the SHIFT to select option since I don’t have to press ESC as much. To delesect an object all I need to do is make an empty selection.
If you are stuck using RDS through a browser I’d suggest having PickAdd set to 0 since if you have the browser full screen the escape key will force the browser to exit full screen. 
DDEDIT (Deprecated)
In recent releases Autodesk has deprecated DDEDIT and has removed the command and command alias from the product. The command has been replaced by the more human readable value of TEXTEDIT. If you copy settings from an older version this can cause problems. There are two options to resolve the issue. 
  1. Add DDEDIT as a Command Alias in the acad.PGP file (see instructions above). 
  2. Modify the double click actions in the cui. 
    1. Type CUI at the command line. 
    2. Expand the CUI and Partial Customization Files and check the Double Click Actions for Mtext, Text, and Dimensions and change the Macro to the TextEdit or MTEDIT. TextEdit works on MText.  
XREF Notifications
There are various system variables that may prevent XREF Notifications. 
  • TRAYSETTINGS - Verify Display icons from services is enabled as well as the Display notifications from services. 
  • XREFNOTIFY - Make sure the value is set to 1 (if you want to be alerted to missing XREFs) and 2 if not. 
  • XNOTIFYTIME - Make sure it is a desired value (The default value is nil) by pasting the following line at the command line: 
(getenv "XNOTIFYTIME") 
To change the value paste the following line at the command line: 
(setenv "XNOTIFYTIME" “Desired Time”)

Missing pc3 printer

Sometimes printers get moved or replaced and the plotter set in the pc3 file is not findable. To fix this problem run the Plot command. Select the pc3 file and AutoCAD should ask you which plotter to use. Select the desired plotter and save the results.

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);
        }
    }
}

LinkWithin

Blog Widget by LinkWithin

Ad