Saturday, June 6, 2009

How to copy views from another drawing?

If you need to import existing view definitions from an older DWG file to your current drawing, you can use the free utility Xanadu CopyViews.

Appload the CopyViews.vlx file, start the CopyViews command and specify the source drawing. All its named views are copied over to your current drawing.

You can download CopyViews from www.xanadu.cz/download.

AutoCAD reports PSELECT as an "Unknown command".

If PSELECT doesn't work in your AutoCAD, you have probably not opened the Properties window. This command is defined by default only for this window.

Open the Properties palette (Ctrl+1) at least once in your AutoCAD session and repeat the PSELECT command.

If you want to enable the PSELECT command automatically in every AutoCAD session, load the ARX extension acopm.arx - using the briefcase in Appload or with another ARX loading method.

How to make your AutoCAD slower?

Usually you want to do just the opposite. But there are situations where you need to pause and wait for something - to display a slide, to read a message or result, to debug your code.

If you want to pause the execution of your menu macros, scripts or LISP utilities, you can use the DELAY command. On its prompt enter the number of milliseconds to wait. Be carefull when entering large numbers - AutoCAD will really "hang" (freeze) for the specified time (may be good for office pranks :-).

DELAY 0 is also the best "NOP" (no operation) command - it doesn't do anything.

Where are the landscape objects for AutoCAD 3D render?

With the change of the rendering engine in AutoCAD 2007 (and higher) the special "landscape" objects (trees, shrubs, cars, people..) are no longer available (the former LSNEW, LSLIB commands).

There are some workarounds for adding entourage objects to your 3D scenes for rendering:
  • Use full 3D models of entourage objects
  • Add the entourage pictures only as 2D images to the rendered picture (postprocessing in Photoshop)
  • Use an alternative rendering tool - e.g. 3ds Max, Piranesi...
  • Use the simplified, render-ready RPC objects from ArchVision
  • Make simplified (planar, crossed) models with materials using texture maps and opacity maps (orient them to your camera) - see below
How to add opacity-based planar models to your scene for rendering:
  • Run the MATERIALS editor.
  • In the Materials tool palette, click "Create new material" and name it.
  • In the Template drop-down list, select Advanced.
  • Select the Diffuse Map check box.
  • Select Texture Map from the drop-down list.
  • Click the "Select Image" button and select the image you want to use for your entourage object (tree, people...).
  • In the "Material Scaling" section, set the "Scale units" to "Fit to Gizmo" and set U and V tile to 1.00 (in version 2007: Adjust Bitmap > Bitmap Scale > Fit to object).
  • In the Opacity section, click "Select Image", and then browse to a opacity image file (black will not show, white will show the diffuse map image).
  • In the "Material Scaling" section, set the "Scale units" to "Fit to Gizmo" and set U and V tile to 1.00 (in version 2007: Adjust Bitmap > Bitmap Scale > Fit to object).
  • And finally - create a 3D face in your DWG scene and apply the new material to it. Now you can render the drawing.

Cannot offset this object.

Creating offset (parallel curve) to a polyline may fail when the geometry of the polyline is wrong (self-crossing line, duplicate vertices, etc.). The offset may also fail only to a single side.

Try to simplify the polyline - delete excessive or duplicate vertices - and repeat the OFFSET command. The offset curve will be then created.

Displaying layout name in dynamic text fields.

If you want to copy a text or block into multiple layouts in your drawing, you may want to use an automatic text which will display the name of the respective layout (paperspace).

You can use the Field functionality for this - just insert a field and use the "Other" category, and the "System variable" CTAB value. Or just copy the following line (field code) as a DText:

%<\AcVar ctab>%

The same text will then read e.g. "Layout1" in the first (default named) layout, "Layout2" in the second, etc. This applies both for modelspace and paperspace text entities.

Break curve at all listed distances (stations).

You have a list of stations (distances from start) and you want to BREAK a selected curve multiple times at the listed points.

You can use the Xanadu BrkList utility. BrkList can be used as a generalized (non-linear) MEASURE command. The BrkList command prompts for a list of stations (distances measured from start) and then performs multiple BREAKs on a selected curve in the specified points (stations). It also places POINT entities at the break points. Optionally, placing points or breaking the line can be suppressed.

The list of stations can be entered either as a comma delimited sorted list - e.g.:

100,150.2,324.86,551

or read-in the list from a text file (each station on a single line) which can be exported e.g. as a CSV file from Excel (a result of a calculation).

Supported object types:
LINE ARC POLYLINE LWPOLYLINE 3DPOLYLINE SPLINE ELLIPSE HELIX

You can download the free LISP utility from www.xanadu.cz/download