Power Command Line

I discovered today that some code can be typed straight into the command line in AutoCAD. I had not realised this, I thought all code had to be loaded as a routine.

The following changes the PSLTSCALE for all layouts!

 

(foreach lay (layoutlist)(command "_LAYOUT" "_Set" lay "PSLTSCALE" 0))

 

UCS World

I received a set of drawings today from a colleague, whilst this is not unusual, the drawings all had differing UCS settings, which was unusual, most of my colleagues do not touch the UCS.

Usually I reset the UCS to world and carry on. I like my modelspace to to be set to world so when I copy and paste the rotation stays the same to the screen. I tend to then rotate the UCS in viewports as and when required.

This time, typing UCS, W to reset to world UCS left me with this, a wonky UCS.

Wonky UCS
Wonky UCS

The UCS is wonky, or Y is not up the page. The square in the UCS indicates it is set to WORLD, so I was confused.

The problem was not that the view was set to the UCS but the UCS was (kind of) set to the view. I will explain. (See bottom of post for a quick explanation).

If you type VIEWTWIST, it should be set to 0 for the UCS to be the way I wanted it. I found it was set to 270!

wonkyucs02

Now I have run into another problem, the VIEWTWIST variable is readonly!

So lastly I found that typing PLAN and setting to WORLD reset everything to how I wanted.

wonkyucs03

Interestingly this problem seems to be similar to the one a while back with rotating the view in AutoCAD LT.

—-

For a quick method of the above, if the UCS is not in the default position and it is set to world, then the view has been rotated. To rotate the view back, type PLAN, then WORLD. Or click on the arrows above viewcube in full AutoCAD.

Rotate from Viewcube
Rotate from Viewcube

Constrained

One of colleagues today noted that today he had annoying boxes. When I looked at his screen he had something like this.

Strange Boxes
Strange Boxes

These strange annoying boxes are constraints, part of AutoCAD’s parametric system, found under the Parametric Tab on the ribbon (strangely).

In order to use constraints you need to click the INFER constraints button on the bottom left of the status bar. This allows objects drawn in this mode to have the Parametric constraints. This button looks like this

Turn on Constraints
Turn on Constraints

Or this, depending on whether you use icons or not.

constraints01Once on you can draw your objects to be constrained. Here I have drawn a rectangle and a polyline. If I move the polyline the rectangle will deform as the polyline and the rectangle are linked or constrained together.

constraints04

constraints05

If you do not want this constrain feature on this object anymore you can click on the object and then delete constraints on the ribbon.

constraints06

Once removed the object returns to a plain old rectangle polyline.

constraints07

Remember to turn off the INFER constraints button before drawing anything else as all items drawn will have this parametric capability.

 

 

Not the Point

One of my colleagues had put a point in a block to stop it from “growing in size”. Whilst this is an ingenious work-around, it is easier to control the size of points if you don’t want them to be massive when zoomed out in a drawing.

If you type DDPTYPE into the command line you will get this dialogue box.

DDPTYPE Dialog
DDPTYPE Dialog

The circle with a cross is my usual selection for style, the point size can be relative to the screen, where 5% is usually about right, or for my colleague’s requirements, absolute. This is in the base units for the drawing, e.g. MM or INCHES.

Note that you can set POINTS to be tiny dots and therefore nearly impossible to see and these do not scale at all. This is useful as sometimes a drawing can be full of points that are “invisible”.

Match Properties

I have found that match properties has a settings box! This allows for selective matching rather than total matching. I never knew of this before! Have a look at this:

http://cad-notes.com/2009/06/autocad-match-properties-settings/

Cursor Trouble

So you got a nice shiny new machine, an AutoDesk certified graphics card and you’ve just installed the latest version of AutoCAD. All is great, you have lots of new features to help you productivity and you are steaming along. Then you insert an image and this image has a white background. Then your world falls apart. You can no longer see your cross hairs.

You have white cross hairs on a white background.

Don’t worry this problem can be sorted by turning off 3D acceleration. For some unknown reason AutoCAD does not have dynamic cursor colour when 3D acceleration is on!

Type 3DCONFIG in the command line, click “Manual Tune” and uncheck “Enable Hardware Acceleration”. The dynamic cursor colour now works.

Once you have undertaken the task needing the dynamic cursor colour feature you will probably want turn the acceleration back on.

3dconfig box

Paperspace Dimensions

One of my colleagues asked today, how do I get those paper-space dimensions to work?  As I tend to dimension in Model space (I need to research associative dimensions) on differing layers per style I never see the need to use paperspace dimensions.

So after a quick perusal of the Dimension style box, there is a check box to make the style to scale to paperspace. Cunningly called “Scale dimensions to layout”!

Dimension check box for paper space.
Dimension check box for paper space.

However strangely this did not work. After further searching I found that if the paperspace dimension is different when snapped to differing scale viewports then the DIMASSOC variable is most likely to be set to 1. Set it to 2. Then all will be good.

Rotating LT

One of my colleagues asked this morning how to easily rotate the view (and UCS) to help with drawing, now in full version of AutoCAD this is simplicity itself.

Rotate from Viewcube
Rotate from Viewcube

Just click on the arrows above the Viewcube to rotate the view and UCS simultaneously.

In AutoCAD LT this is more difficult, you can either use one of several command line methods, either using PLAN or UCS by object etc.

OR, this method seems to be easier (though it needs a little setting up). And here is how to do this.

Firstly, AutoCAD (LT) 2013 seems to come “out-of-the-box” with certain Panels turned off in the Ribbon. One of which is the UCS coordinate panel (why would they do this?) on View Tab.

Turn on coordinates panel.
Turn on coordinates panel.

Click on the View Tab and then right click anywhere on the panels below, then go to Show Panels, Coordinates. Now you have the coordinates panel which should have been there in the first place.

Secondly you need to make sure the view rotates with the UCS when you change the UCS. To do this click on the little arrow to bottom right of the Coordinates Panel, this brings up the UCS options box, Click “Update view to Plan when UCS is changed.” Click OK!

Enable Plan to Rotate with UCS
Enable Plan to Rotate with UCS

Now we are ready to go! (Phew!)

Rotate about the Z axis
Rotate about the Z axis

Click on the drop down menu which has Axes and a rotate arrow. Click on the Z icon and voila you can now rotate around the Z axis and the drawing will follow. The default selection is 90 degrees so hitting enter after clicking will rotate by 90 degrees.

So now its “one click and enter” to rotate the view and UCS in AutoCAD LT versus the “one click” in full version, hopefully a simpler method than all the command line options!

Phantom Drive in the Cloud

A slight tangent on my usual posts, but today I noticed that I had a 2nd hard drive in my Windows Explorer that I knew did not exist. This phantom drive turns out to be a mapped drive for AutoDesk Cloud Sync (360)! I think this came from a Beta version of AutoCAD that I have now uninstalled but my AutoCAD 2013 is still using Cloud Sync! I had no idea this was even running. Very annoying. Its been syncing data that I didn’t even want to be copied to the cloud.

This article showed me that I could find out what the Phantom drive was by running “SUBST” from the command line (CMD.EXE) in Windows 7. The results of this were as follows: (xxxx indicates personal info removed)
C:Usersxxxx>subst
Z:: => C:UsersxxxxAppDataLocalAutodeskAutodesk SyncCloudxxxx@xxx.com

That means, Z drive is actually a folder which is my AutoDesk sync folder. Hence the hard drives were identical in properties. Confusing.

Solution: Sign out of Autodesk 360. Drive and syncing stop. Awesome!

 

Flat World

One of my colleagues today could not work out why he could not draw vertically on the screen. All that would happen is the lines would draw horizontally. First I though it was a glitch and restarted AutoCAD but the problem persisted. It was not ORTHO or POLAR problems but actually a UCS problem.

The UCS had been set so that the drawing was being viewed from the side. All lines were being drawn on another plane! A quick, UCS (enter), W (enter) corrected the problem!