Friday, October 14, 2011

AutoCAD Tips & Tricks

AutoCAD Tips & Tricks

Usage
You are free to use the information listed here, but it is copyrighted works and are not public domain. You may not sell, lease, or mass-redistribute this information on disk or electronically. You may not post this information online (including web sites, ftp sites, bulletin boards, and other online services) for public viewing, and you may not publish in print for public viewing without prior written consent of DotSoft.

Disclaimer
DISCLAIMER: DOTSOFT DISCLAIMS ANY AND ALL LIABILITY FOR ANY DAMAGES ARISING OUT OF THE USE OR OPERATION, OR INABILITY TO USE ANY INFORMATION AVAILABLE HERE. FURTHERMORE, BY USING THIS INFORMATION YOU AGREE TO HOLD DOTSOFT HARMLESS FROM SUCH CLAIMS. DotSoft makes no warranty, either expressed or implied, as to the fitness of this information for any particular purpose. All materials are to be considered 'as-is', and use of any information should be considered as AT YOUR OWN RISK!


Application Interaction

Is there a limit on rows/columns from my OLE spreadsheet?

There is a limit, and that limitation is not necessarily AutoCAD's fault. To see a graphical example of this, select a large range in the spreadsheet, then look at the clipboard viewer.  You will find the clipboard viewer in the accessories or system tools section of the Windows start menu.  If you don't have this program you will need to use the Add/Remove Programs applet of the Windows Control Panel to add it.   It will be in the System Tools section of the Windows Setup tab.

When you look at the clipboard viewer, you should see that the Windows clipboard has limited the data when presented in certain 'flavors'. When you use the ole link, you lose rows and/or columns.

If the link is not required, you may be able to get more of the data into AutoCAD by using the Paste Special option from the menu and choosing an option like 'AutoCAD Objects'.

Shaking the OLE from Excel Graphs

When you paste pie/bar graphs from Excel into AutoCAD, they can exhibit all the problems of a typical OLE insert, including plot rotation, etc. Use this procedure to 'shake off' the OLE.

  1. In Excel, copy your graph to the clipboard.
  2. In AutoCAD, issue the PASTESPEC command, choose Excel Chart, your only choice at this point.
  3. In AutoCAD, right click on the chart and choose CUT.
  4. In AutoCAD, issue the PASTESPEC command again, choose AutoCAD entities.
  5. Erase the outer border and background solid to reveal a good looking collection of native geometry
 

 Block/Attribute

How do I control the prompt order for attributes?

When building the block definition, the selection order is the key.  If you simply window off the geometry there is a good possibility the prompt order will not be as desired.  When selecting objects for a block definition, first individually pick the attribute definitions individually in the order you want to be prompted, then select the rest of the geometry.

Importing Block Definitions

If you want to bring in only the definition of a block (such as a symbol on disk), you can use this little known trick.  After issuing the insert command and selecting the file, press the ESC key at the first (insertion point) prompt.  You will have the definition in the current drawing for latter use.

Add Descriptions to Blocks

Later versions of AutoCAD have the ability to add descriptions to the block definitions in the drawing.

  1. Issue the BLOCK command.
  2. Select the block from the list at top.
  3. Click in the lower 'Description' section and enter the description.
  4. Choose OK to redefine the block with the new description.

Building a block with fields (2006+)

This procedure will explain how to create a coordinate label block that updates as you move or copy it.

  1. Issue the BEDIT (block edit) command.
  2. Enter the desired name, like COORDBLOCK and chose OK.
  3. Draw the desired point identifying geometry, such as a circle at 0,0 with a radius of 0.25.
  4. Issue the ATTDEF command.
  5. Turn on the Preset toggle in the upper left, this makes for faster inserts as AutoCAD won't prompt for the attribute values (which is automatic anyway).
  6. Enter NORTHING for the tag and prompt fields.
  7. To the right of the Value field, click the 'Insert Field' button.
  8. In the Field Names list on the left, click 'BlockPlaceholder', this is a special area only available during block building.
  9. In the middle column, choose the 'Position' property.
  10. In the right column, format your output as desired. In this example turn off the X & Z fields and 'Current Units' is the recommended value. While you can lock the precision to a fixed number of places, it's not easy to modify a field based attribute later.
  11. Choose OK after completing the field formatting.
  12. Change 'Text Options' as desired. For this example we are only changing the height to 1.0.
  13. Most likely you will want to turn off the 'Lock Position' toggle so you can move the attribute after the insert.
  14. Choose OK to complete the first attribute. When prompted for the insertion point, pick a location or enter coordinates such as 1.0,1.2 for this example.
  15. Repeat at step 5 for the EASTING & ELEVATION field attributes, the only other difference being that the 'Align below previous' toggle should be turned on to make positioning easier.
  16. Issue the BCLOSE command or choose the 'Close Block Editor' button at the top.
  17. Choose Yes to save the changes.

At this point the COORDBLOCK is defined and ready to insert. As you insert them into the drawing the coordinates are filled in automatically. After moving an insert issue the REGEN command to update the values.  To make the block available for inserting into other drawings, it will need to be WBLOCKED to a separate DWG file.

  1. Issue the WBLOCK command.
  2. Choose the Block button and select COORDBLOCK in the list.
  3. Click the [...] in lower right to specify a filename.
  4. Changing the Insert Units to 'Unitless' is recommended.
 

 Construct/Draw

Inserting Drawings, Consider the BASE

When inserting blocks (or entire drawings) from a seperate DWG file, it may not come in 'attached' to the cursor, or in the right place. When preparing a drawing and its geometry to become 'insertable' into another drawing, you must consider its coordinates and then optionally the BASE variable. The preferred method for blocks is to move the geometry from the desired 'anchor' to coordinates of 0,0,0. If you don't want to do that, you should issue the BASE command and pick a point at the anchor.

Another problem scenario to watch out for is when the geometry has been moved to 0,0 and the current drawing had a base other than 0,0. In this case simply issue the BASE command and type in 0,0,0.

Some offset distances are greater than specified?

This can expecially occur when offsetting polylines.  As the interior angle decreases, the distance between offset endpoints increases.  However in parallel sections the perpendicular distance 'should' always be 100. For example with a 100 unit offset.

  • 135° interior angle = 108.35
  • 45° interior angle = 261.60

In general a more accurate representation of the offset would be achieved if you filleted the resulting polyline to 100, making most points along the path truly 100 units away, even in the 'bends'.

AutoCAD 2000 addresses this issue, see the OFFSETGAPTYPE system variable.

Why won't AutoCAD create my large array?

AutoCAD sets a default limit of 100,000 segments. If the quantity of rows * columns would exceed that, AutoCAD refuses to create the offset. However you can change the default value to any number from 100 to 10,000,000. To increase the value, enter the following at the command prompt. The example shows increasing the value to 50,000. Note that the name MaxArray is case sensitive and must be entered as shown.

Command: (setenv "MaxArray" "50000")

Relative Coordinates

Frequently in designating points in AutoCAD, you need to specify the relative position of the next point. There are several ways to do this:

Relative Cartesian: You simply specify the X/Y difference as positive or negative values. The following example indicates the next point is 12 units to the right (positive X) and 6 units down (negative Y). (Example)To Point: @12,-6

Relative Polar: You specify the distance and angle to the next point. The following example indicates the next point 15 units away at a 45 degree angle. (Example)To Point: @15<45

Relative Cylindrical: Much like relative polar except you have the ability to designate the amount of rise or drop at the new point. The following example indicates the next point 15 units away at a 45 degree angle, but also is 6 units lower. (Example)To Point: @15<45,-6

Relative Spherical:Much like relative cylindrical except the rise or drop is determined by an angle. The following example indicates the next point 15 horizontal units away at a 45 degree angle in plan view, but also lifts 12 degrees in the XY plane. (Example)To Point: @15<45<12

AutoCAD's Geometry Calculator

People often don't know about AutoCAD's built in geometry calculator.  While it lacks in interface appeal it more than makes up for it in capability.  Take the ability to snap to a point between to endpoints.  Consider this example where a circle is placed halfway between the endpoints of two lines.

Command: CIRCLE
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: 'CAL
>> Expression: MEE
>> Select one endpoint for MEE:
>> Select another endpoint for MEE:

The key is when prompted for any point, enter 'CAL and type in the expression.  In the case of MEE it knows you want endpoints and you don't have to use an object snap when picking.  Also bear in mind that MEE is only one of dozens of expressions available at the prompt.  Read your AutoCAD documentation on the Geometry Calculator for more.

How do I enter boundaries in bearing & distance?

First you need to set the appropriate units in the DDUNITS command.  Set the angular units to 'Surveyor', then choose the direction button and make sure that 'Angle Direction' = east, 'Rotation' = counter clockwise. Even though you have set to Surveyors Units it won't work right unless set this way.

Then using the LINE or PLINE command you enter the calls as relative polar coordinates.

Command: LINE
Start Point: (Pick One)
Next Point: @123.45<N45D30'15"E
Next Point: @234.56<S25D10'10"W

Notice the syntax for the relative polar coordinate. You put the @ sign first, which means relative to the last point.  Next comes the distance. Last is the bearing. Its enclosed in the quadrant NE, NW, SE, SW, note the use of letter D to indicate the degrees.

The underutilized AutoCAD MULTIPLE command

When you need to repeat a command several times, consider the MULTIPLE command. At the command prompt type MULTIPLE followed by the command. Take the POINT command for example. Without the multiple prefix you would need to reissue the command before each pick location, now you can repeatedly pick the points until done.

Press ESC to cancel the repeating command.

Using BPoly to Shrinkwrap

Users often need to generate a boundary polyline around multiple polygons or a collection of 3dfaces forming a surface definition. Bpoly/Boundary is overlooked as a tool to help with this, because its considered to only work from the inside out. Simply surround your geometry with a rectangular polyline.  Create a new layer and set it current. Then issue the BPOLY command, and pick a point inside the rectangle.
 

 

 Display

Why does AutoCAD regen every time I zoom or pan?

You may occasionally receive a drawing from an outside source that causes this problem. Simply type VIEWRES at the command prompt, say YES to fast zooms, and set your circle zoom percent to around 200.

Why does the Object Properties Toolbar Stop Working?

When you pick objects at the command prompt, they highlight and grips appear. On the object properties toolbar the layer and/or color of the object usually appear so that you can change them.  But on some systems this stops working.  This is because the noun/verb selection has been turned off.  Simply type DDSELECT at the command prompt and turn on the 'Noun/Verb Selection' toggle. The Object properties toolbar will start working again.

Number of Command Lines

When you press F2 and look back at the command history, you may notice that at some point it stops. The default number of lines is set to 400. On R14 you could change it in the preferences dialog. Unfortunately 2000 and higher has regressed. You have to use a to lisp expression setting like MaxHatch.

To check the current number of lines set:
Command: (getenv "CmdHistLines")

To set a new maximum number of lines:
Command: (setenv "CmdHistLines" "1000")

The number you use must be in a range from 25 to 2048!

Lost Command Line

Almost all AutoCAD users utilize the command line area to some extent. Recent versions of AutoCAD allow it to be turned off and it can be as easy as accidentally pressing Ctrl + 9. You can use these commands to control it.

Command: _CommandlineHide
Command: _Commandline

Keeping the UCSICON in the corner

If you don't use a UCS you might as well use UCSICON off. If you do you might want to keep it in the lower left corner. Use the 'Origin' and 'No Origin' options of the UCSICON command to control the position of the UCSICON.
 

 

 Hatches

Why won't AutoCAD create my dense hatch?

AutoCAD sets a default limit of 10000 segments. If the hatch that would be created would exceed that, AutoCAD refuses to create the hatch. However you can change the default value to any number from 100 to 10,000,000. To increase the value, enter the following at the command prompt. The example shows increasing the value to 100,000. Note that the name MaxHatch is case sensitive and must be entered as shown.

Command: (setenv "MaxHatch" "100000")

Why is my hatch scrambled?

Sometimes when you attempt to hatch an area (especially in large coordinate drawings), the hatching can appear scrambled. The hatch pattern does not have enough precision to work properly in the larger coordinates. Use this simple workaround:

  1. Issue the SNAPBASE command and pick a point slightly below and to the left of the area to hatch.
  2. Hatch the area, it will look correct now.
  3. Reissue the SNAPBASE command and put in 0,0 (or previous value).

Adding Custom Hatches

In AutoCAD versions prior to 2000, you could put additional hatch pattern definitions at the end of your ACAD.PAT file, and add
the appropriate slides to the ACAD.SLB file to make them show up in the BHATCH dialog.

AutoCAD versions 2000 and later do not use the ACAD.PAT/SLB at all. Instead of putting all the definitions in the ACAD.PAT, it is best to put each pattern definition in a separate PAT file. The path where these PAT files reside must be in the AutoCAD support paths as well. There is some benefit to using a short path such as C:\CADSTUFF, because the BHATCH dialog shows the path before the patten name, and long paths make the pattern name fall off to the right of the list.

To select your custom pattern, issue the BHATCH dialog and choose the pattern select button {...}, then choose the Custom tab to select your pattern.

Hatch Pattern Snaps (2005+)

There has been a change in behavior in AutoCAD 2005 regarding the object snaps on its geometry. In previous releases osnaps would honor hatches, in 2005 they are ignored by default. To turn on the snap to hatch, access the OPTIONS dialog (Tools menu), go to the Drafting tab, and in the lower left you will find the toggle.

Also there is a command line system variable OSNAPHATCH, set to 0 for off (no snap), 1 for on (snap).
 

 

 Images

How can I make working with IMAGES easier?

If you frequently insert images, having to position, scale and rotate them each time, try this simple trick. Begin a new 'empty' drawing. Insert the image, position, scale and rotate it into place. Make any other changes such as contrast, then save the drawing. From now on, simply insert the newly created drawing, not the image. The attached drawing will contain all the settings.

Add Image Support to AutoCAD

By installing the Raster Design Enabler, you can add support for additional image formats (such as MrSID) to your basic AutoCAD.

From the Autodesk Website: "The Autodesk® Raster Design 2007 Object Enabler is a freeware application that you can use to display Autodesk Raster Design 2007 image files."

Simply visit the link below to download the appropriate enabler for the version of AutoCAD. After you install it, check your image insert 'files of type' popdown for the new formats.

This is of course unsupported (including by us), and while we haven't tested all the formats, we have confirmed the addition of the MrSID and ECW format.

Image Clipping Expanded

The first procedure explains how to clip multiple areas of a single image insert. It assumes you have the image in place and know which
portions you wish to remain visible. Assume in this case you want to keep the lower left and upper right portions of the image.

Begin the IMAGECLIP command, enter N for New boundary, then P for Polygonal and pick the points in this order. Note that picks for
C/I and D/H are the same location.

        E    F
  --------x----x                 ----
  |            |                |    |
  |     D x    x G   --->       /----
  |         H  |               /
B x  C x       |          ----/
  |      I     |         |    |
A x----x--------          ----
       J

Any number of points can be used, just make sure you follow the path back to the point of beginning.  A second procedure can be used to create a blank hole in an image. In this case C/J and D/I are the same points.

              C J 
B x--------x-------x K         +--------x-------x
  |         I      |           |        |       |
  | E x    x   H x |    --->   |   +----+----+  |
  |       D        |           |   |  CLEAR  |  |
  | F x        G x |           |   +---------+  | 
  |                |           |                |
A x---------------- L          +----------------+

Finally, make sure IMAGEFRAME is turned off. Note that this newsletter is sent in plain text. If your mail tool is set to force a proportional font, these character graphics may be skewed.
 

 

 Inquiry

Horizontal Distance

To get the horizontal distance in a drawing that has differing elevation values, you can use AutoCAD's point filters. In response to the point prompt, enter .XY and press the spacebar, pick your point with the appropriate osnap, then enter 0 for the Z value.

Command: DIST
Specify first point: .XY of *PICK* (need Z): 0
Specify second point: .XY of *PICK* (need Z): 0

Find Command to Select Blocks

You can use the Find command to select blocks by their attribute values. Use this procedure.

  1. Open the drawing containing the blocks.
  2. Initiate the FIND command.
  3. Enter the value of the attribute.
  4. Choose the [Select Objects] button and select all the blocks.
  5. Choose the [Select All] button to select the matches.

Of course ToolPac users take this farther by specifying multiple fields to match and operators such as less than, greater than, etc.
 

 

 Interface

How can I balance right click behavior?

Starting with AutoCAD 2004, you can find a compromise between the old rightclick=enter, and the new rightclick=menu. A new 'time sensitive right click' gives you the best of both worlds.

When this is turned on, a quick click of the right mouse button is the same as pressing enter. Holding down the right mouse button longer than the specified time yields a context sensitive menu (when appropriate).

  1. Command: OPTIONS
  2. Choose the 'User Preferences' tab.
  3. Turn on 'Shortcut menus in drawing area'.
  4. Choose the 'Right-click Customization' button.
  5. Turn on 'Time Sensitive Right Click'.
  6. Change interval if desired.

Classic Commands

For those running AutoCAD for a long time, the new image and xref dialogs are a big change. To access the old versions of the dialog, use the CLASSICIMAGE and CLASSICXREF commands.

Restore Classic Appearance

Recent versions of AutoCAD are evolving into an interface that hardly resembles what many are accustomed to. Here are a few commands that can help return AutoCAD (partially) to that state.

Command: WORKSPACE C AutoCAD Classic (sets classic workspace)
Command: MENUBAR 1 (restores pulldown menus)
Command: RIBBONCLOSE (turns off the ribbon)

In addition, the WSSAVE command can be used to save changes to a workspace so they 'stick' and won't revert when making changes.
 

 

 Layers

Why isn't my layer table sorted?

If you begin working with a large number of layers (around 200), you may notice that the layers are not sorted in the layer dialog. Instead they are shown in the order they were created. AutoCAD uses a system variable MAXSORT to control how many layers to sort on layer control as well as how many files to sort on file open. Simply type in MAXSORT at the command prompt and put in a numeric value larger than the default value of 200. This value is stored in the configuration files and won't need to be reentered in your next drawing.

Don't Plot That Layer!

A trick in AutoCAD that has been around for the longest time is a layer name that won't plot regardless of its status. Create a layer in your drawing called DEFPOINTS. Use it to place notes to yourself, construction lines, etc. It also an excellent layer to put paper space viewports into, since the frames don't plot.

No Xref Layer Filter

If you want your layer dialog to show only layers in the current drawing and exclude all xrefs, create a filter with a name like NOXREF, then put this in for the layer name "~*|*" (without the quotation marks).

Delete All Named Layer Filters

Later versions of AutoCAD have the ability to delete all named layer filters quickly.

  1. Open the Layer dialog box.
  2. Open the Named Layer Filters dialog using the [...] button in the upper left corner.
  3. Choose the [Delete All] button in the lower right.

Copy Layer Table

Beginning with AutoCAD 2005, you can copy the contents of the layer dialog to the clipboard for pasting into other applications, mainly for printing. With the dialog displayed, issue the Ctrl+A keystroke combination to select all the records, then use Ctrl+C to copy the contents to the clipboard.

New Layers (Frozen in Existing Viewports)

Starting with AutoCAD 2008, the layer dialog has a new icon just to the right of the 'New Layer' icon. Use it to create a new layer that will be frozen in all existing layout viewports!

Another Classic - ClassicLayer

Some users of newer versions of AutoCAD are reporting slow behavior in using the new Layer dialog that floats and remains open. This new dialog must constantly monitor AutoCAD to maintain an accurate reflection of the layer status in the drawing, including reacting to changing the active drawing, etc.

For those who want faster response or those that like the old way better, use the ClassicLayer command to initiate the old dialog.
 

 

 Layouts

Is there a limit to the number of layouts in a drawing?

Yes, it is limited to a total of 255.  Autodesk notes this as a limitation of the tab control used to display the collection.

Why don't my layouts plot in the correct order?

This is a bug in AutoCAD that still remains.  Click here for a (confusing at best) explanation by Autodesk.
 

 

 Linetypes

Why won't my linetypes display?

Sometimes it seems that no matter how you try, you can't get line types with breaks to show the breaks. First thing to remember is that 3D polylines in AutoCAD cannot display a line type, nor can they have width or contain arcs for that matter. However, most other objects should if things are set right.

First check the value of LTSCALE, this master control variable determines the scaling of the gaps in linetypes. You may find this variable set to 1.0, which would not show breaks on a map. Enter LTSCALE at the command prompt and put in a value that is 50% to 66% of the scale at which you would plot the map. For example, if you would plot the drawing at 1"=50', you should put in a value between 25-35 for LTSCALE.

If LTSCALE doesn't set things straight, there is a possibility that your geometry has a CONTINUOUS linetype set to each object, in which case it won't take on the linetype of the layer on which it is assigned. Simply issue the CHPROP command, select the geometry, type LT for linetype, and enter BYLAYER for the value.

If this still doesn't display the linetype's properly, you probably have polylines with vertices that are close together. To correct this use DDMODIFY, select the polyline, and turn on the LTGEN toggle in the dialog.

Arc Text Linetypes

When using text in linetypes it's often difficult to control the direction the text reads, especially in arcs. For true arcs you would need to convert them to polylines, using PEDIT.  Next, be aware of the effect of polyline generation. This flag needs to be turned on for the polyline to honor the direction.  This flag can be set using the PROPS dialog.  Lastly, you may need to reverse the polyline to control the reading direction.

The main thing to remember is that without the polyline generation flag set, the text will always read counterclockwise in the arc segments of the polyline.
 

 

 Modify

Changing Elevations Using Move

Many AutoCAD users only think of the MOVE command for moving a selection set of objects in an XY direction. Don't overlook the fact that the MOVE command can work perfectly for moving objects up and down the Z axis as well. To change elevations of objects where you know the distance you want to raise or lower, use this procedure.

  1. Issue the MOVE command.
  2. Select Objects to change.
  3. For Base Point, simply pick anywhere.
  4. For 2nd Point, enter this: @0,0,ZDIFF

Where ZDIFF is the amount you want to raise or lower. Use a negative number to lower and a positive one to raise.

Misbehaving Trim/Extend

Sometimes users complain about the TRIM or EXTEND commands not creating the desired results. The resulting point being short of (or past) the target edge. These commands are affected by the settings of TRIMMODE and PROJMODE system variables, which should both be set to 1. You'll notice these as options in the commands as well.

Deleting Problem Objects

There are times when you would like to erase all of a particular object type from a drawing, such as Wipeouts and Proxy objects.  Paste in the following at the command prompt, then press enter.

Command: (command "ERASE" (ssget "x" '((0 . "WIPEOUT"))) "")

You can use this same syntax and replace the object type at the end of the statement. For example on proxies replace "WIPEOUT" with "ACAD_PROXY_ENTITY".

Toggling Groups

If you start to manipulate an object and multiple objects are highlighted, that means they are bound in a group or a block. If you use the list command, it will list as a block if that's the case. If it lists as objects, you have a group.

If you have a group, you can toggle the status of group selection with Ctrl+Shift+A on newer versions or simply Ctrl+A on older releases. The command line will echo the status of the toggle.
 

 

 Objects

Object Cycling

Object Cycling has been around since R13, but isn't a widely known ability, perhaps because it's not a command. Whenever you are at the 'Select Objects' prompt and have overlapping objects, simply hold down the Ctrl key as you pick a location. AutoCAD will cycle through the objects at that location, highlighting each one until you accept one and move on.

XLINEs and RAYs

AutoCAD R14 brought with it many new object types. Many of these such as images are widely accepted. Many more (such as XLINE and RAY objects) remain underutilized.

XLINE objects make an excellent construction line. They don't change the drawings extents so they don't affect zoom extents. They never need to be extended because they run infinitely in the direction they are drawn.

RAY objects work like XLINE, except they extend infinitely only in one direction. This can be used for radial construction lines from a single point.

What are ProxyObjects and can I delete them from a drawing?

They are custom objects that require the presence of the application that generated them to be 'fully' functional.  Sometimes when the application is absent they will still appear/plot the same but you can't edit them or acquire information about them.  Sometimes you might even get a box with an X through it as in the case of the RTEXT object.

The AEC group of Autodesk deserves credit for releasing the recent versions of the Object Enabler. It is free and allows recipients of drawings with their proxies to see and do more with the otherwise impossible representation.

Depending on your situation, saving the drawing in an R12 format (different file name of course) is a brute force approach to purging the drawing of proxies.  However depending on whats contained it can have ill effects.
 

 

 Paper Space

Transporting Paper Space Viewports

During the process of wblocking or copy/paste clip, Viewport objects can appear to become zombies, not displaying the model space geometry they formerly showed. Transporting viewports seems to turn off the viewports. After any wblock/copy+paste operation use the MVIEW command with the ON option to turn the viewports back on. Once the viewports are turned back on they should show their previous contents properly, including the layer status.

How do I switch between overlapping viewports?

When you have two or more paper space viewports that overlap or are contained within another, it can be difficult to impossible to switch with the mouse pointer. Therefore the keyboard command for this can be indispensable.  The keyboard command USED TO BE Ctrl+V, but since Windows knows this as paste, Autodesk changed the command. The new command sequence is Ctrl+R.

PSLTSCALE is per Layout

It's not widely known that the PSLTSCALE variable has an independent setting on each layout. After you set the value for one layout, you may need to switch to other layouts and set it as appropriate.

Layout Limit

Q: Is there a limit to the number of layouts in a drawing.
A: Yes, there can only be 255 layouts in a given drawing.
 

 

 PDF Related

Scanning to PDF a waste of time

Its recently came to our attention that many scanners come with software that scans old drawings to a PDF, and that users are doing just that. The follow up is how to put that in AutoCAD.

This is a waste of time and effort. The most efficient way is to scan to a raster file and use AutoCAD's IMAGE command to attach the image to the drawing. Avoid using JPG format, while it works well for photos it does not work well with line drawings. Use the PNG format if available, or use TIF if not.

PdfUnderlay Performance

Some users are reporting slow performance when they use the new PdfUnderlay functionality in 2009 (w/subscription) and 2010. It mostly depends on the content of the PDF, which can often be a bloated mess. Not all PDF creators are equal. For example, while one driver may write out text as a lean text element, another may (especially if its width factor is changed) write out each letter as a large collection of filled triangles. Take for example this innocent looking letter "S", which contained 471 objects!

AutoCAD doesn't know it's a letter S and has to treat it with as much importance as any other part of your file. This users file (PDF Size 1.2mb) contained nearly 325,000 objects that obviously was bogging down AutoCAD.

You can turn off the PDFOSNAP system variable to improve snaps.

Cannot Snap to PdfUnderlay

Not all PDFs contain geometry that AutoCAD can snap to. Many times the PDF is a scanned image that has such high resolution that the content looks like linework. You can usually zoom in tightly to begin to see the jagged edges of an image.  Check your PDFOSNAP system variable; it should be set to 1.
 

 

 Plotting

Quick & Easy Plot to Raster

While the highest quality result is by defining a raster plotter (below), it's easy to create a raster using the BMPOUT, TIFOUT, or PNGOUT (our favorite) commands.

Plotting to a raster file

A popular inquiry from AutoCAD users is how to plot a drawing to a raster file (or bitmap/picture). This is often in response to the need to provide a 'picture' of the drawing without actually providing the DWG, or perhaps a drawing is to be displayed in a web page.

First is the simple to use (but less control) command called BMPOUT. It creates a Windows Bitmap .BMP file, appropriate for Paintbrush but not ready for a web page. It captures the whole drawing viewport so center your drawing as well as possible before issuing the command. The following procedures can be used to 'plot' your drawing to a raster file.

Setup:

  1. Choose File > Plotter Manager.
  2. Choose 'Add-A-Plotter Wizard'.
  3. Choose Next, then Next again (accepting My Computer).
  4. Under Manufacturers, choose 'Raster File Formats'.
  5. Under Models, choose 'Portable Network Graphics PNG'. (details on why below)
  6. Choose Next until the Finish button becomes available.

Usage:

  1. Issue the Plot Command.
  2. On the Plot Device Tab, choose the PNG output created.
  3. Choose the Properties button, and choose the output resolution desired.
  4. In the lower right corner, specify the path and filename to create.
  5. Switch to Plot Settings tab, specify the window and complete the plot to file.

You may wonder why the PNG file was chosen. It is a clean highly compressed format. In comparison, the JPG (JPEG) format is absolutely NOT a desireable format for representing linework in raster format. While JPEG is fine for photographs, it is a 'lossy' compression and will produce noticable 'snow' on line drawings, expecially diagonal lines.

The PNG file is your best choice for raster output. It is very compact in size and is a 'loseless' compression. It can be displayed by all 'current' web browsers as well.

Plotting Multiple Sheets

Some may not know that in newer versions of AutoCAD which support the new layouts that you can select multiple layouts to plot. At the command prompt, simply hold down the control key and click on each layout you want to plot, or use shift to select a range.  Once you've got the desired layouts selected you issue the plot command.

Auto Publish (2008+)

Newer versions of AutoCAD contain the capability to automatically create a DWF or PDF (added in 2010) file when you save or close your drawing. To setup the system go to the OPTIONS dialog, then choose the |Plot and Publish| tab. In the lower left you can turn the system on/off and control the settings.

The settings dialog allows you to designate when the publish is to take place, where the files go, etc. Various options exist in 2010 for things like layer information, merge control, and more.
 

 

 Polylines

Why won't my 3D polylines display a linetype?

3DPOLY's cannot contain arcs, display linetypes or show width or thickness.  However, you can assign a linetype style to a 3D polyline and it will retain the information.   Simply save the drawing, explode the 3D polylines before you plot (the LINES will display the linetype), then undo to restore the 3D polylines.

Why don't my splined polyline vertices go through the original vertices?

As you probably know, using the Spline option ofthe PEDIT command creates a splined polyline but the path of the spline does not run through the original control points. In contrast the spline created with the SPLINE command does run through thecontrol points and is the end result you want. Back on the negativeside the SPLINE command has an option to convert an existing polyline, but only one that has been splined. The converted spline is still not what you want.

So the best way with stock AutoCAD is to turn on the endpoint osnap,issue the SPLINE command and get starting picking points. ToolPac users will find Convert Polylines to Splines that will process a selection set of un-splined polylines and give you the results you want.

How can I draw a tangent line off an ARC within a polyline?

You may have noticed that when you go to the ARC mode within the PLINE command, the first and consectutive arcs are tangent to the previous segment.  To create a tangent line off the last segment, first press L for Line mode, then press a second L for Length.  Pick or enter a distance and the segement drawn will be tangent off the last arc.  Its the 2nd L that does the trick.

How can I convert R14 LightWeight Polylines back?

At the command prompt type CONVERTPOLY. This undocumented command built into AutoCAD R14 allows you to convert lightweight polylines to the old 'heavy' polylines, preserves arcs and polyline width. Some 'not so current' applications may require standard polylines.
 

 

 Security

How do I disable 2004 Drawing Passwords?

The password on 2004 (and higher) is a potential nightmare. One scenario is a disgruntled employee who decides to password protect important drawings on their way out the door.

When installing, consider choosing the Custom Install, and turn off the Drawing Encryption option in Special Features.  After installation use this procedure.

  1. Choose Start > Settings > Control Panel.
  2. Choose Add/Remove Programs.
  3. Find AutoCAD on the list.
  4. Choose the [Change] button.
  5. Choose 'Add or Remove Features'
  6. Choose 'Drawing Encryption'
  7. Choose 'Entire Feature will be unavailable'
  8. Choose [Next] until complete.
 

 Splines

How can I convert a SPLINE to a POLYLINE?

The new SPLINE objects introduced in R13 are nice, but there arelimits on what you can do with them. So conversion to a polyline is necessary. Carefully erase all the geometry except for the splines, then save the drawing in R12 DWG (A2K users use R12 DXF) format. Then open the original drawing, erase the splines and insert the R12 file.The spline will now have become polylines.  If the splines haddiffering elevations on the vertices, the resulting polyline will be a 3D polyline.

For ToolPac users, use Convert > Splines > To Polylines.  For others SPL2PL.VLX in the Free Stuff section will convert, but does not contain the arc option like the one in ToolPac.
 

 

 System Variables

What happened to my PLOT/FILE dialogs?

You may occasionally find yourself in a situation where the NEW, OPEN, and SAVE commands do not provide a dialog. Simply enter FILEDIA at the command prompt and enter a value of 1. If you attempt to PLOT and fail to get a dialog, simply enter ` at the command prompt and enter a value of 1.

Using File Dialog at prompts

Sometimes settings (such as FILEDIA) can cause certain routines to ask for a file name at the command prompt. In these cases you can enter the tilde ~ character followed by enter to bring up the file selection dialog.

Ignoring Object Snap Elevations

A frequent problem in objects snaps is the inheritance of the Z value when snapping to a point. AutoCAD 2006 addresses this with the new OSNAPZ system variable. If set to 0, osnap uses the z-value of the snapped point. If set to 1, it uses the x+y of the snapped point and the current value of the ELEVATION system variable.

Also note that when creating lightweight polylines, the elevation of the first snap will determine the elevation. After that, any snap to other elevations will be ignored.

What is the OFFSETGAPTYPE variable in AutoCAD 2000?

This system variable can have a drastic effect on the appearance of offsets. Its stored in the registry so it affects all drawings. The initial value is 0.

  • 0  Extends the segments to fill the gap (the old way)
  • 1  Fills the gaps with a filleted arc segment (the radius of the arc segment is equal to the offset distance)
  • 2  Fills the gaps with a chamfered line segment

What is TREEDEPTH?

Users with HUGE drawings may want to consider changing the value of the TREEDEPTH variable. It controls the AutoCAD Oct-Tree Spatial Index, which specifies the number of times the tree-structured spatial index may divide into branches. Setting the value to -3020 flattens the Z index giving you more granular nodes in the XY which yields faster object selection. It has no effect on the elevations of your objects.

PELLIPSE System Variable

If you want the ellipse command to create polylines instead of the true mathematical ellipses, set the PELLIPSE variable to 1.

SKPOLY System Variable

By default, the SKETCH command creates a collection of line objects. To create polylines instead, set the SKPOLY variable to 1.
 

 

 Tables

Table Spanning (2008+)

Tables can now be broken into multiple parts but still be part of the same table. At the bottom of every table object is a triangular grip.  Simply click and drag this grip to set the breaking height for the table.
 

 

 Text/Mtext

How can I do subscript/superscript text?

There is no way to do it in standard TEXT.  However you can do it in MTEXT using the stack mechanism.  As an example bring up the MTEXT editor dialog and paste in something like:

Raise to the 3rd^   Power!

Basically the formula is to use the ^ carat symbol along with the same number of spaces as you have characters to shift up/down.  In my example above I would enter this into the MTEXT editor dialog box, there are three spaces after the ^, two to balance the shift of the 'rd' and a third for the natural space between the words.  In the MTEXT editor I would highlight the 5 characters "rd^ ", then press the A/B stacking button in the dialog. The 'rd' then becomes superscript.  To achieve subscript simply reverse the order putting the spaces and carat first, for example " ^rd".

If you wanted to underline the superscript or overline the subscript, simply use a "/" (forwardslash) instead of the carat symbol.

How can I select all TEXT that contains a word fragment?

When you need a selection set of text objects that contains a word or word fragment, you can call upon the FILTER command to help. When at the select objects prompt, type 'FILTER and press enter. Pull down the Selected Filter and choose Text Value from the list. In the X field enter the text fragment you are looking for with appropriate *'s included. For example *LINE* will find all text string with the wordLINE anywhere in the string.

Dtext Placement (2006+)

Changes in the default behavior make it difficult for those who still place single line text in various locations. To restore the previous behavior, enter DTEXTED at the command prompt and enter a value of 1.

Mtext Editing (2006+)

The new method of editing small mtext (especially when rotated) can be difficult with the in-place editor. To bring back the old method, enter MTEXTED at the command prompt and enter OLDEDITOR. If you need to change it back, enter the command again and put in the previous value of INTERNAL.

Background Masks

Recent versions of AutoCAD have provided the best way to mask the content under mtext objects. Unlike all other approaches, the built-in functionality grows/shrinks with the mtext content. To control the mask, make sure your Properties dialog is displayed (command PROPS) then select your mtext.

In the PROPS dialog you will see Background Mask, click the [...] button to bring up a dialog where you can toggle the status as well as control the size, color, etc. Note that in AutoCAD 2007 you can only turn the mask on/off.
 

 

 Customization

Using the Startup Suite

Users often come across usable code they want to add to their systems but don't know how to proceed. You may obtain a file with the extension LSP, VLX, DVB, etc.  Another case is lisp code in the form of text on a newsgroup or web page.  In this case we need to get it into a file with this first procedure.

Inline LSP Code to File

  1. Highlight the text in the source window (email, newsgroup reader).
  2. Right click and choose Copy.
  3. Open a Notepad or any pure ASCII editor.
  4. Right click and choose Paste.
  5. Choose File > Save As.
  6. Choose an appropriate folder and enter the name "FILENAME.LSP" including the quotation marks. Otherwise Notepad will name the file FILENAME.LSP.TXT, which won't work.

Also, it's highly recommended that you create a dedicated folder (like C:\CADSTUFF) to place these files. If you place them in the AutoCAD folder they may be removed if you upgrade/reinstall.

Adding functions to Startup

  1. Command: APPLOAD
  2. Choose the (Contents) button in the Startup Suite.
  3. Choose the (Add) button, then browse to the location of the code file and select it.
  4. Choose the (Close) button to close the Startup Suite.
  5. Choose the (Close) button to close the Appload Dialog.

From this point forward, the commands defined in these code files should be available in future sessions without needing to load them each time.
 

 

 Other Information

Tiny URLs

This is not CAD specific but is still worth mentioning. Sometimes when you try to refer to a long link URL in an email or news post, the link can become broken because the mail/news tool wraps the link into two (or more) lines. Unknowing users are frustrated because the link doesn't appear to work when they click it, and even experienced users have to paste it into a notepad and remove the line breaks.

In this situation, head to http://www.tinyurl.com and paste in your long link. A tinyurl 'mapped' link will be returned that's usually 20-30 characters and will never break.

How do I change the default drawing open directory?

Right click on your launch icon and choose Properties, choose ShortCut, then change the path shown in the 'Start In' field.  Note that if your new path contains spaces like "C:\My Drawings" it should be enclosed in parenthesis, otherwise they are not necessary.

The default behavior beginning in 2000i is for the application to remember the last folder accessed, even between sessions.  This can controlled by the REMEMBERFOLDERS variable which defaults to 1.  This is an integer (0/1) and is stored in the registry, meaning you only need to set it once.   When set to 0 it causes AutoCAD to behave as previous versions, honoring the settings described above.

AutoCAD 2000 Properties Dialog doesn't do Previous

A favorite procedure for some in older versions of AutoCAD was to build a selection set, then issue the DDCHPROP command and specify P for the previous set. With the new AutoCAD 2000 Properties command, which totally replaces the DDCHPROP command, you can't specify the previous set.  A little bit of LISP to the rescue. Place this code snipped in your ACAD.LSP file so that its automatically loaded, and simply type issue CHGPREV command to wake up the properties dialog with the previous selection set.

(defun C:CHGPREV ()
  (setq sset (ssget "P"))
  (if sset
    (progn
      (sssetfirst sset sset)
      (command "_.PROPERTIES")
    )
  )
)

How do you DXFIN into an existing drawing?

In the old days of R12/R13, you could be in a drawing full of objects, and do a DXFIN to merge additional objects from a DXF file. But that changed in R14, requiring you to begin a new drawing, DXFIN, saveas a DWG, reopen the original drawing, and insert the newly converted file.  Now using AutoCAD 2000, you can once again bring DXF based geometry directly into the existing drawing.

  1. Issue the INSERT command.
  2. Choose the BROWSE button.
  3. Pull down 'Files of Type' and choose *.DXF.
  4. Select your DXF file and choose Open.
  5. Turn on the 'Explode' toggle.
  6. Turn off the rest of the toggles.
  7. Choose OK to complete the operation.

Starting AutoCAD 2000 with no starting drawing!

If you would like to start AutoCAD 2000, but don't want a blank empty drawing, and you are not using the 'Startup Dialog' you can put this in your ACAD.LSP and it'll create this effect.

(defun-q mystartup ()
  (while (eq 1 (logand 1 (getvar "CMDACTIVE"))))
  (command "_CLOSE")
)

(setq S::STARTUP (append S::STARTUP mystartup))

In LISP code, don't (regapp) until you have to!

It may be tempting to place the (regapp) code at the top of your LISP code so that you won't have any problems adding EED during your application.  But doing so changes the status of the DBMOD, and disables the already fragile ability to DXFIN.  Place the (regapp) in the specific function that creates/modifies the object, right before the code that actually creates it.

On the subject, its not a bad idea to check to see if its already registered like:

(if (null (tblsearch "APPID" "MYAPPID"))
  (regapp "MYAPPID")
)

AutoCAD Temp & Backup Files

In AutoCAD, other than the DWG file, there are other files you are working with, whether you know it or not.

  1. BAK files: Unless you turn it off in OPTIONS, when you save a drawing that already exists on file, the .DWG is renamed to .BAK, then the new data is written to .DWG. Don't rely on this for true safety of your files, because .BAK files have been known to become corrupt.
  2. AC$ Files: These are temporary files created by AutoCAD during the process of creating the drawing. They are only of value to AutoCAD during editing and are usually cleaned up when AutoCAD closes. These files are useless if AutoCAD crashes.
  3. SV$ Files: These are autosave files, controlled by the setting inthe OPTIONS dialog. These files are the equivalent of a DWG, you would only need to rename them if AutoCAD crashes. It's important to note that if AutoCAD closes normally, these files are deleted!

Launch without the Logo

Save yourself a second and eliminate some visual noise every time you start AutoCAD by turning off the logo. Right click on your launch icon and choose Properties. On the Shortcut tab, in the Target field, carefully append a space and the /nologo switch.

How do I restore from a BAK file?

By default AutoCAD makes a backup file with the extension .BAK as you work with drawings. Some users aren't aware of how to use this file when the DWG becomes corrupt. The problem is mostly to the fault of Microsoft and their explorer defaults.

  1. Launch Windows Explorer and navigate to the folder that contains the file(s).
  2. Choose Tools > Folder Options.
  3. Click on the View Tab.
  4. In the 'Files & Folders' section, turn off the toggle on 'Hide extensions for known file types'.
  5. Choose OK (extensions should now show).
  6. Left click on the BAK file to highlight it.
  7. Right click and choose Rename (or press F2).
  8. Change the name to something like RECOVER.DWG.
  9. Open the file as normal in AutoCAD.

Note that AutoCAD has been known to sometimes corrupt the BAK file as well.

Educational Plot Stamp

Be careful when inserting blocks or drawings from outside sources, especially those you have never worked with before. If the party providing the file was using an educational version of AutoCAD, you can find your plots from a full license of AutoCAD saying "PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT".

If you find yourself in this situation, you can usually save the file in a DXF format, then reopen it to strip the message.  If you're concerned about files of this nature lying in wait to be batch plotted, you can scan for these files with a tool from ManuSoft.

EDU-Scan at http://www.manusoft.com/Software/EDU-Scan/Index.stm

Little Known Reference Manager

Because it's not shown on the AutoCAD menus, it's often overlooked.  For recent versions of AutoCAD, click the Windows Start Menu, choose Programs > Autodesk > AutoCAD. In the same group as the AutoCAD launch you will find the Reference Manager, which can be used to repath xrefs, images, etc.

Prevent Unnecessary Problems with Autodesk Service Packs

Many AutoCAD users don't realize that after installation their system still needs service packs applied. Failure to do this can mean that they suffer through problems that have already been fixed.  Autodesk does a good job of making service packs available for all the versions you are likely to run. We found patches going all the way back to R12 for DOS!

  1. Click on this link http://www.autodesk.com/support
  2. Pull down the list and choose the Autodesk product you use.
  3. In the lower left corner of the menu at left, click on "Data & Downloads"
  4. Under that section, click on "Updates & Services Packs"
  5. Find the version you are running and the patches available.

Third Generation of OS Commandline Copy

First there was the DOS copy command, then people discovered XCOPY which was faster and more capable. Now there is a third generation called ROBOCOPY, which stands for 'Robust Copy'. Take for instance the need to create an exact backup of an entire drive to a folder on another drive, including the ability to remove files from the copy if they have been deleted from the source. Essentially a mirror backup!

RoboCopy is one of many handy tools in the 'Windows Server 2003 Resource Kit Tools', but you don't need to be running server to use them. You can download it directly from Microsoft using this link.

Microsoft Download: http://tinyurl.com/6p6cy

Viewing Slides (Inside Libraries)

Although interest has dimenished over the past few years, users still want to work with Slide (SLD) and Slide Library (SLB) files.  One process thats not well known is how to view a slide that is contained within a slide library. Use this procedure:

Command: FILEDIA
Enter new value for FILEDIA <1>: 0
Command: VSLIDE
Enter name of slide file to view <Drawing1>: ACAD(ANSI31)
Command: FILEDIA
Enter new value for FILEDIA <0>: 1
Command: REDRAW

Note the syntax on the VSLIDE command. You specify the library name, then the slide name in parenthesis.

AutoCAD 2007 on Vista

While Autodesk provided a service pack for this case, there was a remaining issue with file dialogs (they constantly show as large icons). To fix this, use this procedure.

  1. Right click your launch icon, choose properties.
  2. Switch to the Compatibility tab.
  3. Turn on the top toggle 'Run in compatibility mode'.
  4. Pull down the list and choose 'Windows XP SP2'.

Using Design Center

The Design Center included with AutoCAD several versions back can be used for many purposes. To launch it you can use the ADCENTER command or the alias DC.

First consider it as a Symbol Manager. You can navigate to a folder in the left pane and it fills the upper right pane with the symbol drawings in that folder, with a small preview. Clicking on one of the icons shows a larger preview, then dragging the icon to the AutoCAD drawing window initiates the insert process.

Next is symbol table imports, such as layers. Navigate to a folder on the left pane, click the [+] box to the left of a drawing and the tree will expand to the available tables. For example, clicking the Layers item under the drawing shows all the layers for that source drawing. Select one or more layers and drag them to the drawing window and they will be created in the current drawing.  Objects contained in the source drawing will not be imported, only the definition (including the default color, linetype, etc).

Saturday, October 8, 2011

How to merge mp4 files without re-encoding?

I have 21 minute TV shows, divided up in to 3 clips seven minutes each. I need to merge them or join them into one large clip in mp4 format, the three clips are mp4 format. I tried Mediacoder, but that re-encodes them so it takes about a half hour.. I have 50 shows so thats not possible..
I need to merge the clips losslessly so it should be quick. I know YAMB can do this, but when I try, part 1's audio shows with video from part 2. I don't know how to fix it.
posted by ptsampras14 to computers & internet (13 answers total) 2 users marked this as a favorite

What kind of computer you have?
posted by rhizome at 5:20 PM on January 5, 2009


Windows Vista laptop
posted by ptsampras14 at 5:26 PM on January 5, 2009


MP4Box, specifically a frontend for it such as YAMB, should be able to do the job.
posted by zsazsa at 5:48 PM on January 5, 2009


YAMB can do this. If you're still stuck with YAMB, try Avidemux, and append the files as you would a series of AVI segments.
posted by Inspector.Gadget at 6:38 PM on January 5, 2009


Thanks alot Inspector.Gadget
That Avidemux works well it seems. I open the first mp4. Append the next to that. Append the third part. It says my files use B frames and makes me use this H.264 thing...but when I export the file, and I have to put a .mp4 extension on it (??), then I only get the audio,... idk why?
posted by ptsampras14 at 8:34 PM on January 5, 2009


I don't know if this works for video, but I do this all the time with mp3 audio: literally glue the files together using the DOS "copy" command.

Open a command prompt and type:

copy /b file1.ext + file2.ext + file3.ext + file4.ext filetotal.ext

... obviously inserting the filenames (e.g. yourvideo1.mp4) in place of file1.ext et al. Observe the "+" insertion carefully, noting in particular the LACK of one near the end.

Then trying playing the resulting file, you may be surprised to see it Just Works. MPEG framing is awesome that way.
posted by intermod at 9:25 PM on January 5, 2009


There's 2 issues at play here...

Firstly, mp4 ain't mp4. There's 2 different things that get called mp4.
  • Firstly, there's the container format ".mp4". Think of it like a mailing tube; you can put certain things in it that fit (e.g. posters), but not things that don't (e.g. books).
  • Secondly, there's the mp4 compression format. Think of it as the poster from the first point; it's been designed to be carried around in a mailing tube - but, for convenience, often gets carried around in something else like a generic folio case (e.g. .avi, .mkv).
Now, that out of the way, we can ignore the first one, the container type, for the time being.

That leaves us with mp4, the compression format. It's not just a single format, but rather a description of the ways various things can be compressed. To take the poster example further: posters can be various sizes, use various colours, be on different papers, have different borders, etc. These correspond to all the different options you have when creating mp4-compressed video - different image sizes, framerates, frame types, methods and limitations of arranging those frames, etc, etc. As well as all these options, there are some standard "pre-defined" options, e.g. MP4 ASP, MP4 AVC, etc - again, using the poster analogy, you could consider these to be like standard poster sizes, e.g. A3, A2, A1.

The real problem comes when it's time to put these all together. As far as I'm aware, the mp4 container can hold multiple videos, just like a mailing tube - but, unlike a mailing tube, they must all be created using exactly the same parameters*. Imagine a mailing tube that can hold several posters - but only if they're exactly the same size, use exactly the same colours, printed on exactly the same paper, etc. That's what the mp4 container is like.

For some reason, your videos aren't exactly the same. Even using the exact same codec with the exact same settings for each video won't necessarily guarantee videos that are exactly the same in the ways needed for them to be joined together. YAMP/MP4box is trying to jam everything into the one container, one after another, and is probably succeeding in some way - but the result is undefined. Video from one with audio from another, or audio with no video at all, seem to indicate this is the case.

At a guess, one or more of your videos has a different number of B-frames, or different B-frame packing, to the others. If the latter, you may be able to change the B-frame packing order across videos to match, but I suspect you're going to have to end up re-encoding all the videos.

-----

On preview: intermod, I think you mean "the ability of players to handle broken MPEG framing is awesome that way" ;-)

(* OK, that's not quite true - afaik, it's possible to store them in the mp4 container as multiple video tracks, with switching from the end of one to the start of the next. In practice, I don't know of a player - hardware, or software - that implements this reliably.)
posted by Pinback at 9:38 PM on January 5, 2009


It says my files use B frames and makes me use this H.264 thing...but when I export the file, and I have to put a .mp4 extension on it (??), then I only get the audio,... idk why?

Editing with B-frames in H.264 is tricky. It's OK for you to choose the mode that doesn't have frame accuracy because all you're doing is appending files which have separate groups of pictures (GOPs); since you're not altering any data within each, frame accuracy is irrelevant. If you can't playback the file, make sure you've set MP4 as the output format and also saved to an MP4 extension AND that you have a H.264 Directshow decoder installed or are using VLC media player. You have an MP4 splitter and AAC audio decoder installed, as evidenced by the fact that you can hear audio from the files. As a last resort, post a sample or two somewhere and I'll try to find what the problem is.
posted by Inspector.Gadget at 10:52 AM on January 6, 2009


Thanks alot inspector gadget. I will private message you some information. If you can solve it, ill poste the answer here.
posted by ptsampras14 at 1:56 PM on January 6, 2009


I was able to join the files provided using YAMB. Note that the second video file duplicates a few seconds from the end of the first, so that a brief part of the final scene is repeated. Here's what I did:

1) Open YAMB, click the "Editing" button in the sidebar, and double click "Click to join supported files".
2) Drag "1.mp4" and "2.mp4" into the main window in that order, leaving all streams enabled. Set the output to the same directory as "3.mp4", and click next. Wait for the process to complete and the lowermost-rightmost button to say "Finish".
3) At this point, you have a fully functional MP4 file ("3.mp4") with original audio sync and no video issues.


Avidemux will not produce a good result with this file because the audio was muxed with a delay. It cut the video and audio without difficulty, but it didn't detect the muxing delay in the original files and would have required manual adjustment of the audio delay to find an acceptable muxing delay value for the audio stream in the merged file. Without that annoying manual step, only joining the files with YAMB will reproduce an acceptable sync.

Finally, you should be able to see video in the new file if you can in the original files. The output parameters are fine for an H.264 file with AAC audio and will be accepted by CoreAVC, ffdshow, etc.
posted by Inspector.Gadget at 7:15 PM on January 6, 2009


I have MP4 Box. I have YAMB, I followed exactly your steps. It's not working for me.
posted by ptsampras14 at 5:49 PM on January 7, 2009


Are you joining the same files you used as a sample?
Try deleting the "YAMB.cfg" file in the YAMB directory and re-doing the process, and make sure you're using the latest YAMB.
posted by Inspector.Gadget at 1:41 PM on January 8, 2009


I am also have a lot of trouble concatonating my mp4 video files (taken with a Flip mino HD camera) into a single file. I have 12 snippets I want to string into a single file. 
Following your suggestions, I tried the Dos Copy command with two files. The file grew to the size of the sum of the two, so I had hope, but the combined video stopped at the end of the first one. So . . . 

I downloaded the latest YAMB (Yamb 2.1.0.0 beta 2) and followed your instructions exactly, experimenting with only 2 of my 12 files, both with and without YAMB.cfg. Both ways, when I play the new combined file, instead of playing back to back in a single window, two windows open simulataneously playing both of the original files simultaneously! 

I found your site after having a similar experience earlier in the evening muxing them with mkvmerge GUI v2.9.7 using their "add" function. Using their append function, I received an error that the files are not the same size, which you touched on.

The second window frame (and third when I combine 3 files) has the heading "VLC (hardward YUV DirectX output)" while the first has my newly created file name in the window frame heading.

Any ideas? Thank you!
posted by LeeAnnK at 11:05 PM on August 6, 2009m

Command "CMD" enter DOS!!!

Wednesday, October 5, 2011

保存视频文件

几招保存视频文件~~ 让我们来突破封锁,把在线视频搬回家,想看就看!

  一、WMV、ASF等格式的网络视频

  1、右键属性法。

  第一步:打开在线视频网页,在网页播放器内点击鼠标右键,然后选择“属性” 就能看到类似http://…./*.WMV”这样的地址,这就是视频地址了。


  第二步:复制视频地址用下载软件下载。

  如果右键被禁用,在浏览器地址栏中键入“:alert(document.oncontextmenu=”)”(输入时不要输入双引号),此时会弹出个对话框,点击“确定”按钮,然后再对着你的目标视频点击鼠标右键就可以看到弹出菜单了!

  2、HTML源代码查询法(此方法同样适用rm格式的视频的下载。)

  如果对方网站没有加密或隐藏视频资源的URL地址,就能用这个方法找到URL地址。操作如下:

  第一步:在视频的播放页面,点击鼠标右键,选择“查看源文件”,系统自动用记事本程序打开网页源文件。

  第二步:执行“编辑→查找”命令,然后在查找对话框中输入“.wma”,进行查找。

  第三步:复制类似”http://…./*.rm”的地址或者*.rm的文件名,然后在下载软件中进行下载,对后者,需要根据当前网页的地址补全文件地址,一般是当前网页的地址加文件地址,就是这个文件的url地址。

  3、迅雷法:(“网际快车”同样适用)

  第一步:安装并运行最新版本的迅雷,执行“工具→配置”打开配置面板,选择“监视”项,勾选右边“浏览器”下的三项。

  第二步:打开在线视频网页,把鼠标移动到视频的播放页面上,会有一个“下载”字样的图标,点击即可。

  二: RM、RMVB 等常用格式的网络视频

  1:本地播放法

  第一步:在网页中的播放器内,点鼠标右键,选择“在 RealPlayer 中播放”,然后就会调用“RealPlayer”播放器(前提是你必须安装给播放软件)进行本地播放。

  第二步:然后选择播放器上的导航栏目“文件”,再继续选择“剪辑属性→查看剪辑信息”,就能找该视频的URL地址了

  第三步:复制视频地址下载即可。

  2:断网法

  第一步:打开在线网络播放页面,点击视频“播放”按钮,在视频缓冲前断开网络。

  第二步:再次点击“播放”按钮,让该视频连接网络,因为断网无法连接,大概几秒钟弹出“无法建立与服务器的连接”对话框。

  第三步:复制对话框中的地址,用下载软件下载视频。

  三、flv格式视频文件

  FLV流媒体格式是一种新的视频格式,目前非常火暴,相比以上传统格式文件,flv视频的下载,难度稍大一些。

  1、专用工具:

  软件名称:维棠FLV视频下载软件(点击下载)

  第一步:安装并运行维棠,在菜单中选择“工具→选项”,在弹出的“选项”窗口的“常规选项”的右边点选“在IE右键里添加下载菜单”,选择确定后,重启IE。

  第二步:在FLV视频节目所在页面空白处点击右键,选择“利用维棠下载视频”启动维棠FLV视频下载软件来分析FLV视频真实地址并开始下载FLV视频节目。

  该软件能帮助你轻松下载国内外大多数FLV视频分享网站(如YouTube、Mofile、土豆网、56.com、六间房、优酷网等)的视频内容

 2、在线破解法:

  浏览器插件法和专用工具法,会占用一定的系统资源,如果你只是临时需要下载,那就用在线破解法。

  国内外有很多提供在线破解服务的网站,比如:

http://www.downflv.com/

http://www.bestube.com/

http://www.youtubex.com/

  这些网站列出了各自能够支持在线破解的视频网站。

  第一步:播放在线视频网站中自己需要下载的FLV视频文件,然后复制IE地址栏中的地址。

  第二步:打开“http://www.downflv.com/”网站,把该地址粘贴到网页中的文本框中,鼠标点击“undefined”按钮。几秒钟后flv视频地址显示出来。

  例如:http://www.1234520.com/Video/HGW8,14175,107909.html

  结果:http://www.1234520.com/Upload/MemberVideo/1/14175_HGW8.flv

  第三步:点击链接下载视频。

  3、浏览器插件法:

  软件名称:Mozilla Firefox 2.0.0.9 简体中文版(点击下载)

  插件名称:DownloadHelper插件

  第一步:安装并运行firefox浏览器,在地址栏中输入以上“DownloadHelper”地址,打开网页就按照提示选择安装插件。

  第二步:重新运行firefox浏览器,就可以在地址栏右边看见安装的插件。进入在线视频网站,播放自己要下载的视频文件,就可以看见插件图标(红黄蓝三个彩球)在旋转,点击插件图标插件旁边的小箭头,就可以看见flv文件的地址了。

  第三步:鼠标左键点击文件地址,就弹出保存对话框,然后选择保存地址,就可以下载了。

  4、CookiesXX:

  第一步:完整播放一遍视频文件。(要看过一遍视频或等整个视频缓冲完毕,否则临时文件来里面视频文件还没生成。)

  第二步:在IE浏览器中执行“工具→internet选项”,打开“IE选项窗口”,在”internet 临时文件夹”位置点击“设置”,在新窗口中点击“查看文件”,打开”Temporary Internet Files”窗口中,就可以看到很多文件。

第三步:按照文件大小排序,文件格式后缀为flv的文件就是在线看完后自动保存下来的文件,这时你只需复制即可。

  5、嗅探法:

  软件名称:网络嗅探器(影音神探)点击下载

  “影音嗅探专家”和“网络嗅探器”都是比较不错的查找视频播放URL地址的工具。下面以“网络嗅探器”为例介绍操作步骤:

  第一步:下载并安装“网络嗅探器”,首次运行,自动测试并配置网卡。

  第二步:点击“设置→综合设置”,打开“设置”窗口,点击“文件类型”,点选“自定义类型”中的“flv”,如果没有该类型,可以自己添加。

  第三步:配置完毕,点击工具栏上的“开始嗅探”按钮,接着运行IE进入在线视频网站播放该视频,网络嗅探器就会自动把该视频的URL地址找出来。

  第四步:右键点击视频url地址(红色),选择下载工具进行下载。

最笨最保险的万能法:录像
用KMPlay录制电视节目,效果不错。播放在线视频时,在KMPlay播放画面上点右键,从菜单中选择‘捕获——另存为AVI文件’输入保存位置和文件名,编码器根据播放格式选择,点击‘开始’,就可以了录制了,完了后,点击‘停止’你刚才看到的视频就保存到电脑里了。

Tuesday, September 20, 2011

China silenced by illegal steel thinning

As rumours emerge of illegal steel thinning in Zhengzhou, all goes quiet on the Chinese front...


One trillion. This is the number of American dollars allocated for infrastructure projects in China over the next five years. Zhengzhou. This is the location of the latest 'stretching' factory in China pulling steel reinforcement rods to illegal diameters and threatening the lives of countless citizens who will use the infrastructure projects constructed using these substandard materials.

This week a surprisingly small article in British newspaper The Times detailed the discovery of illicit practices at a Zhengzhou 'stretching' factory where steel reinforcement rods used in a number of construction projects had been pulled to a thickness below regulatory standards.

The reasons for this are simple - 10mm wide rods can be easily stretched to a thickness of 8.5mm, creating many additional metres of metal then sold on for profit - but the resolution is not. Despite countless assertions from experts that pulling these essential building components to inadequate diameters will weaken a structure and endanger the lives of its users, construction companies in China are still being found operating under such measures.

This is not a new phenomenon however. In September 2011 a number of construction firms in Xi'an, Shaanxi Province were ordered to stop using thin reinforcement rods which had been stretched below regulatory standards, with Liu Lin, Director of the Construction and Real Estate Management Department under the Xi'an Industry and Commercial Administration Bureau explaining: "By making the steel bar thin, both the processing plants and the construction firms decrease their cost, but these bars will do harm to the quality of the building projects."

Similarly in June this year the construction of the Ninghang high-speed railway was rocked by claims that 2.2km of safety barriers had been wrongfully installed using steel rods pulled from 6.5mm to 5.8mm and 8mm to 6.9mm. The groups leading the scheme were fined 100,000 yuan and the contractor, Hongye Traffic Facility from Yiyang, allegedly blacklisted. Reporting on the case, local news site China.org.cn was told by an official that: "The railway's construction slowed down recently and quality inspectors failed to launch intense inspections as usual, which caused the loophole."

Despite the severity of this issue and the immense ramifications it poses to the safety of civilians, none of the engineers, construction firms or steel research institutes WAN appealed to for comment were happy to venture an official opinion, many keen to state that they had little or no knowledge of the matter at hand.

Thinning reinforcement rods is not illegal but when practiced to excess can lead to a reduction in the effectiveness of the metal. Fan Zhong from the China Architecture Design and Research Group clarifies: "Over-stretching the steel bars will cause them to become brittle and weak, and less resistant to earthquakes," a point confirmed by Wu Chengcai, General Engineer at the Shaanxi Provincial Building Research Institute, who comments: "When a building suffers great external force such as an earthquake, the stronger, standard steel bars will 'stretch' as the building suffers the damage, thus slowing the process of its collapse for people to escape. However, the buildings with the substandard, thin steel bars will collapse very quickly."

With a marked history of earthquakes across the nation, China has upped its building regulations in recent years and yet somehow the practice of illegal steel thinning has continued to thrive. The potential human cost of stretching reinforcement rods for backhand cash is inconceivable for the majority of people but this remains a very real threat as China presses forward with an unyielding construction schedule, leaving many questions unanswered.

Sian Disson
News Editor

Plans for $200 million test city released

19 September 2011

International technology development firm, Pegasus Global Holdings, have released plans to develop and build what would be the world's largest technology testing and evaluation center.

Covering 52 square kilometres of open, state-owned land, The Center for Innovation, Testing and Evaluation, simply dubbed "The Centre", would be a huge scale, fully-integrated testing and evaluation facility for new and emerging technologies.

Designed to represent the current mix of old and new infrastructure found in most modern U.S. cities, The Center will resemble a mid-sized American city down to the detail: houses, roads, suburban neighborhoods and rural communities would all a part of the project.

According to Pegasus, the purpose of the replica metropolis is to provide end-to-end testing, evaluation and demonstration of new intelligent and green technologies and innovations with the goal of determining the direct and indirect benefits and costs the innovations tested would have on our existing infrastructure.

For example, Pegasus reports that the controlled environment would "permit evaluation of the positive and negative impacts of smart grid applications and integration of renewable energies for residential, commercial and industrial sectors of the economy."

Other technology fields could also benefit from the city sized laboratory: traffic systems, next-generation wireless networks, smart grid cyber security and terrorism vulnerability could all be tested on the site.

"The idea for The Center was born out of our own company's challenges in trying to test new and emerging technologies beyond the confines of a sterile lab environment," Robert H. Brumley, Pegasus Global's CEO said.

"We saw a global need and stepped up to address it. The Center will allow private companies, not for profits, educational institutions and government agencies to test in a unique facility with real world infrastructure, allowing them to better understand the cost and potential limitations of new technologies prior to introduction.""including energy, transportation, telecommunications, security, and agriculture."

What will ostensibly be a man made ghost town, the $189 million project will reportedly derive its revenue from access charges and user fees as well as from the sale of excess utility output, such as power generation, water treatment, and wireless infrastructure.

Pegasus anticipates 350 direct jobs and 3,500 indirect jobs will be created throughout the project. Governor Susana Martinez commented on the economic possibilities that the project could create:

"I am confident this innovative project would provide a great boost to New Mexico's economy," said Governor Martinez.

"We are pleased to be able to offer the resources, open spaces, and talented workforce required to make this effort a success. My administration is committed to an ongoing relationship with Pegasus that will allow the Center to thrive and create New Mexico jobs."

Such an enormous project takes an equal amount of planning and consultation: a Memorandum of Understanding with the State of New Mexico has been undertaken to facilitate the quantification of the feasibility, scope and scale of The Center.

With the assistance of the State of New Mexico, Pegasus and its partners will conduct a feasibility report over the next five months to "analyze all aspects of location, evolution, construction, operation, financial viability and economic impact on the area where The Center may be located."

Sunday, August 21, 2011

Aussie homes still the biggest, for now

 

On Monday 22 August 2011, 9:30 EST
 
Local homes remain the largest in the world, figures show, but may have hit their peak - due to an ageing population and Gen Y indifference to home ownership.

The average floor area for Australian houses and apartments is the largest in the world at 214.1 square metres - almost three times the size of those in the UK.

They are 10 per cent bigger than in the US, and nine per cent larger than in New Zealand.

The Australian Bureau of Statistics (ABS) data was commissioned by CommSec, the Commonwealth Bank's broking arm.

Figures for the nine months to March 2011 show the average size of an Australian home is five per cent larger than a decade ago.

The report said the US traditionally challenged Australia for the biggest homes in the world, but the average size of American abodes had shrunk 20 square metres since the onset of the global financial crisis in 2008.

The US census bureau reports the average size of a home is currently around 200 square metres.

CommSec chief economist Craig James said, except for a brief period in 2007, Australia had the largest homes (houses and apartment), according to data going back to 1999.

The US did have the biggest houses, but that changed in 2009 when Australia took the lead.

"Certainly it makes sense that Australia builds bigger homes than in other countries, given that population density is far smaller than in other parts of the world," he said.

"It also helps to explain why homes in Australia cost more."

Mr James says the size of Australian homes may be hitting a peak and there's a demand for smaller apartments.

"Gen Y places less importance in home ownership than past generations, preferring to maximise life experiences," he said.

"The ageing population also points to less demand for bigger homes, with greater demand for smaller apartments, close to amenities."

According to figures from the UK Commission for Architecture and the Built Environment, Denmark has the biggest homes (houses and apartments) in Europe with an average floor area of 137 square metres.

It's followed by Greece at 126 square metres and the Netherlands at 115.5 square metres.

Homes in the UK are Europe's smallest at 76 square metres.

Website Demographia.com reports the average new home in Japan is 132 square metres and a free-standing new home built in Canada is around 177 square metres.