Unselectable Viewport – unclipping a viewport with a deleted boundary

So you have an unselectable viewport?

This could be a symptom of several conditions.

  1. The viewport itself is on an off layer. This will show the content but no boundary so the viewport cannot be selected and moved etc. Check whether the viewport layer is off by turnign all layers on and unfreezing all layers. This should then reveal the boundary.
  2. The viewport has been put on Defpoints, which when combined with Layer 0 being off will display the viewport boundary but it will be unselectable. This is why Defpoints should not be used for any user geometry.
  3. Lastly and this is what I encountered today which is the first time for me is that someone has clipped the viewport and then deleted the clipping boundary. This gives a viewport that is completely unselectable by the mouse. However it can be selected using Quickselect, see below for the method to remove this viewport.

Unclipping a clipped viewport that has had its boundary delelted!

Firstly we need to create a rectangle, this is needed for a later step.

Then run Quickselect (its on the “Home” tab under the “Utilities” group),

Quick select location
Quick select location

and then select “Viewports” from the dropdown box at the top. Then go to the bottom box and select “Select All”.

Select all viewports
Quick select all viewports

Once all the Viewports are selected and if there are other viewports you want to keep, use the shift key to de-select the ones that have borders leaving only the one that has no boundary.

Then go to the layout tab and select “Clip”, and select the rectangle you created at step one. This will clip the old viewport to the rectangle.

View port clip
Viewport clip

You can now either delete the viewport and rectangle or move and edit the viewport as required.

I would however suggest deleting the viewport and rectangle as this issue could happen again and create a new viewport using the layout tab new rectangular viewport option.

Version Conflict Dialog Box

Sometimes when in a hurry you check the “don’t show me this again” to get rid of a box and then later on realise that it would be quite useful to have this box pop-up.

AutoCAD and LT has a way of restoring these that does not require deep diving into registry or settings files.

Just go to Options, System and click on the Hidden Message Settings button.

Hidden message settings options dialog

Once clicked you will get another dialog box where you can check the ones to restore from hidden and then click OK.

Hidden message settings dialog

More information can be found at the AutoDesk help file here.

AutoCAD’s “new” trim command

So, you’ve just upgraded to the shiny new AutoCAD or AutoCAD LT, thinking this is great, new version going to have some new features etc.

But to your dismay your TRIM command doesn’t work as you are used to. It automatically cuts to the next object without asking where you want to cut!

Have no fear this is easily solvable. If you generally trim to the next object, this has now saved you a load of mouse clicks and you can get the cutting edges part back by using the new option CuttingEdges.

trim command cutting edges

If you hate the new mode then you can revert to the existing by typing TRIMEXTENDMODE and setting it to 0.

NextGen Gallery Template V2 for captions under thumbnails

Unfortunately the NextGen gallery V2 templates documentation is a little confusing as some is for the old templates and some is about transitioning to the new. There is no basic page to explain what is going on. The best is here.

Thankfully there are really helpful people on the WordPress.org forum where they have explained various things.

Firstly I wanted to add captions below the thumbnails which was available in a standard template in the legacy setup but as they will be depreciating this shortly I thought I would set up the system properly with the new templates.

lheisey posted a very useful update on their issue which was the same as mine. Firstly you have to create the folder path as out of the box the install does not include this path, this can be done through CPANEL or FTP. The photocrati-nextgen_basic_thumbnails folder and its subfolder templates need to added. Full path is:

wp-content/ngg/modules/photocrati-nextgen_basic_thumbnails/templates/

Then you will need to create a file in the folder called something ending in -view.php. Mine I called test-view.php.

The contents of this file will be exactly the same as the one found at:

wp-content/plugins/nextgen-
gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/default-view.php

But with some additional code added at lines 55 and 56 (thank you to PostmasterGS in this post), this is slightly different to the code in the post as I could get the text to be visible with just a span, div or even with nested paragraphs inside. A heading with custom CSS solved that. I have used ak suffix so I can track the changes.

Adjusted code:

<div class="ngg-akcustom"><h6><?php if (!$image->hidden) { echo $image->alttext; } ?></h6></div>

In context (snippet from whole file):

 width="<?php echo esc_attr($thumb_size['width'])?>"
                    height="<?php echo esc_attr($thumb_size['height'])?>"
                    style="max-width:100%;"
                />
            </a>
        </div>
        <div class="ngg-akcustom"><h6><?php if (!$image->hidden) { echo $image->alttext; } ?></h6></div>
				<?php

				$this->end_element();

The accompanying CSS:

.ngg-akcustom h6 {
    color: #777;
	font-size: 12px;
	padding-right:5px;
	padding-left:5px;
}

Upgrading to PHP7

Not a CAD issue but a website one this time. I decided to bite the bullet and change my PHP version for the website from 5 to 7. This caused an “500 internal server error” which was not that helpful.

I turned on debugging (make sure you tutn it off afterwards) and that gave a slightly more “useful” error – “PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() ” – that was almost as cryptic but one search later and the soultion was easy.

For what is worth, I encountered the same error and the issue was solved by enabling the nd_mysqli extension in the PHP 7 configuration, and disabling the mysqli one.

Fracesco

Just change the PHP modules and your are sorted. One change later and all is good! Thank you Francesco!

Revit Frozen Palettes

A colleague of mine today had frozen palettes in their Revit LT. The properties and project browser were not clickable at all.

The solution is not as we discovered to reinstall but to reset Revit LT settings by renaming the registry folder group for revit as per the following video.

  • Close Revit LT
  • Lauch regedit
  • Go to current User –> Software –> Autodesk –> Revit 
  • Find whichever Revit you use , for example Autodesk Revit Revit LT 2018
  • Change the name Autodesk Revit Revit LT 2018_backup
  • Launch Revit LT again and the palettes should now work!

 

World coordinates not where they should be

When using world coordinates on a project I found that most of the drawings overlaid exactly. However one kept coming in off the others when attaching against World UCS. World UCS set correctly and checking the actual coordinates (with ID point) everything checked out OK.

So what was the issue?

The issue was for some unknown reason the base of the drawing was not set to 0,0,0! It was rather wonky to be exact!

Type base to find out what the current drawing is set to. With pretty much any drawing but particularly world coordinate drawings is should be 0,0,0.

Wonky Base coordinates.

Base set correctly

Random glitches, flat ucs and icon solid hatch

A colleague of mine could not hatch dots on a drawing at a higher density. I tried the usual regen and measurement commands to see if it was the hatch itself, however it was not to do with this.

After searching it could be a variable issue in the drawing but the drawing was from our standard template, but worth checking to see if HPMAXAREAS and HPMAXLINES were set to low values. They were not.

After further searching it became apparent that the drawing was a long way from the origin causing the glitches. This was apparent because the x leg of the UCS icon kept disappearing on zoom when in world UCS.

The glitches were:

  • Hatches not hatching properly at higher densities
  • ONSNAP not working properly
  • Fillet and trim not working properly

The solution was to create a drawing UCS closer to the drawing that fixed these glitches.

Indesign relinking alters size of images

If you are importing PDFs of AutoCAD drawings into Indesign to say create a presentation and you update one of the drawings that has been scaled to fit in a frame and is exactly the size you want it to be and then you relink and run into the following problem.

AutoCAD drawing is the same scale 1:1. The plot is the same size and the plot scale is the same size but when re-linking the drawing you find Indesign has unhelpfully resized the image to a random size. This is probably really useful if you do a lot of swapping the same images around at different resolutions but not helpful in this case.

Here you need to change the preferences.Go to file handling and deselect preserve image dimensions when reloading. Thank you David Blatner.

Creating a default layer sheet

As part of my preparing an AutoCAD drawing for my office’s layering system I managed to insert layers into a drawing from Excel using only scripting.

However the creation of a line and a text on each of the layers, so that users can copy and paste to get the layers etc. into new drawings, needed full AutoCAD and its access to LISP to create these quickly.

The script below is a modified (larger text and longer lines) version of a script, kindly written, from here.

(defun c:lintextfromlayer (/ pt dat ln)
(setq pt (getpoint “\nSelect insertion point: “))
(while (setq dat (tblnext “layer” (null dat)))
(entmake (list ‘(0 . “line”) (cons 10 pt) (cons 11 (mapcar ‘+ pt ‘(5000 0 0))) (cons 8 (setq ln (cdr (assoc 2 dat))))))
(entmake (list ‘(0 . “text”) (cons 10 (mapcar ‘+ pt ‘(5200 -125 0))) ‘(40 . 250) (cons 1 ln) (cons 8 ln)))
(setq pt (mapcar ‘- pt ‘(0 1000 0))))
(princ))