Copyright (C) 1986-2011 by Daniel H. Hudgins, All Rights Reserved.
No part of "This Web Site" (HTML document), including associated files, may be: distributed, sublicensed, transmitted, copied, archived, mirrored, modified, bundled, embedded, sold, given away, rented, loaned, or shared in any form without express written permission in a formal Vendor agreement contract dated and signed in ink obtained directly from Daniel H. Hudgins by registered postal mail. All agreements for permission to distribute expire after a period no greater than one year from the date of the signing of the agreement by Daniel H. Hudgins. See the current "EULA" for information regarding limited copying and storage for the purpose of "Beta Testing" "This Web Site."
To view or use the current version of this Web page you may need to reload or refresh the display of this page by your browser. Just clicking on the browser's [Reload] or [Refresh] icon may not be enough to insure that all of the page's most current contents have been cached and displayed. Some browsers may have additional commands to help display the page's most current contents such as: holding down the [Shift] key and clicking on the [Reload] icon, holding down the [Control] key and clicking on the [Refresh] icon, holding down the [Control] and [Shift] keys and clicking on the [Refresh] icon, pressing the [Control] and [F5] keys, pressing [Control] and the [R] key, or some other combination of keys or clicks. Check to see which commands your HTML browser uses to load the most current page contents into its cache and then to display them onto the screen.
This Web site is dedicated to the thousands of "users" of my programs, those who have helped test my programs over the last 25 or so years, and especially those who shared their experiences with me.
You must read this notice: This is a licensed Web site (HTML document and associated files). You must read and agree to be legally bound in contract by the Terms of Use and conditions given in the End User License Agreement ("EULA"), Legal Notices, Instructions, Warnings, Disclaimers, and all other text in "SECTION: 0" of "This Web Site" (HTML document and associated files) before reading or using any of the information, software programs, and or files, contained in, linked to, and or associated with, "This Web Site" (HTML document and associated files). Any use or "Beta Testing" of "This Web Site" constitutes your acknowledgment of your full agreement with the current End User License Agreement ("EULA") and your decision to have this current license supersede all prior and contemporaneous agreements and understandings. Information and files in "This Web Site" (HTML document and associated files) have been placed here so that long time users of "The Author's" programs DANCAD3D.COM (tm) , DANCAD87.EXE (tm), DANCINEL.EXE (tm), DANCINES.EXE (tm) , DANCAM.EXE (tm) , or DANPLOT.EXE (tm) could help proofread the text of the documentation files or screens displayed, and also help test data files, example files, and or any software programs that might be made available from time to time, to aid "The Author" in finding mistakes, bugs, and other errors, omissions, defects, mistakes, and faults. Everything in "This Web Site" (HTML document and associated files) is "Beta Test", "Beta Code", Experimental, Preliminary, requires proofreading, or is being evaluated for possible revision, and is NOT warranted to be free of defect. To help "The Author" report any bugs, foul-ups, defects, or mistakes that you find, see "SECTION: 8" for instructions. "This Web Site" (HTML document and associated files) and all other files and programs by Daniel H. Hudgins are made available "AS IS" without warranty of any kind express, expressed, or implied. All offers and specifications are subject to change or discontinuation without notice of any kind. Please look over "SECTION: 8" of "This Web Site" before contacting "The Author."
The text in this section was derived from the v2.5 CAD manual, and has been updated somewhat, but differences between different releases of v2.5, v2.6 and v2.7 may mean that some of the information may not apply to the version you are using. Some adjustment may be required for versions prior or subsequent to v2.7A.
You may not distribute, sell, rent, share, or give away these HTML documentation files or printed copies of them. You may not extract text from these HTML documentation files for distribution, sale, rent, sharing, or giving away. You can use the [Print] option in your browser to make one copy for yourself to mark up in order to help me proofread the text for mistakes.
Documents may be available to download from time to time, you can check SECTION: 9 to see what the current situation with regard to downloadable files is. The names of these documentation files may change, and they may be edited, combined, or eliminated in the future, without notice.
You may need to adjust your browser for best viewing of the pre- formatted text by changing the "font" size using the commands in your browser (see the help in your browser, or use the pull-down menus in your HTML browser.) If some letters in words on the screen appear to be missing or scrambled try changing the font size in your browser as this sometimes happens even though the words are spelled correctly in the HTML code.
Use the "Edit, Find in page Ctrl+F" or "Edit, Find (in this page)... Ctrl+F" command in your browser to search for keywords within the documentation text in this HTML page. You will need to search over again in the other pages in this HTML document for the same keyword since your browser may not search for a keyword beyond the current page that is loaded.
DANCAD3D (tm) macro commands can used to write a macro "program" that will operate DANCAD3D (tm) automatically. DANCAD3D (tm) can also automatically generate an output macro file of these commands while you use the programs menus. Appendix B lists detailed information about many of the individual macro commands.
Steps to use Appendix B: Macro commands.
Read this section to learn what commands are available.
Use [W]rite from DANCAD3D (tm)'s main menu to write or edit macros.
Use the automatic [O]utput macro feature to automatically code these macro commands to a file while you use the menu commands.
This appendix contains information on the DANCAD3D (tm) macro programming commands that are available for your use in writing automatic CAD-CAE or CAM programs. See the pages in this Web site that link to this page for additional information.
Below are details about macro commands that start with G.
PURPOSE: Branch to a label in a DANCAD3D (tm) macro program file.
Produces an unconditional branch when used alone, or a
conditional branch when used with IF THEN. See also the
macro LOOP command.
MAIN MENU: NA
KEYWORD: GOTO (Only spelled out in full.)
PARAMETERS: 1
TYPE: w......... Label starting with a colon.
FORMAT: GOTO w
EXAMPLE: GOTO :SKIP ; Unconditional branch.
:ERROR
BEEP
:SKIP
LOCATE 1 15 INPUT |VECTORX
IF |VECTORX < |PI THEN GOTO :ERROR ; Conditional branch.
HINT: See the LOOP command if you want to go to a label a
fixed number of times. The label that is branched to
should only be used once to mark one particular point in
a macro file, but it is all right for several GOTO
commands to be used to branch to that single label. Be
careful that a given label is spelled the same in all
places.
PURPOSE: To clear and set your computer's graphics screen before
calling DISPLAY. You should also use GRAPH to set the
graphics video mode before using the SAVE PIXEL, LOAD
BMP, and other macro commands that display in, or save
from, the graphics screen. See also macro command TEXT
to reset the text video mode after using a graphics
video mode. The graphics mode codes that can be
selected depend on what video modes the graphics video
board in the computer being used supports. Some video
modes listed only work in version v3.7N or later.
MAIN MENU: NA
KEYWORD: GRAPH or GRAPH_MODE
PARAMETERS: 1, 2, or 4
TYPE: w......... Graphic mode codes for "any" video board.
B&W for Black and White.
MONO for monochrome, like B&W.
COLOR for default color mode when available.
BMP for saving 24 bpp BMP file.
F0B24 same as BMP in some versions.
Graphic mode codes for CGA video board.
C640M2 640 by 200 pixels monochrome.
C320C4 320 by 200 pixels 4 colors.
Graphic mode codes for Hercules (tm) video.
H720M2 720 by 348 pixels monochrome.
Graphic mode codes for EGA video board.
E640M2 640 by 350 pixels monochrome.
E640M16 640 by 350 pixels 16 gray scale.
E640C16 640 by 350 pixels 16 color palette.
Graphic mode codes for VGA and SVGA video board.
V640M2 640 by 480 pixels monochrome.
V640M16 640 by 480 pixels 16 gray scale.
V640C16 640 by 480 pixels 16 color palette.
V320M256 320 by 200 pixels 256 gray palette.
V320P256 320 by 200 pixels 256 photo colors.
V320C256 320 by 200 pixels 256 drawing color.
Graphic mode codes for VGA and SVGA Digital Cinema.
V320X200M16 320 by 200 pixels 16 gray scale.
V640X200M16 640 by 200 pixels 16 gray scale.
V640X350M16 640 by 350 pixels 16 gray scale.
V640X480M16 640 by 480 pixels 16 gray scale.
V320X200M256 320 by 200 pixels 256 gray palette.
V320X200P256 320 by 200 pixels 256 photo colors.
Graphic mode codes for just SVGA video board.
S640M256 640 by 480 pixels 256 gray palette.
S640P256 640 by 480 pixels 256 photo colors.
S640C256 640 by 480 pixels 256 drawing color.
S800M16 800 by 600 pixels 16 gray scale.
S800C16 800 by 600 pixels 16 color palette.
S800M256 800 by 600 pixels 256 gray palette.
S800P256 800 by 600 pixels 256 photo colors.
S800C256 800 by 600 pixels 256 drawing color.
S1024M16 1024 by 768 pixels 16 gray scale.
S1024C16 1024 by 768 pixels 16 color palette.
S1024M256 1024 by 768 pixels 256 gray palette.
S1024P256 1024 by 768 pixels 256 photo colors.
S1024C256 1024 by 768 pixels 256 drawing color.
S1280M16 1280 by 1024 pixels 16 gray scale.
S1280C16 1280 by 1024 pixels 16 color palette.
S1280M256 1280 by 1024 pixels 256 gray palette.
S1280P256 1280 by 1024 pixels 256 photo colors.
S1280C256 1280 by 1024 pixels 256 drawing color.
S1600M16 1600 by 1200 pixels 16 gray scale.
S1600C16 1600 by 1200 pixels 16 color palette.
S1600M256 1600 by 1200 pixels 256 gray palette.
S1600P256 1600 by 1200 pixels 256 photo colors.
S1600C256 1600 by 1200 pixels 256 drawing color.
S1920M16 1920 by 1440 pixels 16 gray scale.
S1920C16 1920 by 1440 pixels 16 color palette.
S1920M256 1920 by 1440 pixels 256 gray palette.
S1920P256 1920 by 1440 pixels 256 photo colors.
S1920C256 1920 by 1440 pixels 256 drawing color.
S2048M16 2048 by 1536 pixels 16 gray scale.
S2048C16 2048 by 1536 pixels 16 color palette.
S2048M256 2048 by 1536 pixels 256 gray palette.
S2048P256 2048 by 1536 pixels 256 photo colors.
S2048C256 2048 by 1536 pixels 256 drawing color.
VESA to set a 15, 16, 24, or 32 bpp VESA mode.
SEEK to search for a 15, 16, 24, or 32 bpp VESA mode.
LIST to pick a 15, 16, 24, or 32 bpp VESA mode.
VESA is followed by one number:
i = the VESA video mode code in decimal,
i.e. base 10, e.g. 274 and such.
Note that the VESA mode numbers are not
the same on all video boards, and if you select
the wrong code number your monitor may
burn out or overheat and catch on fire.
Check the manufactures information on your
video board and monitor to see what
video mode code numbers are safe to use.
SEEK is followed by four numbers:
i = SEEK mode, e.g. mode 0 in v2.7G.
i = X pixels in video mode to seek.
i = Y pixels in video mode to seek.
i = bpp, bits per pixel, 15, 16, 24, or 32.
LIST is followed by one number:
i = LIST mode, e.g. mode 0 in v2.7G.
FORMAT: GRAPH w
or
GRAPH VESA i
GRAPH SEEK i i i i
GRAPH LIST i
EXAMPLE: GRAPH B&W ; Set graphic screen for DISPLAY.
GRAPH COLOR ; On HGC video COLOR is like B&W.
GRAPH V320M256 ; 256 gray palette on VGA.
GRAPH S640C256 ; 256 color palette on SVGA.
GRAPH VESA 274 ; 24 bit color mode.
GRAPH SEEK 0 640 480 24 ; Seek VESA mode by attributes.
GRAPH LIST 0 ; Display a list of VESA modes.
{ for the BMP mode some disk variables need to be used before the video mode is set }
LET B24OVER_.VAR = 1 ; anti-aliasing oversample value
LET B24UNDER.VAR = 1 ; sub-pixel undersample value
LET B24XPIX_.VAR = 800 ; x pixels value
LET B24YPIX_.VAR = 600 ; y pixels value
LET B24DITHE.VAR = 4 ; tone dithering value
LET$ B24BACK_.VAR = "" ; no background when making background
LET$ B24NAME_.VAR = "BACKGROU.BMP" ; name for 24 bit BMP file to output to
GRAPH_MODE BMP ; set video mode for CRT BACKGROUND
CRT BACKGROUND 21 1 2 4 ; make background image.
TEXT ; restore text mode.
{ and in another example for the BMP or F0B24 mode, }
; Example macro to save 24 bit BMP file, see INFOV27F.TXT.
WYSIWYG 1
LET B24OVER_.VAR = 4 ; anti-aliasing oversample value
LET B24UNDER.VAR = 2 ; sub-pixel undersample value
LET B24XPIX_.VAR = 800 ; x pixels value
LET B24YPIX_.VAR = 600 ; y pixels value
LET B24DITHE.VAR = 4 ; tone dithering value
LET$ B24BACK_.VAR = "MYPHOTO.BMP" ; background 24 bit BMP image
LET$ B24NAME_.VAR = "MYCGI.BMP" ; name for 24 bit BMP file to output to
GRAPH_MODE BMP
LET LS0ZFAR_.VAR = -7.75 ; far lambert lighting point
LET LS0ZNEAR.VAR = +5.50 ; near lambert lighting point
LET LS1XDEG_.VAR = 0 ; light source x rotation
LET LS1YDEG_.VAR = -75 ; light source y rotation
LET LS1ZDEG_.VAR = -45 ; light source z rotation
LET LS0LAMB_.VAR = 0.85 ; lambert brightness
LET LS0REFL_.VAR = 0.8 ; lambert reflection brightness
LET LS1BRIG_.VAR = 1 ; light source brightness
LET LS1REFL_.VAR = 1 ; light source reflection brightness
# 1 DISPLAY -20 -20 0 -10 240 74 0 0 ; make the 24 bit BMP file
TEXT ; restore text mode.
NOTE: In version 2.6 the EGA color mode will become B&W if you
save the pixel screens and reload them. Also in version
2.6 the ANIMATE command will show the EGA color frames
in B&W. The CGA color mode will reload as the 320 by
200 by 4 color mode if GRAPH COLOR is issued. Issue
GRAPH B&W before loading CGA B&W frames to display the
full 640 by 200 resolution. So that your macros are
more transportable no error is reported if you select
the COLOR option when the macro is run on a Hercules
(tm) monochrome type video mode video board, the results
will always be 720 by 348 monochrome though. In v2.6 if
you want to record the 16 color EGA screen you can use a
cine camera with color film and the macro SIGNAL command
to advance the camera one frame at a time. In v2.7G The
EGA 16 color or gray mode Pixel files display in color
or gray when reloaded. Versions subsequent to v2.7G may
use some different video mode codes, check for
information relating to the version you currently have.
HINT: When you use the main menu [P]review command while the
[O]utput macro is active the prompt that asks you to
select the graphics mode will automatically code the
corresponding GRAPH or GRAPH_MODE macro command into the
output macro file. The graphics mode prompt that asks
you to select a graphics mode may not come up in some
versions of the program when only monochrome mode is
available, because there would be only one mode you
could enter. See also the TEXT macro command to reset
the TEXT video mode, especially after using GRAPH BMP or
GRAPH F0B24 or the VESA 15, 16, 24, or 32 bpp video
modes. Although any of the video modes will work with
the Kinema Edit list, some may be too large to load at
24 fps sync sound speed on your computer. One of the
special "Digital Cinema" video mode codes listed above
may allow the image frames to be loaded at or near sync
sound speed, the Pick and View commands can skip a frame
or two occasionally because the harddisk access speed is
inadequate or other system glitches. Using a solid
state harddisk may give smoother frame loading than
using a mechanical harddisk. Some of the lower
resolution SVGA video modes may be usable with the
Kinema Edit list, such as 320x240x16 or 320x400x16, but
you will have to use the LIST option with the video mode
prompt or this GRAPH_MODE command to see if your video
board supports such video modes.
PURPOSE: To make a Graph plotting lines and or symbols
automatically from data files. The Graph is output to
an ASCII drawing file. The ASCII drawing file can be
loaded into the drawing workspace to be viewed, printed
out, or converted into a BMP image file. See also the
Files Utilities ASCII Graphing command in the CAD
program menus. This command was added in v2.7I.
MAIN MENU: [F] [U] [A] [G]
KEYWORD: GRAPHING
PARAMETERS: 1 or 2
TYPE: i......... Graphing mode code 0 for GRAPHING command.
or
i......... Graphing mode code 1 for GRAPHING command.
f......... Filename for *.GTF graphing template file.
FORMAT: GRAPHING i
or
GRAPHING i f
EXAMPLE: GRAPHING 0 ; Make template file.
GRAPHING 1 GRAPHING\FILENAME.GTF ; Make Graph file.
NOTE: This macro command for the graphing command works by
reading a template file. The template file is created
by using the program menus. Since the template files
may vary from one program revision to another, it may be
best to execute a graph template in the same program
version that created the template file.
The name of the new graphing macro command is GRAPHING
and it is followed by a graphing mode command code.
After the graphing mode command code there may be other
parameters depending on the graphing mode code being
used.
When the graphing mode code is 0 some text menus come up
that let you create a graphing template file, i.e.
GRAPHING\FILENAME.GTF, by entering values manually.
GRAPHING 0
When the graphing mode code is 1 the program reads a
valid graphing template file and tries to make an ASCII
drawing file of the prescribed graph.
GRAPHING 1 GRAPHING\FILENAME.GTF
The LOAD ASCII file command can then be used to load the
graphing drawing saved in the ASCII drawing file that
was made. The name of the ASCII output file is
prescribed in the graphing template file, see above, so
to change the ASCII output filename for the graph you
need to use mode 0 with the GRAPHING macro command, or
use the Files Utilities ASCII Graphing menu command off
of DANCAD3D.COM (tm)'s main menu.
The original data file type used by DANGRAPH.COM v1.x
used the text file format, text line 1 had the name of
the data set or filename, line two had the number of
data points, and the subsequent lines had the graphing
point data in the format that each line had two spaced
numbers, the number on the left had the x value and the
number on the right had the y value, so the total number
of text lines in the data file would be two plus the
number of data points.
[name of DANGRAPH.COM v1.x data file]
[number of data points]
[x for point 1] [y for point 1]
[x for point 2] [y for point 2]
[x for point 3] [y for point 3]
[x for point n] [y for point n]
For example, the graphing point data would be written in
a DANGRAPH.COM (tm) *.DTA data file using the format:
SOMEDATA.DTA
6
1.1 3.6
1.2 3.4
1.3 3.7
1.5 3.8
1.8 3.5
2.1 3.2
In this example only 6 data points to plot are recorded,
in actual *.DTA files to plot the number of data points
could be fewer or much greater.
The *.DTA graphing point data files could be made using
the [W]rite command, some other text file editor, or by
writing a computer program in some language.
To make inputting the graphing point data easier, the
new graphing command can also accept graphing data in
the DANCAD3D.COM (tm) v2.7 ASCII file type. When you
draw the data you should draw it as a set of dots, or if
you draw the data as a set of connected lines you should
draw the last data point also as a dot since only the x1
and y1 values are used for the graphing data, the x2 and
y2 line end point data is not read for making the graph.
The same data as in the example DANGRAPH.COM (tm) *.DTA
file above in an ASCII drawing data file would look
like:
ENTER
1.1 -3.6 0 1.1 -3.6 0 1 1 0 0
1.2 -3.4 0 1.2 -3.4 0 1 1 0 0
1.3 -3.7 0 1.3 -3.7 0 1 1 0 0
1.5 -3.8 0 1.5 -3.8 0 1 1 0 0
1.8 -3.5 0 1.8 -3.5 0 1 1 0 0
2.1 -3.2 0 2.1 -3.2 0 1 1 0 0
0 0 0 0 0 0 0 0 0 0
Note that the sign of the y values in the ASCII file is
not the same as in the *.DTA file type, keep this in
mind if you manually edit the ASCII data in the [W]rite
command. The ASCII file type can be loaded into the
drawing editor, and the [P]ull point command might be
used to move the data points around.
The way the graphing point data is to be plotted in the
final graph is regulated by the GRAPHING\*.GTF or
"Graphing Template File" that you need to create using
the graphing menu commands before you generate the graph
drawing file. The graph drawing file is output as an
ASCII drawing file, and can be loaded into the workspace
for inspection by using the LOAD ASCII command.
The specifics of the values in the *.GTF graphing
template file may change in various program revisions,
so be sure to check the data entry values in the menu
commands in the version you are using.
The *.GTF graph template file is in ASCII text, and so
can be edited with the Write command, or you could write
a program to automatically generate *.GTF files,
although I do not recommend doing so since the contents
of the *.GTF file may change from one program revision
to another.
HINT: You should use the menu form of the GRAPHING command
located in the Files Utilities ASCII sub-menu with the
automatic output macro turned on (see Output in the CAD
main menu) to generate macro code for use of the macro
GRAPHING command, then edit the output macro code as
needed with the Write command. See file INFOV27I.TXT
and SECTION: 3.3.7.9 for more information about the
GRAPHING command.