Other facilities part-2

Here we have discussed about the use of script files and importing & exporting files. A script fileis a text file which contains a series of debugger commands. To the AutoCAD, a script file is an ASCII text file that contains a set of command line instructions and AutoCAD has to follow it – just like an actor reading from a script.

Summary

Here we have discussed about the use of script files and importing & exporting files. A script fileis a text file which contains a series of debugger commands. To the AutoCAD, a script file is an ASCII text file that contains a set of command line instructions and AutoCAD has to follow it – just like an actor reading from a script.

Things to Remember

  1. The OLE object is displayed with a frame which isn't plotted by default. 
  2. Many Windows applications use the WMF(Windows Metafile Format) format.

MCQs

No MCQs found.

Subjective Questions

No subjective questions found.

Videos

No videos found.

Other facilities part-2

Other facilities part-2

9.3 Import/Export

It is used to import/ export (copy) the files from different software having the file extension Dxb, Wmf, Esp and 3d Studio. You can use commands so that you can import point data, export point data, & transfer point data between various files.

Importing Files

  1. Choose File (From menu bar), Open

or

  1. Choose Insert, 3D Studio, DXB, ACIS, WMF, or ESP

or

  1. Type Import in the command line

Command: IMPORT

Importing OLE objects into the drawings:

You may use one of the following methods to insert useful information from different application as an OLE object:

  1. Copy/cut information from an existing file & paste it into the drawing.
  2. Import the existing file created in another application.
  3. Open another application from within the drawing & create the information that you want to use.

When you finished inserting the information, you should specify an insertion point.

The OLE object is displayed with a frame which isn't plotted by default. OLE objects are opaque & are plotted as opaque; they hide objects in the back of them. OLE objects always support the draw order. You can control the display of OLE objects in 2 ways:

  1. Set the 'OLEHIDE' system variable to display, or restrain the display of all OLE objects in paper space, model space, or both.
  2. Turn off/freeze a layer to restrain the display of OLE objects on that layer.

When OLE objects with the text are printed, the text size nearly fits the text size in the source application.

Note:OLE objects in drawings aren't displayed or plotted in external references or block references.

Importing a WMF file

WMF files stand for Windows Metafile Format files. These files are very frequently used to produce clip art & other non-technical images that you need for your drawings. You may insert a WMF file into the drawing file in the form of a block. WMF files contain vector information which can be resized & printed without losing resolution. If the WMF files contain 2D solids or very wide lines, you can turn off their display in order to increase drawing speed.

WMF files can contain both vector& raster information. However, the programs use only the vector information from a WMF file. When WMF files containing raster information are imported into the program, the raster information's are ignored.

Procedure to import a WMF file:

  1. Click on 'Insert' on the menu bar, Windows Metafile
  2. Select WMF file that you want to open in the Import WMF dialogue box.
  3. Click Open.
  4. Specify the insertion point for the WMF file.
  5. You can use one of the following methods to specify the scaling:
  6. Enter Comer 'C' at the command prompt in order to specify the imaginary box whose dimensions directly corresponds to the scale factor. You must avoid inserting a mirror image. For this, you can specify the opposite corners above & to the right of the insertion point.
  7. Enter xyz in order to specify the 3D scale factors.
  8. Enter a scale at the command prompt in order to set the X & Y scale settings. You can set many different horizontal & vertical scales. You must enter one(1) to keep the current scale. You must enter a higher number in order to enlarge the metafile image. (Enter 2 so that the size of the image is doubled. You can shrink the image by entering a positive number that is less than one(1). (Enter .5 so that the size of the image is halved.) Remember that by using this option, it makes very difficult to import WMF files at a specific scale/size.
  9. Specify the rotation angle.

Importing Text from External Files

You can insert TXT/RTF text files that you create in word processors into your drawing either by importing the text or dragging the icon of the file from Windows Explorer.

Importing TXT/RTF files from other sources will give you the most flexibility. For instance, you can produce a text file of standard notes that you include in your drawings. The imported text then becomes a multiline text object, that you can edit & reformat. The text that is imported from a TXT file receives the current text style. The text imported from a RTF file possesses the current text style name, but restricts its original fonts & format. Imported text files are limited to 32 Kilobytes & should have a file extension of .txt/.rtf.

If you drag a text file into your drawing, then the text width is determined by line breaks & carriage returns in the original document. When you drag an RTF file into a drawing, then the text is introduced as an OLE object.

If you use the Clipboard to copy & paste text from another application, then the text becomes an OLE object. If you use the Clipboard to paste text from another file, the text is put into as a block reference, & it restricts its original text style.

To import the text files

  1. Click on Draw on the menu bar, Text, Multiline Text.
  2. Pick out the opposite corners of a bounding box and define the width of the multiline text object.
  3. Right click in the editor then click on Import Text.

The limit of size for an imported file is 32 Kilobyte.

  1. In the "Select File" dialogue box, double click the file you like to import or pick that file. Press Open button.

The text is introduced at the cursor location.

  1. Change the text as per demand.
  2. In order to save your changes & exit the editor, you can use one of the following methods:
  1. Click 'OK' button on the toolbar.
  2. Click in the drawing area outside the editor.
  3. Press 'CTRL+ENTER' key.

Exporting Files

  1. Choose File (From menu bar), Saveas

or

  1. Choose File, Export

or

  1. Type Export in the command line

Command: EXPORT

You can use the program to export links that are contained in a drawing. This is worth when you have multiple graphical objects that are linked to a single database row. Suppose, for instance, you want to prepare a bill of materials that summarizes the number of various light fixtures in a drawing. The external database that your drawing is linked to doesn't contain this information. All the database that is provided is a list of the various light fixtures which make up its record set. The database table doesn't have the knowledge of the number of instances of individual light fixtures that is introduced in your drawing. If you want to prepare your report on the summary containing this information, you need to export the links that are included in your drawing.

Procedure to export links from a drawing

  1. Click on dbConnect on the menu bar, Links, Export links.
  2. Create a set of graphical objects for selection whose links you like to export.

If there exists more than one link template for the set of graphical objects that you select, then the Select "Link Template" dialogue box is displayed & you are then prompted to select a link template. If your selection set contains only one link template, then the "Export Links" dialogue box is displayed.

  1. In the "Export Links" dialogue box, select the fields that you want to include by clicking them in the Include Fields list.

The key fields are automatically included for the selected link template. The program also exports the entity handle of that object to which each link is associated with.

  1. Give a name for the exported file in the File Name.
  2. Select a file format for the file.

You can also save the file in the native database format of the current table or as a comma delimited or space delimited text file.

  1. Click "Save" to export the links & close the dialogue box.
  2. Repeat steps 1 through 6, which are necessary, for any additional link templates whose links you desire to export.

Exporting WMF Files

Many Windows applications use the WMF format. A WMF stands for Windows Metafile Format. This file contains either vector graphic or raster graphic formats. WMF files are created only in vector graphics. A vector based format allows for faster panning & zooming than other formats.

Procedure to create a WMF

  1. Click File on the menu bar, Export.
  2. In the "Export Data" dialogue box, and in the Files of Type box, pick Metafile (*.wmf).
  3. Select a folder & put a file name. Click "Save" button.

The .wmf extension is added to the file name.

Lesson

9. Other Facilities

Subject

Mechanical Engineering

Grade

Engineering

Recent Notes

No recent notes.

Related Notes

No related notes.