File operations are a group of procedures that enable the use of computer mass memory (disk devices) and peripheral devices (printer, plotter) to write or read drawings or blocks, export drawings to files in DXF format (for exchange with other CAD programs) or its printout using a printer or plotter. The procedures enable the use of all the computer's mass storage resources, including network resources, which means, in particular, extending the resources with disk devices of other computer units, e.g. connected to the network. File functions are available in the option / File / of the main menu:
/ Open drawing / -
opening a drawing from a disk file
/ new Drawing / -
initiating a new drawing with the option to select a prototype
drawing
/ New window / - opening a
new drawing window, parallel to the existing window or windows
/
Save / - save (updating) the drawing to a
previously opened file, or save a new drawing to a file with a given
name
/ save As / - save a copy of a
drawing to a file with a given name
/ Export / -
export a drawing to a file in commonly used DXF format
/
Import / - import a drawing from DXF or DWG
(Autocad)
/ Title block edit /-
editing a block of parameters that allow easy identification of the
drawing and used in additional modules
/ Printing / -
printing a drawing on a printer or saving it in a graphic file
format (BMP, PNG, PCX, JPEG, TIFF, EPS or PDF)
/ Legacy
plotting / - plotting a drawing on a vector
plotter
/ Info / - information about
the available memory, memory usage by the drawing, print and image
buffers, etc., the name of the default directory, the size of the
desktop and the type and size of the desktop font
/ show
Desktop / - function showing the AlfaCAD desk
with other drawings available on the desk (opened in the / New
window / function)
This function allows you to select another
drawing for further editing, leaving the current drawing on the
desk.
/ last Files / - a list of 5
recently saved drawings, allowing for quick access and re-editing of
the drawing.
Saving a drawing in a disk file is one of the basic functions of AlfaCAD. This function allows you to successively create a drawing in many program sessions, archive drawings, create libraries of typical or repetitive drawings, and finally create copies of drawings by saving them to various directories on various devices. This enables, among other things, the transfer of drawings between different computer stations.
All information about the drawing and editing variables are stored in the drawing disk file, allowing for multiple editing of the same drawing on one or more computer workstations.
When saving to disk, each drawing must have a name under which - in the form of a disk file - it is saved in any directory of one of the available devices. After starting AlfaCAD the disk file name of the newly created drawing is not declared. Selecting the / Save / function / File / main menu option initiates a file selection dialog window that allows you to adopt the appropriate disk device, directory and file name for the drawing being created (as in p. 12.1.2.).
When updating a drawing with a known name (file name), the disk function / Save / does not initiate the dialog box, but saves the drawing in a file with a known name and then returns to editing the drawing. When updating a drawing, the name of the saved drawing set is displayed in the top line of the screen. The name of the drawing is known if the editing of the drawing was preceded by the disk function / Open drawing / that performed the procedure of reading the drawing from the disk file, or if the name of the existing drawing set was given as a parameter when starting AlfaCAD.
After saving the drawing in file, the saved drawing takes the given file name. With subsequent updates, the program saves drawing without the need to name it again.
The disk function / Save As / allows you to save a drawing to a disk file of any name, in any directory of one of the available devices, regardless of whether the name of the drawing file was previously defined or not. Generally, the function is used to make a copy of a drawing in a file with a name different from the previously defined drawing file name (this also applies to directories and disk devices).
After saving the drawing to disk, the saved drawing takes the new given file name. With subsequent updates, the program saves drawing without the need to re-name it.
Each drawing is described with the title block (nameplate) containing the information necessary to identify a given drawing in a disk directory. The name of a drawing set usually does not allow for its full identification, especially in the case of large projects. The drawing nameplate can be used in future software applications that generate e.g. a drawing list, a list of components etc.
The title block consists of 16 fields with any 16-character name. Each field can contain a string up to 255 characters long. The field names can be defined by the user. It is recommended to enter the names of the fields which have their equivalents in the drawing title block placed on technical drawings, e.g .:
Design unit:
Investment (1):
Investment (2):
Object (1):
Object (2):
Project number :
Drawing number:
Figure (1):
Figure (2):
Scale:
Designer:
Compiled by:
Checked :
Date:
Archive number:
Stage:
In the newly created drawing, the names of the nameplate fields and their original values are initialized based on prototype drawing. If the prototype drawing does not exist or is ignored, the field names and values are initialized from the ALFACAD.INI configuration file. In this set, in the group of parameters [NAMEPLATE], the prototype of the table can be saved in the form of lines:
field_name = field_value e.g .:
[PLATE]
Project unit: Now Moon Ltd
Investment (1): Fra Mauro Moonbase
Investment (2): Landing platform
Object (1): 6 KV photovoltaic power station
Object (2): Project number: M-1-2024
Drawing number: 5-10
Figure (1): Main power diagram
.... etc.
The menu / File / contains the option / Title block edit / the selection of which allows you to edit the values of the table fields or change the names of the fields.
A dialog box containing a list of parameters for each field of the nameplate is initiated. The indicated row of the nameplate is copied to the edit lines - " Parameter name " and " Parameter value " respectively. Clicking with cursor on one of these lines initiates the editing of the name or value in the manner generally accepted in AlfaCAD.
All parameters lines can be changed multiple times in any order.
The program allows you to read its nameplate from another drawing and adopt its contents to the current drawing . To do this, press the "Import" button and select the appropriate file in the same way as in the / File // Open drawing / function and then the " OK " button . The nameplate taken from another drawing will replace the current one. It can be re-edited as described above.
Selecting the " OK " field ends the nameplate edition along with accepting the changes made. In order to discontinue the introduced changes and restore the previous content of the nameplate, press the " Esc " button.
The file function / Open drawing / allows you to read a drawing from a disk file from any directory of one of the available disks or network devices.
If a non-existing file name is given in open file dialog window, a new drawing with the given name will be initiated based on default prototype file, but it's name will be already determined, so in file function / Save / it will be saved in the file of a given name.
The user may specify a file name with an extension, although it is not recommended. The program assign the standard ".ALF" drawing file name extension.
In order to get quick access
to the created drawings (especially drawings such as electrical
diagrams), you can use the text of the "File name" type.
If we place a
text of the "File name" type, representing the file name of
the next drawing (diagram), then after updating the current drawing
and executing the function /
File // Tree // Enter / and
selecting the text containing the file name, the current file will be
closed and the linked one will be opening. The procedure is not
finished, and the program is waiting for the next file name text
indication (to open another linked file) or pressing {ESC}
or {LMB}.
The /
File // Tree // Return / function
allows
you to return to a drawing at a higher hierarchy level, up to the
original drawing. The program remembers back to the last 500 drawing
files.
If we execute the function /
File // Tree / once,
also newly created drawings in a given session are added to the
hierarchical
tree,
which allows you to return to previously edited drawings without
specifying or indicating the name of the file. This is particularly
important when performing many drawings simultaneously, e.g. control
schematic diagrams, without the necessity to open many drawing
windows at the same time.
If the function / Enter / or / Return / is selected and current drawing was edited but was not saved, the appropriate message is visible and program is waiting to confirm saving or ignoring, or {RMB} or {Esc} to abandon the function.
AlfaCAD can co-operate with
other CAD programs. “DXF” format is a commonly used drawing
format (DXF is a trademark of AutoDesk Inc.) to exchange drawings
between different CAD applications. To re-edit a drawing created in
AlfaCAD using a another CAD program, you need to export drawing into
the file using the function : / File // Export // DXF /.
DXF format is a text representation of the full graphic form of a drawing. AlfaCAD saves the actual values in the DXF file with an accuracy of 6 decimal places.
Before starting the save, the program asks for the name of the DXF file, proposing a name consistent with the name of the source (current) drawing but with the .DXF extension.
Drawing layer names are assigned according to the source drawing layer names, with some restrictions:
The first layer is always named "0".
The diacritics in the layer name are converted to Latin
Spaces between words are replaced with underscores
The names are only written in uppercase
Empty names are named according to the layer number
(these reservations are necessary due to the requirements of some graphics programs, especially AutoCAD).
AlfaCAD defines the line types in the DXF file that correspond to the line types available in AlfaCAD. Line weights are fixed for each primitive according to the values stored in the [LINES-DXF] group in the ALFACAD.INI configuration file.
The color numbers correspond to the DXF standard.
The size of the drawing sheet is represented by the variables $ LIMMIN and $ LIMMAX, which, however, does not necessarily limit the working area of the drawing in various graphics programs.
Objects that do not have their representation in DXF format are replaced with blocks composed of other objects that give the same graphic effect (eg ellipse, elliptical surface).
Blocks
Many professional graphics programs (eg AutoCAD) allow you to build complex block structures. Blocks can consist not only of graphic primitives but also of other blocks, and the blocks can be rotated at any angle, scaled, inserted once or multiple times, or creating a circular or rectangular pattern. Any complex block structure can be represented in DXF format.
AlfaCAD also allows you to create blocks of virtually any complexity, but their structure differs from that of the blocks represented in DXF format. These differences result from the rules generally accepted in the AlfaCAD program for creating multi-level block structures and the editing functions that allow for easy editing of complex blocks. Therefore, when saving a drawing in DXF format, the block structure is fully preserved (also multi-level), except that each block appears as a single, unique block, similar to AlfaCAD.
Block names in DXF format take the names consistent with the original names with the restrictions:
Any diacritics in the name are converted to Latin
Spaces between words are replaced with underscores
The names are only written in uppercase
To distinguish between blocks that can occur multiple times, each block name (also empty) is extended by a sequence number preceded by a dash.
(these reservations are necessary due to the requirements of some graphics programs, especially AutoCAD).
The program can read drawings saved in DXF format compatible with AutoCAD: r.9 or newer, and in DWG format from AutoCAD R14 to the v2015.
The program automatically recognizes the DXF and DWG version in the drawing.
After calling the function / File // Import // DXF / or / File // Import // DWG / and indicating (entering) the name of a file in DXF or DWG format, the drawing conversion parameters dialog box is initiated. The dialog box is always opened when a drawing in DXF format is loaded, and in case of drawing in DWG format is loaded, when its conversion to temporary DXF format was successful.
The dialog box contains the following information:
[Header]
drawing width and height expressed in drawing units, based on EXTMIN (X, Y) and EXTMAX (X, Y) values, which are the drawing range in the lower left and upper right corner, respectively.
drawing width and height in drawing units , based on the values of LIMMIN (X, Y) and LIMMAX (X, Y), which are the drawing boundaries in the lower left corner and upper right corner, respectively.
[Setup]
sheet dimensions expressed in [mm] , calculated on the basis of EXTMIN / EXTMAX or LIMMIN / LIMMAX with a given drawing unit and scale
dX - offset of the drawing origin along the X axis
dY - offset of the drawing origin in the Y axis
drawing units
drawing scale
[Format]
drawing sheet format - sheet
sizes selected automatically for placing a drawing, or a standard
format selected from the list)
If the DXF file was created with AutoCAD, the units should match the drawing units interpretation in ACAD.
If the file was created in AlfaCAD, set [mm] as the units.
If the DXF file comes from ACAD, the conversion scale should match the expected drawing scale.
For files created with AlfaCAD programs, use a scale of 1: 1.
There is no information about the drawing sheet format in the DXF file. Hence, the prototype drawing PROTOTYPE.AXF is initiated , in which objects read from the DXF set are inserted, while the point <0.0> of the DXF drawing is shifted to the point <0.0> of the global AlfaCAD coordinate system. For this purpose, the program uses the EXTMIN values saved in the DXF file.
EXTMIN (X, Y) values are correctly defined in the DXF file if (after various editing operations), before saving the DXF file, the ZOOM / EXTENDS (ZOOM / Range) function will be performed as a result of which the EXTMIN (X, Y) values will be updated and EXTMAX (X, Y) .
The prototype drawing PROTOTYPE.AXF can be freely modified (similarly to the standard prototype drawing PROTOTYPE.ALF).
After reading the DXF file, the current drawing has no default name, it should be given the first time the drawing is saved to disk.
The program automatically recognizes the following line types:
-
ACAD:
"CONTINUOUS", // solid line
"BORDER", // __ __. __ __. __ __. __ __. __ __. __ __
"BORDER2", // __.__.__.__.__.__.__.__.__.__.__.__.__.__.
"BORDERX2", // ____ ____. ____ ____. ____ ____. ____
"CENTER", // ____ _ ____ _ ____ _ ____ _ ____ _ ____ _
"CENTER2", // ___ _ ___ _ ___ _ ___ _ ___ _ ___ _ ___ _
"CENTERX2", // ________ __ ________ __ ________ __
"DASHDOT", // __. __. __. __. __. __. __. __. __. __
"DASHDOT2", // _._._._._._._._._._._._._._._._._._._._._._.
"DASHDOTX2", // ____. ____. ____. ____. ____. ____
"DASHED", // __ __ __ __ __ __ __ __ __ __ __ __ __ __
"DASHED2", // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"DASHEDX2", // ____ ____ ____ ____ ____ ____ ____ __
"DIVIDE", // ____. . ____. . ____. . ____. . ____. . ____.
"DIVIDE2", // __..__..__..__..__..__..__..__..__..__..__..__ ..
"DIVIDEX2", // ________. . ________. . ________. .
"DOT", //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
"DOT2", // ............................................ ...................................
"DOTX2", //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
"HIDDEN", // __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
"HIDDEN2", // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"HIDDENX2", // ____ ____ ____ ____ ____ ____ ____ ____
"PHANTOM", // ______ __ __ ______ __ __ ______ __ __ ___
"PHANTOM2", // ___ _ _ ___ _ _ ___ _ _ ___ _ _ ___ _ _ ___ _ _ __
"PHANTOMX2", // ____________ ____ ____ ____________ _
"AUSGEZOGEN" // solid line
-
AlfaCAD
"CONTINUOUS",
"LINE",
"POINT",
"2-POINT",
"MULTI-POINT",
"BORDER",
"MEDIAN",
"HIDDEN",
"SPECTRUM",
"DRAWER_2",
"PUNKTOWA_2",
"DOUBLE POINT_2",
"MULTI-POINT_2",
"BOUNDARY_2",
"MIDDLE_2",
"HIDDEN_2",
"WIDMO_2",
"LINE_X2",
"PUNKTOWA_X2",
"DOUBLE POINT_X2",
"MULTI-POINT_X2",
"LIMIT_X2",
"MIDDLE_X2",
"HIDDEN_X2",
"WIDMO_X2",
"THREE-POINT",
"TWO CENTER",
"TRZYKRAKOWA",
"WIDMO_3",
"DOUBLE CENTER_X2",
"TRZYKRAKOWA_X2",
"MULTIPLE LINE"
"WIRE",
"BUS",
"BUS_",
"HIDDENWIRE",
"DASHEDWIRE",
"DASHDOTWIRE",
"DIVIDEWIRE",
"LINEWIRE",
"DASHEDBOLDWIRE",
"DASHDOTBOLDWIRE",
"DIVIDEBOLDWIRE",
"LINEBOLDWIRE",
"BACKGROUNDLINE"
The program also recognizes line types whose pattern names contain one of the type identifiers:
- quasi - ACAD:
"BORDER", // __ __. __ __. __ __. __ __. __ __. __ __
"CENTER", // ____ _ ____ _ ____ _ ____ _ ____ _ ____ _
"DASHDOT", // __. __. __. __. __. __. __. __. __. __.
"DASHED", // __ __ __ __ __ __ __ __ __ __ __ __ __ __
"DIVIDE", // ____. . ____. . ____. . ____. . ____. . ____
"DOT", //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
"HIDDEN", // __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
"PHANTOM", // ______ __ __ ______ __ __ ______ __ __
Unrecognized lines are
interpreted as solid lines.
The program converts font patterns according to the list of equivalents included in the ALFACAD.INI configuration file in the [Fonts-DXF] group
An example of the group of variables (standard values) is presented below.
The name of the variable is the name of the DXF font, the variable values are:
AlfaCAD font name, width factor.
[Fonts-DXF]
POLTECH = POLTECH, 1.428571429;
POLTECH1 = POLTECH1,
0.588235294;
ROMAN = ROMAN, 1;
BLOCK = BLOCK, 1;
FUTURA =
FUTURA, 1;
SYSTEM = SYSTEM, 1;
SYSTEM1 = SYSTEM1, 1;
COMPLEX8 = ROMANC, 1;
COMPLEX = ROMANC, 1;
CYRILLIC =
ROMANC, 1;
CYRILTLC = ROMANC, 1;
GOTHICE8 = ROMANC, 1;
GOTHICG8 = ROMANC, 1;
GOTHICI8 = ROMANC, 1;
GOTHICE =
ROMANC, 1;
GOTHICG = ROMANC, 1;
GOTHICI = ROMANC, 1;
GREEKC
= ROMANC, 1;
GREEKS = ROMANC, 1;
ISO8 = ROMANS, 1;
ITALIC8
= ITALICC, 1;
ITALICC8 = ITALICC, 1;
ITALICT8 = ITALICT, 1;
MONOTXT8 = ITALICT, 1;
ISO = ROMANS, 1;
ITALIC = ITALIC,
1;
ITALICC = ITALICC, 1;
ITALICT = ITALICT, 1;
MONOTXT =
SYSTEM, 1;
ROMANC8 = ROMANC, 1;
ROMAND8 = ROMAND, 1;
ROMANS8
= ROMANS, 1;
ROMANT8 = ROMANT, 1;
SCRIPTC8 = SCRIPTC, 1;
SCRIPTS8 = SCRIPTS, 1;
SIMPLEX8 = SYSTEM, 1;
ROMANC =
ROMANC, 1;
ROMAND = ROMAND, 1;
ROMANCE = ROMANCE, 1;
ROMANT
= ROMANT, 1;
SCRIPTC = SCRIPTC, 1;
SCRIPTS = SCRIPTS, 1;
SIMPLEX = SYSTEM, 1;
SYASTRO = ROMANS, 1;
SYMAP = ROMANS,
1;
SYMATH = ROMANS, 1;
SYMETEO = ROMANS, 1;
SYMUSIC =
ROMANS, 1;
TXT8 = SYSTEM, 1;
TXT = SYSTEM, 1;
DUPLEX =
ROMAND, 1;
STANDARD = SYSTEM, 1;
CIBT ____ = POLTECH, 1;
COBT
____ = POLTECH, 1;
EUR _____ = ROMANC, 1;
EURO ____ =
ITALICC, 1;
PAR _____ = ROMANC, 1;
ROM _____ = ROMAND, 1;
ROMB ____ = ROMAND, 1;
ROMI ____ = ITALICC, 1;
SAS _____
= FUTURA, 1;
SASB ____ = FUTURA, 1;
SASBO ___ = FUTURA, 1;
SASO ____ = FUTURA, 1;
SUF _____ = ROMANC, 1;
TE ______ =
FUTURA, 1;
TEB _____ = FUTURA, 1;
TEL _____ = FUTURA, 1;
CIBT ____ = POLTECH, 1;
COBT ____ = POLTECH, 1;
EUR _____
= ROMANC, 1;
EURO ____ = ITALICC, 1;
PAR _____ = ROMANC, 1;
ROM _____ = ROMAND, 1;
ROMB ____ = ROMAND, 1;
ROMI ____ =
ITALICC, 1;
SAS _____ = FUTURA, 1;
SASB ____ = FUTURA, 1;
SASBO ___ = FUTURA, 1;
SASO ____ = FUTURA, 1;
SUF _____ =
ROMANC, 1;
TE ______ = FUTURA, 1;
TEB _____ = FUTURA, 1;
TEL
_____ = FUTURA, 1;
Unrecognized fonts are
converted to POLTECH.
The standard of Polish diacritical marks in the DXF file (when reading and writing) is defined by the " Diacritics DXF " variable from the [Directory] group of the ALFACAD.INI configuration file:
Diacritics DXF= 2; 0- Other, 1-Latin2, 2-Acad14 for Windows
All 255 colors of the ACAD palette are transformed into the 255 AlfaCAD color palette.
The program includes " BYLAYER " and " BYBLOCK " color declarations for graphic primitives and block elements.
The program preserves the names and attributes (visibility and freeze flags) of all 255 layers, while layer 255 is always invisible and is used to store standard library blocks.
The program maintains the block structure of the drawing, keeping the names of the library blocks as well.
The names of original (original) blocks have a space added at the beginning of the name (these blocks are stored on invisible layer 255).
Child blocks (copies of originals placed on overlay layers) have a period appended to the beginning of their name.
The program takes into account text attributes placed in blocks (text variables) and updates them on subsequent insertions.
AlfaCAD works with multi-level (compound) blocks without limitation of the number of levels.
Information about the amount of available RAM, usage of memory by the current drawing and other information can be obtained by selecting the option / Info / function menu / File / .
The program displays the following information:
memory Size for drawing [KB]
image Virtual memory/Used [MB]
Drawing data size [B]
Printing buffer [KB]
Macro buffer [B]
Image buffer / Virtual screen segment [KB]
Current folder
Graphic mode
desktop Font
Approaching the value of "Drawing data size" to the value of "memory Size for the drawing" indicates that the program resources are exhausted and therefore there may be limitations on the size of the drawing. If the memory is full, the program communicates about the memory limit, ignoring any attempts to introduce new objects. Limiting RAM for a drawing is important when working with multiple drawings open in multiple AlfaCAD windows simultaneously. When working with a single drawing, this value can be set freely.
The program can use up to 2 GB of RAM.