WWW.DANCAD3D.COM (sm): THE OFFICIAL DANCAD3D (tm) "BETA TEST" WEB SITE.

TERMS OF USE, HOME, INDEX, SHORTCUT, WHAT'S NEW, DOWNLOADS, GET MAIN ZIP, DOCUMENTATION, VIDEO, HOOKUP#1, #2, #3, KEYWORDS

FEATURE FILM 4K+ DIGITAL CINEMA UNCOMPRESSED EDITING AND SOUND MIXING
PLUS DIY MOVIE 35mm FILM SCANNING AND DIY 35mm FILM RECORDER SOFTWARE.

DANCAD3D (tm) DRAWING EDITOR, click on image for more info. and larger images. 3D ROBOTIC ANIMATION, click on image for more info. and larger images. 3D CONTOUR SURFACE, click on image for more info. and larger images. 3D CAM TOOL PATH, click on image for more info. and larger images. STEPPER MOTORS FOR CAM, click on image for more info. and larger images. DANCAM.EXE (tm) OPERATING 3D MILL, click on image for more info. and video. IM HELP STATUS, click on image for more info. and IM address.
Kodak (tm) LAD film negative scan image made with Canon XTi (tm) DSLR. Kinema Edit list Grading Levels #1 color correction tool . Kinema Edit list Grading Curves #1 color correction tool. Kinema Edit list Grading chroma Masking tool Vector display. Kinema Edit list Grading chroma Masking tool Waveform display. Kinema Edit list Grading Sharp/Soft filter tool. Kodak (tm) LAD image color corrected positive.
Click on these thumbnails for related information about my current software, features, and IM support. Hold [Shift] and click [Reload] to refresh IM thumbnail.

If are helping "Beta Test" you should report bugs and feel free to ask questions about the program's commands, it is best to email me at tempnulbox (at) yahoo (dot) com and put "DANCAD3D (tm) 24x7 SUPPORT SUBMISSION" in the email subject line so your mail is not deleted as junk. See Section: 8 for more information about support related issues. I want you to ask questions so long as they are on the subject and relate to the current program's commands. If you do not get some kind of reply assume I did not get your message and resend it and also try voice mail, postal form, etc. All submissions and correspondence become the sole property of Daniel H. Hudgins to do with as he sees fit, so stay on subject.

SECTION: 3.1.60.0
The Run command and CAD macro basics.
This Section, Macro Basics, Using the Automatic Output Macro generation feature, Using the Automatic Output Macro to correct mistakes, Using the Automatic Output Macro to Correct and Edit Lettering, and Using the Automatic Output Macro to prototype Macro Code.

Copyright (C) 1986-2008 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 22 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) , 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 read "SECTION: 8" of "This Web Site" (HTML document and associated files) before trying to contact "The Author."


Click here to go back to SECTION 3.1.0.0 Index for CAD documentation..
Click here for top of DANCAD3D.COM (tm) Web site home page or here for home page INDEX.
Click here to check the current internet document if you are viewing this from a disk copy.
Note: If you want to go back to the previous link use the [Back] button in your browser.

This Section.

The text in this section has been revised to include some of the developments for a revision of version v2.7B, program versions, updates, or revisions prior or subsequent may work differently and so what is stated here may not apply to the particular version, update, or revision you might have, i.e. those other versions. The documentation is only generally descriptive of the programs, you should check the operation of each particular program that you will be "Beta Testing" since operation of the programs is subject to change without notice.

This HTML documentation section has documentation mostly about my CAD programs DANCAD3D.COM (tm) and DANCAD87.COM (tm). Most the discussion about DANCAD3D.COM (tm) also applies to "Beta Testing" DANCAD87.COM (tm), the math co- processor version, as well, except for some differences in some of the files saved and the need for a math co-processor. See also the other documentation in this Web site for additional information, particularly the CAM program documentation and the supplemental documentation, tutorials, and appendices. The disclaimer, and most of the other legal text is currently located in SECTION: 0, therefore you must read the disclaimer, End User License Agreement (EULA), legal text and other text in SECTION: 0 before you read any of the other documentation or use any part of this HTML document, this section, or associated files and programs.

I may expand or revise the documentation someday, so check back from time to time to see if any new or revised files have been up-loaded to the Web site.

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.

Click here to go back to the top of this page.

Macro Basics.

DANCAD3D (tm) can read a text file containing english like commands and run itself automatically to produce drawings, animated films, tool path files for manufacturing, and almost any other task that you can do by operating the program manually. These special text files are called Macros and when my programs are run under DOS have had the *.MAC file extension. DANCAD3D (tm) was originally designed to operate entirely automatically and although DANCAD3D (tm) can be operated manually from the menus by entering one command at a time, you should take seriously the advantages of this important automatic Run macro operation feature. A list of the macro commands you can use in your macro "programs" is in Appendix B. DANCAD3D (tm) can also output a macro file, via the main menu [O]utput macro command, that notes which menu commands you have been using, this is useful because you can edit the output macro file, make changes to the macro codes and values, the Run the macro to regenerate the elements in the workspace with the changes.

Steps to use macros:

  1. To automatically make a macro file of commands that record most of what you do with DANCAD3D (tm)'s menus press the [O] key from the main menu. You can also turn on the output macro file by using the [F]iles [O]utput macro command in the drawing editor.

  2. To Run one of the demo macro files supplied on the disks select [R]un from DANCAD3D (tm)'s main menu and enter the name of the macro file you wish to run (i.e. file mask *.MAC.)

  3. You can look at and possibly edit the DEMO macro files with the text editor ([W]rite from the main menu.)

  4. When you write your own macro files be sure to start the macro file with the macro VERSION command.

  5. To have a DANCAD3D (tm) macro automatically run from DOS simply put the filename of the macro after DANCAD3D (tm) on the DOS command line (of course macros can be called from DOS batch files in this same way, i.e. C:\DC27>DANCAD3D SOMENAME.MAC.) Under Windows (95) you can "drag" the name of a macro from the macro file's icon in a Windows 95 (tm) folder directory onto a shortcut icon for DANCAD3D (tm) and the program will automatically run the macro file, provided the file paths are stated properly in the macro file.

A macro in DANCAD3D (tm) is simply a text (text is letters, words, symbols, and numbers arranged like in a book or news paper, and readable by a human) file of commands that DANCAD3D (tm) and you can read. You would read instructions in the macro file in order to edit it, DANCAD3D (tm) would read the macro file instructions to accomplish the task that the macro commands indicate should be done. DANCAD3D (tm)'s macro commands can be used for very simple tasks by listing the commands in the order that they are to be executed, first at the top of the file and last at the bottom, or for more complex program like tasks that can be written using conditional branching and loops.

The macro file is run by entering the name of the macro file with the main menu's Run command. The automatic output macro feature should generally be turned off before you run a macro.

If you are not a programmer you should not be frightened away from writing macros. Using the list programming structure you simply write the commands in the order you want them to happen. After you become proficient in writing lists you can try loops and branches. Loops let you repeat a portion of the file several times. In place of a loop you can of course just repeat the commands over and over in the list, but if you were to repeat several commands several hundreds of times using the programming loop would make the macro file much shorter and easier to edit. The conditional branch lets you have the macro commands test if certain conditions exist and skip over parts of the file if the certain conditions do exist.

The macro commands used for loops and branches are the LOOP, IF THEN, GOTO, LET, and label : marker symbol the colon. Variables can be used to count the number of times a section of the macro code is repeated.

The macro commands can be useful to you even if you have no desire to think up lists of commands. The automatic output macro file record feature can record many of the commands you select from DANCAD3D (tm)'s menus and write the appropriate macro commands into the output macro. The name of the output macro the macro commands are automatically written into is whatever you tell DANCAD3D (tm) to use when you open the output macro with the [O]utput command from the main menu or drawing editors [F]iles sub-menu.

The names, a.k.a. keywords, of the macro commands generally correspond to the commands in DANCAD3D (tm)'s menus. The command to rotate an element is ROTATE, the command to magnify an element is MAGNIFY, and so on. Many of the macro commands have, and are followed by, a parameter list. The parameter list may contain numbers, letters, words, filenames, or variable names. If the wrong number, or type, parameters are entered a error message may be produced when the macro is [R]un. You might use the macro trace to locate the position of a error in a running macro. You can turn on the macro trace by pressing [M] while in the main menu, or by pressing [T] while the macro is running. To control the speed of the macro trace press [D] while the macro is running, and set the trace delay. It may take a few minutes for the macro trace delay prompt to come up since the current macro command needs to finish what it is doing before the delay prompt can come up.

DANCAD3D (tm) supports both number and string variables, so the parameters associated with a macro command can change during the execution of the macro. Number and string variables can be stored on your harddisk and recalled after a macro ends. The INPUT and INPUT$ macro commands let the user enter numbers or strings in response to prompts from the macro code. You can create menus in macros, that appear on the screen when the macro is run, to control what the macro does, thereby making adjustments without having to edit the macro's text each time the macro is run.

Macro text command files, "macros," are just standard ASCII text files that contain macro commands. You can use DANCAD3D (tm)'s built in text editor to write and edit macro text files. You can also use some other text editors or word processors to edit macro files, if they have a pure ASCII text mode, i.e. DOS *.TXT file type. Some non-pure-ASCII word processors may insert hidden commands, or control codes, into the text and will not be readable with DANCAD3D (tm)'s macro interpreter, the [R]un command from the main menu. Some word processors that claim to write pure ASCII code might sometimes insert the control Z, the ASCII code number 26, into the text of the file. Loading a text file that has been contaminated with control Zs into DANCAD3D (tm)'s text editor, the Write command, and saving the text back to a disk file might remove the contaminating control Zs. Control Zs in a text file that has been edited in some other word-processor can make the bottom part of a macro not be run, the execution would stop when the control Z is read, because control Z is the ASCII end of file marker, a.k.a. eof. So if you have problems with a file edited in some other text editor program, try loading the file in to the Write command, then save it back to disk and see if that helps.

One of the more powerful features of DANCAD3D (tm) macros is their ability to have the macro RUN command in the macro code, which lets your macro run another "sub" macro automatically from inside a main macro file. The sub-macro might also contain the macro RUN command as well, so sub-macros might be able to "nest," depending of the amount of free memory and which commands are being used. If you are interested in doing so, DANCAD3D (tm) might let you tackle some very useful and intricate macro programming tasks, without having to resort to writing a program in some other computer language for the preparing of drawing elements and tool path files.

In simple macros you can write out the values of the parameters as literal values. A lot of interesting macros can be made using only literal values, or unchanging constants, i.e. 90, 1.0236. If you want to get into more sophisticated macro programming you can use variable names in place of the literal parameters that go with the macro commands. Numeric variable names, stored in RAM, in DANCAD3D (tm) can have eight letters. Numeric variable names preceded with the | characters, ASCII code number 124, are stored in your computers RAM, variables without the vertical bar character #124 are stored on your computers harddisk, or RAM disk if you have one on your system and use the drive letter for the RAM disk before the variable name. Since you can store variables on your floppy or harddisk you can have virtually unlimited numbers of variables. The LET command assigns and or declares numeric variables. The LET$ is used for creating and assigning string variables for letters, words, and text. Equations can be used in place of variables or literal constants if you enclose the equation in square brackets, [ and ]. ALL COMMANDS SYMBOLS AND PARAMETERS MUST BE SPACED, do not use commas or other punctuation marks to space parameters.


EXAMPLE: LET |ZROT = [ SIN( |DZ ) / 2 ]

In the above |ZROT and |DZ are stored in RAM for quick access. The size of the RAM scratch pad is limited and should be used for variables that are used frequently. Variable names that are no longer needed can be removed with the RELEASE command e.g. RELEASE |ZROT.


EXAMPLE: LET ZROT = [ SIN( DZ ) / 2 ]

In the above ZROT and DZ are stored on the same sub- directory the CAD program is running in, normally your harddisk.


EXAMPLE: LET E:\VAR\ZROT = [ SIN( E:\VAR\DZ ) / 2 ]

In the above ZROT and DZ are stored on the RAM disk E:\. The sub-directory E:\VAR\ was made with the DOS MD command because the number of files that can be stored in the root directory is limited, generally more files can be stored in a sub-directory.


EXAMPLE: LET$ STRVAR1 = [ "E:\" + $STRVIN ]

In the above $STRVIN means "use the current contents of string variable STRVIN", there is no $ in front of the variable name STRVAR1 since you want the result to be put into that variable, and not the "filename" STRVAR1's contents might imply, this is a subtle but very important bit of string variable syntax you need to keep in mind when using string variables. See Appendix C for more information about variable syntax.

If you save variables onto your harddisk make sure that the variable names you use are not the name of some important file, because variables are written to the disk without asking for permission to overwrite any existing file with the same name.

One of the original reasons for having DANCAD3D (tm) have the macro capability was to have DANCAD3D (tm) produce animated sequences, or movies, of significant complexity. When tasks become very complex or time consuming it is much easier, and less mistake prone, to make a list of commands, proofread the list of commands, and let the program read the list of commands and carry out the commands. DANCAD3D (tm) has the ability to operate your laser printer, dot matrix printer, or cine film recorder automatically, thereby allowing the writing of macro programs to produce drawings and animations that have virtually an unlimited number of elements moving in any number of complex motions. To this end, the workspace can be emptied and refilled, and the graphic screen, JET or DOT page file, or printer buffer can be repeatedly written to in order to include additional components.

DANCAD3D (tm)'s macros can be used for a wide range of tasks from printing several drawings overnight, generating or altering tool path files, batch conversion of drawing files, to making animated simulations of many moving parts. I am mentioning a range of tasks DANCAD3D (tm) can perform not to brag in any way, but rather to let you know that DANCAD3D (tm) may give you years of interesting challenges as you learn and explore its vast capabilities and variety of possible applications.

Click here to go back to the top of this page.

Using the Automatic Output Macro generation feature.

DANCAD3D (tm)'s automatic output macro generation feature can be used for three major purposes:

  1. To protect against making some mistakes while drawing.

  2. To allow editing and spell-checking of lettering commands. Spell- checking would be done with your favorite spell checker on the output macro file after you quit DANCAD3D (tm).

  3. To make prototype macros or sub-macros that will be run from or incorporated into larger macro programs produced with the text editor.

Click here to go back to the top of this page.

Using the Automatic Output Macro to correct mistakes.

The thing you need to remember most to protect against mistakes when using DANCAD3D (tm) is to have the automatic macro command turned ON, i.e. on as a new macro, or on to append more commands to an existing macro file. The output macro status display at the top of the main menu says NEW, APPEND, and OFF. NEW means you have started a new file or are over writing and old one. APPEND means you are adding more new commands to the bottom of a macro file that was started before. OFF of course means that the macro is not having commands added to it, you would only have the output macro OFF when you are using menu commands that you do not want recorded to the output macro file. The output macro file can also be turned on or off by using the [F]iles [O]utput command in the drawing editor. The output file status is also reported at the bottom of the drawing editor screen. The output macro file can be on at the same time that the G code output file is on, so that lines drawn are recorder using both techniques.

The steps to go through in using an automatic macro for protection against some mistakes are:

  1. Initialize the workspace by pressing [I] from the main menu. Turn on the automatic macro file (by pressing [O] from the main menu) before you start working on a drawing. Give the macro a descriptive filename you will remember. The standard file extension for macros is *.MAC. You can also initialize the drawing workspace from the drawing editor's root menu, and turn on the output macro file with the drawing editor's Files Output macro command.

  2. Work on your drawing until you make a mistake you can not correct with one of the menu commands (such as [E]rase or [U]ndo.)

  3. Turn the automatic macro off (by selecting [O] from the main menu.)

  4. Select [W]rite from the main menu and edit the bottom of the macro text to remove the commands that messed the drawing up. Each macro command in the automatic macro file has a time and date stamp that should help you know what commands happened after the drawing stopped looking the way you wanted it to. Lines of text in the macro are deleted by putting the text cursor on the line you want to delete and pressing the [Control] and [Y] key at the same time (press [Escape] to recover deleted lines of text.)

  5. Save the edited text back to your harddisk. If you are not sure that you edited the macro properly you should save the edited macro text under a different file name. Quit the text editor and go back to the main menu.

  6. Select [R]un from DANCAD3D (tm)'s main menu and let the macro interpreter re-generate the elements you drew. Since the workspace was empty when you opened the automatic output macro file the automatic output macro file should start with an INITIALIZE command that will destroy any elements in the workspace before the [R]un command was selected. If you want to save any elements in the workspace before you run the macro you can use the [F]iles [S]ave [E]lements command from the main menu. Be sure that the Output macro is off before you Run the edited copy of it, or you will get a Run command appended to the output macro asking the macro to run itself which is not what you want to have happen.

  7. Turn the edited automatic macro file back on by pressing [O] from the main menu after the macro interpreter has finished running the edited (repaired) macro. Select the APPEND mode so new commands will be added to the bottom of the edited macro.

  8. Enter the drawing editor [D]raw from the main menu and confirm that the mistake has been corrected. Continue working on your drawing. You can look at the bottom of the drawing editor to make sure you see APPEND to tell you that the menu commands are being saved to the designated output macro.

Click here to go back to the top of this page.

Using the Automatic Output Macro to Correct and Edit Lettering.

By using the automatic output macro feature to store drawings as macros, rather than storing drawings in a drawing data file, you can edit and change the lettering commands without erasing the lettering elements in the workspace and having to use the lettering command in the drawing editor menu over again to make new lettering elements. This ability to edit lettering can let you change units from english to metric, alter dates, translate the language of any text in a drawing, and of course fix spelling mistakes. The Calligraphy command BLOCK reads small text files, and so you can of course also edit the small text files that the BLOCK command reads. The filenames of the small text data files that go with each BLOCK macro command will appear in the automatic macro file as part of the parameter list with each BLOCK command.

Steps to Edit Lettering:

  1. Initialize the workspace by pressing [I] from the main menu. Turn on the automatic macro file, by pressing [O] from the main menu, before you start working on a drawing. Give the macro a descriptive filename you will remember. The standard file extension for macros is *.MAC. When you use the lettering command from the Calligraphy sub- menu try to use the Justify option for the letter spacing since the Justify option will hold the text length (the distance between the first and last characters) constant if you change the number of characters in the line of text later (this only works of course if you change the number of characters in the line of text by fewer than about 10%.)

  2. Turn the automatic macro off (by selecting [O] from the main menu.)

  3. If you want to edit any of the text for the lettering commands select [W]rite from the main menu and edit the macro text to alter the text string constants of the LETTERING commands as needed. Save the edited macro back to your harddisk before you exit the text editor. If you edit the lines of text be sure that you do not add any spaces at the end of the lines of text since spaces at the ends of lines of text (lettering text string constants) will make the line of text (lettering) look shorter or off center in the finished drawing.

  4. Quit DANCAD3D (tm) and process the automatic output macro file, you were creating, by using your spell checker. Be careful that your spell checker does not alter any of DANCAD3D (tm)'s commands and parameters, and that the spell checker only changes the lines of text (lettering text constants.)

  5. Run DANCAD3D (tm) again.

  6. Select [R]un from DANCAD3D (tm)'s main menu and let the macro interpreter re-generate the elements you drew. Since the workspace was empty when you opened the automatic output macro file the automatic output macro file should start with an INITIALIZE command that will destroy any elements in the workspace before the [R]un command was selected. If you want to save any elements in the workspace before you run the corrected macro you can use the [F]iles [S]ave [E]lements command from the main menu. If all goes well your drawing should look as it did before except for the changes you intentionally made to the lettering commands. Once you become familiar with the parameters of the LETTERING, BLOCK and DIMENSIONING commands you may be able to alter the line color, width, and so on just by editing the macro commands, of an output macro, in a text editor. Keep in mind that the search and replace command of a text editor can be used to locate the LETTERING commands in a macro.

  7. Save the re-generated (re-generated means that the macro interpreter, RUN from the main menu, has repeated the steps that you took when you entered the commands from the menus) drawing by using the commands in the [F]iles [S]ave sub-menu from the main menu, or print the drawing out by using the commands in the [H]ardcopy sub- menu.

Click here to go back to the top of this page.

Using the Automatic Output Macro to prototype Macro Code.

Sometimes when writing a set of macro commands in the text editor to draw a particular figure you might have difficulty visualizing exactly where certain points are in the three dimensions. You can RUN the macro commands you have written manually with the macro interpreter and then use the automatic output macro feature to APPEND commands that will manipulate the elements created by the macro commands you wrote manually while you see what you are doing in the drawing editor, and especially when you are using the [O]n-screen sub-menu in the drawing editor.

You can also use the automatic output macro feature to produce several small output macro files that can be read into a larger macro file with the Write command's read block of text function, ^[K]^[R] or [F9]. ^[K]^[R] means hold down the [Ctrl] key and type [K] then [R]. The small output macros can also be RUN with the RUN macro command as separate sub-macro files rather than being incorporated into the main macro program. I frequently use the automatic output macro feature to aid in the placement of lettering since it is easier to see where lettering should go by using the drawing editor than just working with the values to the lettering command out of my head. You can though, do some page layout tasks just fine by making a sketch on a piece of paper with a pencil and entering the values manually to the lettering commands parameter list.

Steps to manipulate elements interactively as part of the writing of a macro manually i.e. using the automatic output macro feature to append commands to a macro that you have written manually in the text editor:

  1. Initialize the workspace by pressing [I] from the main menu. Select [W]rite from the main menu. Write a macro file, use the text of the supplied *.MAC files as an example of the proper form, style, and syntax. Save the macro you wrote to your harddisk. Press [F1] then select [Q]uit the text editor.

  2. Run the macro you wrote by using the macro interpreter (Use command [R]un from the main menu.)

  3. Use the [O]utput command from the main menu to APPEND commands to the macro filename you were writing in step 1.

  4. Enter the drawing editor (Draw from the main menu) and manipulate the elements as needed. Try using the [O]n-screen sub-menu when you need to rotate or move (drag or offset) elements around.

  5. Turn off the outputting (appending) of macro commands to your macro file (by pressing [O] from the main menu) and repeat steps 1. through 5. as needed to complete your macro.

  6. When the macro is complete run the macro one last time in the macro interpreter to fill the workspace with the desired elements. Save or print out the elements in the workspace as desired. Be sure that your macro starts with the INITIALIZE command, or that the workspace is empty before you run the macro to avoid incorrect confused results (assuming that the macro begins by having the workspace empty, the workspace does not need to be empty for a macro to run, but if you are going to re-run a macro the initial contents of the workspace need to be the same for the result to be the same when the macro is run.)

Following are the steps to create sub-macros and macro procedures with the automatic output macro feature, i.e. how to create macro "procedures" largely through the use of the interactive drawing editor, and then edit the macro procedures into functional macro code with the Write command text editor.

Steps to output a sub-macro:

  1. Initialize the workspace with the Initialize command in the main menu. It is not necessary that the workspace be empty while creating special sub-macros and procedures, but if the workspace is not empty you will have to keep track of the element numbers that go with the various macro commands. One problem you have to face when combining macro code from several macro files into a single macro file is that the element numbers that go with the various commands need to be correlated to the correct element to act on. There are two ways to minimize problems with element numbers. One is to divide the concatenated macro file into sections where each section ends with the elements that are to be used again being saved to disk and then the next section of the concatenated macro would begin with the INITIALIZE command. Having the workspace empty at the beginning of each section of a macro makes keeping track of what element belongs to what number much easier. Another way to keep track of element numbers is to assign a variable to the current highest element number and then make the elements added after the "marker" variable relative to the markers value.

    
    EXAMPLE: VERSION v2.7A
             LET |MARKER -> ELEMENTS
             ; -> is a special symbol that reads special values like the
             ; number of LINES or ELEMENTS in the workspace and assigns
             ; the value to one of DANCAD3D (tm)'s user named variables.
             ; Ordinary assignment of variables is made with the = symbol.
             LOAD 3DQ PART.146  ; This is [ |MARKER + 1 ]
             LOAD 3DQ PART.987  ; This is [ |MARKER + 2 ]
             LOAD 3DQ PART.767  ; This is [ |MARKER + 3 ]
             # [ |MARKER + 2 ] ROTATE C 0 0 90  ; Rotate PART.987
             LET |PART987 = [ |MARKER + 2 ]     ; Assign a variable
             # |PART987 ROTATE C 0 0 45         ; Rotate PART.987 again
    
    
  2. Use the [O]utput command from the main menu to open an automatic output macro.

  3. Use the [D]raw command from the main menu to create a macro procedure in the current automatic output macro file.

  4. Close the current automatic output macro file.

  5. Repeat steps 2. through 4. to make several macro files (with different names) that perform different manipulations or create unique elements.

  6. Use the [W]rite command from the main menu to edit and combine or concoct the macro procedures you created with the automatic output macro into a larger macro file (if you want to, so the order of the running of the small macros can be scripted.)

  7. Save the edited of concatenated macro and quit the text editor.

  8. Use the [R]un command from the main menu to run the concatenated and scripted macro programs to produce some useful result.

  9. Save or print out the elements created by running the concatenated macro program as desired.

I hope the above description of some of the tasks you can put DANCAD3D (tm)'s macro feature to have encouraged you to increase your use and interest in macros. Do not feel that you need to understand everything at once, you might read through Appendix B and try to learn one new macro command each day.

Click here to go back to the top of this page.

TERMS OF USE, HOME, INDEX, SHORTCUT, WHAT'S NEW, DOWNLOADS, GET MAIN ZIP, DOCUMENTATION, VIDEO, HOOKUP#1, #2, #3, KEYWORDS

WWW.DANCAD3D.COM (sm): THE OFFICIAL DANCAD3D (tm) "BETA TEST" WEB SITE.

This copy of this page was compiled on or around: Y2008.M05.D14, you might check the "On-Line" version, or come back later, to see if there is a newer compile.