13.07.2015 Views

Macro Language - Statements

Macro Language - Statements

Macro Language - Statements

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 3 von 743FileBackup NewFillWideLine NewGetEntity NewLockX NewLockY NewLockZ NewMidpoint2 NewPlotSort NewPolygonSelection NewPresetPointMode NewPrintCurrentView NewResizingNodes NewRestoreDCADTile NewRestoreDefaultMenu NewRotate ChangedRunX NewSaveAs ChangedSaveCopy NewSaveCustomKeys NewSegment ChangedSelectDuplicateToLayer NewSetShadeStyle NewSplit NewSplit2 NewTruncatedCone NewWindow New<strong>Macro</strong> Commands Added or Changed in Version 15:Arc4 ChangedAttribute ChangedDimension ChangedEllipsoid NewExtrude ChangedExtrudeAlongCurve NewHatchPosition NewHideRestoreToolbars NewRemoveDrawingHandles NewRoundCylinder NewSaveAsSymbol NewSelectSlant NewSendAllFiles NewSendCurrentFile New


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 4 von 743SetHandle ChangedShowDrawingHandles NewShowSymbolHandles NewTrimDouble ChangedUnitsOfMeasurement New<strong>Macro</strong> Commands Added or Changed in Version 16:ConvertToMultiline NewDoEntitySelection NewHatchFill ChangedMultilineMode NewMultiLineStyleEditor NewSelectAddPoint New<strong>Macro</strong> Commands Added or Changed in Version 17:AddLayerToGroup NewArrangeEntitiesByID New in 17.1ArrangeEntitiesByLayerOrder New in 17.1CircleTanLine NewCreateLayerGroup NewDeleteLayerGroup NewDeleteLayerFromGroup NewPerimeter NewRecursiveGroupExplode NewSectionTrim NewUserDefinedViewsEditor New


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 5 von 743Command Line Invocation of <strong>Macro</strong>s and ExesNew for version 14You can now run macros and executables from the commandline, optionally withcommand-line parameters, and you don't have to use the "Run" command to do it. You caneven omit the extension.For example: press the spacebar and type "params test.txt".DesignCAD first determines that there is no internal command named "params". It then looksfor a matching macro filename, checking first for file extension BSX, then BSC, then D3M, inthat order. If it finds no such macro, it looks for an EXE file. You may of course specify theproper extension to bypass the extra searching.If params is a macro, the rest of the command line is copied to Sys$(0); it is up to the macro toparse the string into different values as required by its code.If params is an executable, the rest of the string is passed to that program's command line, andthe program can optionally parse the results.Paths: If no path or extension is specified, DesignCAD will first search for a macro inDesignCAD's default macro directory, then in DesignCAD's home directory; if no macro isfound, it will then look for an exe in DesignCAD's default exe directory, then DesignCAD'shome directory, then the Windows directory. Of course, you can specify the full path to themacro or program to bypass this search.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 6 von 743Line Break CharacterYou may break up long lines of code using the underscore character '_'. When the underscoreis the last character on a line, and is preceded by at least one space, it indicates to DesignCADthat the line of code is continued on the following line. If the underscore character is inside aquoted string, it will be ignored.The overall length of the combined lines may not exceed 255 characters; however, any whitespace at the beginning or end of the lines does not count toward the 255 character limit.Examples:' broken line of codex = 2*_pi_*r^2 _+ 128*(z - 32*deltaX1 + 13.5*deltaY2) _+ 15*sqrt(z^2 + deltaX1*z + deltaX1^2)' unbroken line -- the character is in a quoted string.myStr$ = "This is not _ a broken line of code"' broken line of code -- breaks up long quoted strings.myStr$ = "This is a " _+ "broken line of code"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 7 von 743Built-In ConstantsDesignCAD now provides a built-in constant for pi (π) to simplify your mathematical coding:_PI_ = 3.141592653589793 -- the ratio of a circle's diameter to its circumference._PI_ can be used in BasicCAD programs or from within the calculator.(DesignCAD 13.0 and later)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 9 von 743<strong>Macro</strong>s and Preset Point ModeFor a long time in DesignCAD for Windows, there was no way to access points set from PresetPoint Mode in a macro. Starting with version 13, if you run a macro from Preset Point Mode,any currently available preset points are stored in the macro's point buffer, just as if you hadrun the SetPoint statement or Entity statement inside the macro. These points can be assignedto variables using PointVal, just like points that have been set using SetPoint.Furthermore, you can add extra points directly into the point buffer via code -- you don't have torely on the user to set them. The PresetPoint macro command allows you to add points to thepoint buffer using the standard macro parameters --


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 10 von 743New and Enhanced Sys Functions10 – Current units of measurement for printing [1 = inches, 25.4 = mm, 2.54 = cm, 0.0254 = m,0.0000254 = km, 0.08333333 = feet, 0.0000157828282828282 = mi](new values added for feet, km, and miles in Version 15; see also Sys(1114))14 – Sets the Display Grid type * New in 16[0=Ortho, 1=Isometric, 2=Polar]16 – Enable/Disable Use Plot Range Box * New in 15[0=Disable, 1=Enable]If enabled, draws a rectangle around the plot boundary when exporting HPGL files. Ifdisabled, no border is plotted.19 – Sets the minor Display Grid spacing along X (or Angular spacing for Polar grid) * New in1620 – Sets the minor Display Grid spacing along Y(or Radial spacing for Polar grid) * New in 1651 – Display Arcs as Vectors * New in 14[0 = Disable, 1 = Enable] If this is set to zero, arcs are drawn using Windows API functionsexclusively. The default setting is 1, whereby arcs are displayed as vector approximationsin order to prevent display anomalies where an arc joins the end of a line.52 – Sets the major Display Grid divisions along X (or Angular spacing for Polar grid) * New in1653 – Sets the major Display Grid divisions along Y (or Radial spacing for Polar grid) * New in 1654 – Sets the Display Grid style * New in 16[0=lines, 1=dots, 2=crosses]55 – Sets the Display Grid Angle (in degrees) for isometric display grids * New in 16[0 – 360]72 – Graphics Acceleration Setting for Hidden Line Removal* New in 15[0=off (default), 1=on]81 - SetPoint behavior * New in 14[0=clear buffer (default), 1 = append points to buffer]Normally, when you run the SetPoint statement, it clears any previous points from thepoint buffer. If Sys(81) is set to 1, you can run multiple SetPoint statements to accumulatemore and more points.100 – Line Fill Spacing for HPGL Export * New in 15Controls the spacing between line fill pen strokes. Distance in plotter units.112 - Depth of Nested Folders in Symbol Library window * New in 15.1Sets the number levels of nested folders under the symbol library search path. Defaultvalue of 1, which only shows a tab for the target path and any folders immediately beneathit that contain drawing files. Higher values will show tabs for increasingly deeper folderlevels. Once this value is changed, if you have already opened the Symbol Library


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 11 von 743command you may have to manually browse to a different folder and then back again inorder to update the Symbol Library display.139 – Sets/Clears the "Trim Picked Segments Only" options in Trim commands * New in 17[0 = off, 1 = on]Version 17 offers a new option in the Trim commands: Trim Picked Segments Only. Thisoption affects whether or not segments beyond the selected segment are also trimmedaway.140 – Sets/Clears the "Grid Smoothly Degrade" checkbox in Grid Options * New in 17[0 = off, 1 = on]If this is set to 1, the display grid will smoothly reduce the number of visible grid lines asyou zoom out. If it is set to 0, the grid will become invisible if you zoom out too far to displayevery grid division.269 - Number of Arc Segments * New in 16This function how many segments to create when an arc, ellipse, or circle is created as aplane or line.Note 1: this only affects initial creation – it does not affect conversion to plane or vectorafter the object is created.Note 2: This represents the total number of segments for the new entity – 20-degree arcsand full circles will have the SAME NUMBER OF SEGMENTS. For example, if it is set to20, a circle drawn with the "create as line" option will have 20 segments, as will a20-degree arc created with the "Save as line" option.270 – Display Entities by Layer Order [0 disables, 1 enables] * New in 16CHANGED IN 17.1 -- Display by Layer Order flag removed. Added instead:AutoName Entities when Created [0 disables, 1 enables]271 – Layer List Filter Mode* New in 16[ 0 = Active Layers Only, 1 = Named Layers Only, 2 = Active Or Named Layers Only, 3 =All Layers, 4 = Layer Groups Only]272 – Layer List Sort Mode* New in 16[ 0 = by index, 1 = by status, 2 = by name, 3 = by content]273 – Number of Multiline Styles in the current document (Read_Only)* New in 16274 – Number of Layer Groups in the current document (Read_Only)* New in 16275 – Visibility of Symbol Layers controlled by Symbol Host Layer * New in 17.1[0 = no, 1 = yes]If this is set to 1, you can not hide individual layers inside symbols; the entire symbol ishidden or shown based on the visibility of its host layer.When this is set to 0, you may hide or show entities inside the symbol by hiding or showingtheir original layers.279 – MultiLine Mode Status * New in 16[0 = off, 1 = on]If MultiLine Mode Status is on, all new lines will be drawn as multilines.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 12 von 743280 – Current Layer Group Number * New in 17281 – Current Layer Group Status * New in 17[0 = invisible, not editable,2 = visible, not editable4 = visible and editable]282 – Select Invisible Attributes * New in 17.1[0 = off, 1 = on]If on, allows selection of hidden attributes on visible editable layers (thus emulatingattribute selection behavior in Version 13 and earlier)If off, only visible attributes on editable layers can be selected.283 – Opaque Texture Maps * New in 17.2[0 = off, 1 = on]If this flag is on, texture maps completely obscure the wireframe color of thetexture-mapped object. If it is off, the color of the texture map blends with the wireframecolor fo the object. This affects both accelerated and native shading modes.309 – Major Grid Color (Red value) * New in 16[0 – 255]310 – Major Grid Color (Green value) * New in 16[0 – 255]311 – Major Grid Color (Blue value) * New in 16[0 – 255]375 – Current MultiLine Style index * New in 16376 – Minor Display Grid Color (Red value) * New in 16[0 – 255]377 – Minor Display Grid Color (Green value) * New in 16[0 – 255]378 – Minor Display Grid Color (Blue value) * New in 16[0 – 255]445 – Arrowhead size (non-dimension arrows) * New in 16530 - Layer uses specific color (0/1) * New in 14(don't set this unless you've already set 531, 532, and 533)531 - layer red (default 0) * New in 14532 - layer green (default 0) * New in 14533 - layer blue (default 0) * New in 14


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 14 von 743555 - Attribute Definition behavior when exploding blocks * New in 14[1=explode to attribute (uses the text contents, not the tag name)2=leave as attribute definition]This function allows you to control what happens to attribute definitions when a block isexploded.1035 – Reconstruct grids after solid operations [0=no, 1=yes] *New in Version 15By default, DesignCAD will attempt to combine adjacent facets from a cut grid entity intoone or more new grids. By turning this flag off, all facets of a cut grid will be converted toplanes.1036 -- selectable invisible attributes? [0=no, 1 = yes] *New in Version 15If this is set to 1, SelectAll will select both visible and hidden attributes on visible layers.Sys(1100) – (1130) are all new to Version 151100 – Current Units of Measurement[0 = none, 1 = inches, 2 = feet, 3 = miles, 4 = mm, 5 = cm, 6 = m, 7 = km]1101 – Default Units of Measurement for new drawings [0 = none, 1 = inches, etc.]1102 – Default Units of Measurement for unitless drawings [0 = none, 1 = inches, etc.]1103 – Interruptible Snap Mode [0 = off, 1 = on]1104 – Running Snap Mode [0 = off, 1 = on]Which snaps are on during Running Snap Mode is determined by Sys(1105) – (1109)1105 – Running Gravity Snap [0 = disabled, 1 = enabled]1106 – Running Line Snap [0 = disabled, 1 = enabled]1107 – Running Midpoint Snap [0 = disabled, 1 = enabled]1108 – Running Intersect-1 Snap [0 = disabled, 1 = enabled]1109 – Running Tangent Snap [0 = disabled, 1 = enabled]1110 – Current Toolbars Visibility [0 = off, 1 = on]Reflects the current status of Show All Toolbars command1111 – Snap to Hatch points [0 = disabled, 1 = enabled]1112 – File Lock [0 = unlocked, 1 = locked by another instance of DesignCAD]1113 – Drawing Handles Visible[0 = no, 1 = yes]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 15 von 7431114 – Printing Base Units [1 = inches, 2 = feet, 3 = mi, 4 = mm, 5 = cm, 6 = m, 7 = km](See also Sys(10))1115 – Explode Symbols/Blocks at Top-Level only[0 = no (explodes recursively) 1 = yes (retains sub-blocks or symbols)]1116 – PresetPoint Mode [0 = off, 1 = on]1117 – Skip font data when saving DC2/DC3 ASCII files. [0 = off, 1 = on]1118 – Ortho tolerance angle (Default value 10 degrees)This setting controls the maximum deviation from horizontal/vertical axes that the Orthocommand will convert to horizontal or vertical.1119 – Truncate trailing zeros in dimensions? [0 = no, 1 = yes]1120 – Truncate trailing zeroes in angular dimension? [0=no, 1=yes]1121 – Truncate trailing zeroes in arc dimensions? [0=no, 1=yes]1122 – Truncate Trailing zeroes in chamfer dimensions? [0=no, 1=yes]1123 – Truncate trailing zeros in diameter dimensions? [0=no, 1=yes]1124 – Truncate trailing zeros in radius dimensions? [0=no, 1=yes]1125 – Truncate trailing zeros in coordinate dimensions? [0=no, 1=yes]1126 – Truncate trailing zeros in progressive dimensions? [0=no, 1=yes]1127 – Truncate trailing zeros in progressive radius dimensions? [0=no, 1=yes]1128 – Truncate trailing zeros in distance-only dimensions? [0=no, 1=yes]1129 – Truncate trailing zeros in baseline dimensions? [0=no, 1=yes]1130 - – Truncate trailing zeros in extended dimensions? [0=no, 1=yes]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 16 von 743New Sys$ Functions0 – Commandline parameters. *New in 14This function contains any extra information that was on the command line after the macroname, or was passed by the CMDLINE statement to a RUN or CALL statement. Forexample, if you run mymacro.d3m by typing "mymacro.d3m 1, 10, 100" at thecommandline, when the macro checks Sys$(0) it will find the string "1, 10, 100"43 – The default symbol library path *New in 15105 – DesignCAD version number *New in 14(?)300 - Entity Name. *New in 16This function contains the name of the ENTITY statement.301 – Layer Group Name. *New in 17This function contains the name of the current layer group.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 17 von 743Chapter 1: <strong>Macro</strong> <strong>Language</strong> - <strong>Statements</strong>In this chapter we list the BASIC-like statements that make the DesignCAD <strong>Macro</strong> <strong>Language</strong>so versatile. The statements are listed alphabetically, along with a description and samplecode fragments.BasicCAD EssentialsA Note On FilenamesALIAS StatementANYKEY StatementAssignment StatementBREAK-> StatementCALL StatementCHAIN StatementCHANGE StatementCLEAR StatementCLEARSTORAGE StatementCLEARSTORAGE$ StatementCLOSE StatementCLS StatementCMDLINE StatementCOLOR StatementDIM StatementDO WHILE and LOOP <strong>Statements</strong>END StatementENTITY StatementEXIT DO StatementEXIT FOR StatementFOR and NEXT <strong>Statements</strong>FORMAT StatementGET Statement


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 18 von 743GETATTR StatementGETLAYERPROPS StatementGETSELECT StatementGETXY StatementGOSUB and RETURN <strong>Statements</strong>GOTO StatementIF Statement (Group IF)IF Statement (single line)INCLUDE StatementINPUT StatementINPUT # StatementLABELSLAYER StatementLOCATE StatementMESSAGE StatementON ERROR StatementOPEN StatementPARSE StatementPOINTVAL StatementPOPPOINT StatementPRECISION StatementPRINT StatementPRINT # StatementPUSHPOINT StatementPUT StatementPUTATTR StatementQUERY StatementREGEN StatementRESUME Statement


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 19 von 743RUN StatementSETLAYERPROPS StatementSETPOINT StatementSETSELECTEDPOINTS StatementSTOP StatementTAB StatementUPDATE StatementUPDATELAYER StatementWCLOSE StatementWINDOW Statement


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 20 von 743BasicCAD EssentialsThe DesignCAD macro language is not case sensitive; i.e. using the variable nameThisVariable or THISVARIABLE makes no difference.Line numbers are not used in BasicCAD. A label can be used as the object of a GOTO orGOSUB statement.A line of code may not exceed 255 characters in length (including white space).You may break up long lines of code by using the line continuation character " _ " beforecontinuing a command on the next line of text. However, these lines still may not exceed 255characters in overall length. (The white space between the beginning of a continued line andthe first character in the line does not count toward the overall length.)Examples:longStr$ = shortStr$ + Mid$(otherStr$, _start_char, _end_char)If ((x > 21 AND y < 15) _OR (z = 12 AND y = 19) _OR (Len(otherStr$) > 50) ) Thengosub SomeRoutine:End IfBasicCAD recognizes only two data types – Numeric and String. The Numeric data type isactually a 64-bit real or floating-point type (identified in some programming languages as adouble). The String data type contains a sequence of up to 255 characters or bytes.<strong>Macro</strong> variable names and labels can be up to twenty characters in length. (DesignCAD 3000and earlier only allowed up to eight characters for variable names and labels.)Variable names and labels can consist of numbers and letters and underscores, but they mustalways begin with a non-numeric character. String variables must end with a dollar sign ($).Any of the following are valid macro variable names:JTestValname$BaselineLengthvar_with_underscoreThere are several words which BasicCAD reserves for its own use. These words should not beused as variable names; accidentally using a keyword as a variable name can causeunexpected behavior. All BasicCAD keywords are listed in the <strong>Macro</strong> <strong>Language</strong> Keywordstopic.Any of the following are valid numeric constants:4545.42E3 '(This is 2 * 10 ^ 3, or 2000)Numeric expressions can contain the following operators:+, -, *, /, \, MOD, and ^.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 21 von 743+ and – perform the everyday operations of addition and subtraction.* The asterisk is used to perform multiplication. For example, 2*5 = 10./ The forward slash operator performs regular floating-point division. For example, 9/4evaluates to 2.25.\ The backslash operator performs integer division – that is, of the result of the division is notan integer value, it is truncated to the next-lowest integer value. For example, while 9\4evaluates to 2.MOD The MOD operator performs modular arithmetic -- it finds the remainder of a divisionoperation. For example, 9 MOD 4 evaluates to 1.^ The caret operator performs exponentiation – that is, x^y is x raised to the power y. Forexample, 2^3 evaluates to 8. Note: the number being raised to a power must be not be anegative number, or the operation will result in an error.** Note: Version 17.1 and higher do allow x to be a negative number, so long as y is an integer.So (-2)^3 is allowed, but (-2)^2.5 gives an error.Parentheses are also allowed. Expressions are generally evaluated left to right, but someoperations take a higher precedence than others, and expressions inside parentheses areevaluated before any surrounding operators are applied. The following are valid numericexpressions:A * B + 4A \ B + 4A MOD 44 ^ 2 '( = 16)2 + 4 * 5 '( = 40) multiplication trumps addition2 * 4 + 5 '( = 13)2 * (4 + 5) '( = 18) expressions in parentheses go first2 * 3 ^ 2 '( = 18) exponentiation trumps multiplicationSQRT(4) + 4'(functions can be used in expressions)As with most programming languages, the operator precedence is:1. ^ ' exponentiation2. *, /, \, MOD ' multiplication, division, modulus3. +, - ' addition and subtractionString constants can be anything enclosed in quotes (" "):"This is a string""4 * 8 is a string, if it is in quotes"To embed quotation marks in a string, double up on the quotatin marks:"This is a ""string with quotation marks"" embedded"String variables and constants cannot contain more than 255 characters.Logical expressions are expressions that evaluate to true or false. They are frequently used inDO and IF statements. Valid logical expressions can include relational operators (, , =,=) and logical operators (AND, OR, NOT). As with most programming languages, theoperator precedence is:1. , , =, =


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 22 von 7432. NOT3. AND4. OROf course,'' is "Greater than,'' is "Not Equal",'=' is "Equal",'=' is "Greater than or equal to".Parentheses can be used in logical expressions. Let us assume we have a variable B that hasthe value 5. Some examples of logical expressions are:(assuming B is equal to 5)NOT B < 5 OR B = 7'trueNOT B < 5 AND B = 5'trueB 5 AND B = 5 'false; AND has precedence'over OR(B 5) AND B = 5 'trueIt is a very good idea to put comments in your macro programs. Comments are placed after anapostrophe (') anywhere on the line:Print J 'A comment can go here.'A comment can also be on a line by itself.Comments may also be placed in the same line as DesignCAD macro commands orparameters:>PolygonEdge 'YOU MAY PUT COMMENTS HERE{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 23 von 743A Note On FilenamesMany of the statements and commands in the BasicCAD language use a filename as one oftheir arguments. BasicCAD has introduced a shortcut mechanism to refer to the DesignCADroot installation directory, making it much easier for developers to load files from a genericDesignCAD installation, rather than hard-coding"C:\Program Files\IMSI\DesignCAD 3D Max 17\Developer's Directory\..."If you start your filenames with "*\", the path is assumed to start in the directory whereDesignCAD itself is located. So, for example, we can have our macro useRun "*\<strong>Macro</strong>s By Jack\<strong>Macro</strong>997.d3m"instead ofRun "C:\Program Files\IMSI\DesignCAD 3D Max 17\<strong>Macro</strong>s By Jack\<strong>Macro</strong>997.d3m"The immediate advantage is, all a developer has to do is install his macros in a standarddirectory beneath DesignCAD's own root directory. If the user installed DesignCAD intoE:\IMSI Software\Dcad17, the first run statement above will still work (assuming the macrosare in the appropriate "<strong>Macro</strong>s By Jack" directory). The second form clearly would not work inall cases. Of course, there are ways around this, by using Sys$(36) and checking a lot ofother stuff before the macro starts it's proper tasks, but we recommend using "*\" as ageneral-purpose shortcut.The same shortcut style can be used for macro commands that take a ImportXYZ{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 24 von 743ALIAS StatementPURPOSE:SYNTAX:EXPLANATION:To replace one string of text in the macro program with another string.ALIAS name text-being-aliasedThe ALIAS statement allows the programmer to create shortcuts forlonger or less readable pieces of text in the macro. This usefulstatement allows you to create new names for Sys() functions, Sys$()functions, frequently used strings of text, or any other short piece ofcode.The alias name can be up to twenty characters long, just as normalvariable names can be. The text-being-replaced must be short enoughthat the entire ALIAS statement line does not exceed 255 characters.However, you should always remain aware that the length of a line ofcode that uses aliases is calculated as if the replacement text wereactually there.When the macro is read into memory, DesignCAD replaces all aliaseswith the actual text they represent before running the macro. Thismeans that replacing long lines of text with short alias names may getyou into trouble if you aren't careful.Note: Do NOT use a comma to separate name and text-being-aliased, or thecomma will become part of the alias.Alias Abe1 "Four score and seven years ago,"Alias Abe2 " our fathers brought forth on this"Alias Abe3 " continent a new nation..."' Now we use the aliased strings in a statement:t$ = Abe1 + Abe2 + Abe3' This line of code, apparently 23 characters long,' is actually converted tot$ = "Four score and seven years ago, " + _" our fathers brought forth on this" + _" continent a new nation..."' which is a 109-character line of code. This isn't too' long for DesignCAD to handle, but you can see how longer' aliases might have exceeded the maximum line length.' DesignCAD will warn you if you exceed the 255-character' line-length limit.Remember that the ALIAS statement must come before the code thatuses the alias. Aliases may be loaded from INCLUDEd files, so long asthe INCLUDE statement precedes the first use of the alias.An aliased identifier cannot be used inside double quotes as part of astring, but it can be appended to the contents of a string using thenormal rules for string concatenation.Aliases are only replaced once, when the macro is first loaded. Thismeans that you cannot redefine aliased strings dynamically while themacro is running.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 25 von 743COMPATIBILITY:Version 13 and laterEXAMPLES:Alias now Sys$(7) ' current timecurrentTime$ = nowAlias wmfSize Sys(45)wmfSize = 2.5 'set up wmf export to ouput 2.5 inch wmf filesAlias myHero "Albert Einstein "t$ = myHero, "was a mathematician"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 26 von 743ANYKEY StatementPURPOSE:SYNTAX:EXPLANATION:To wait for a single key press.ANYKEY {variable}The ANYKEY statement waits for and reads keystrokes from thekeyboard. This statement can be used with or without a variable. If avariable is used, then the value of the key pressed is assigned to thatvariable. String variables or numeric variables can be used. If anumeric variable is used, the ASCII code of the keystroke is assignedto the variable. Pressing a mouse button will act as a keystroke, but willassign no value to the variable in the ANYKEY statement.This statement is useful if you want to pause for a key press afterprinting to the bottom of the screen or to a text window.COMPATIBILITY:All versionsEXAMPLES:AnykeyAnykey A$ ' Read a keystroke into A$Anykey KEY ' Read a keystroke into KEY


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 27 von 743Assignment StatementPURPOSE:SYNTAX:EXPLANATION:To assign a value to a numeric variable.variable = expressionstringvar = expressionlistVariable can be any numeric variable name. Expression can be anyvalid numeric expression.Stringvar is any valid string variable name. Expressionlist is one ormore string or numeric expressions separated by commas. Numericexpressions can be assigned to a string – they are evaluated andconverted to ASCII format. Using more than one expression allowsyou to concatenate strings.COMPATIBILITY:All versionsEXAMPLES:x=123.456d$=x 'd$ is "123.456"x = 18y = 3z = x + y 'z = 21x = sin(t) + 3 * j ^ 2xpos = xpos + 1z = Sqr(var(2))xp(j) = xp(k) * 2a$ = "This is a test"j = 23b$ = "the answer is ", j' b$ is "the answer is 23"a1$ = "1234"a2$ = "5678"a3$ = a1$+a2$ ' a3$ is "12345678"a4$ = a1$, a2$' a4$ is "1234 5678". Notice the space' between the 4 and the 5.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 28 von 743BREAK-> StatementPURPOSE:SYNTAX:EXPLANATION:To assist in debugging macros by temporarily stopping the executionof a DesignCAD macro and displaying the values of one or morevariables.BREAK-> formatstring$, variable1 [, variable2, variable3…]This statement is used to pause the execution of a macro andoptionally display the value of one or more variables at that point intime.The BREAK-> statement is only executed when the macro is in debugmode (i.e. when Sys(800) has been set to 1 or 2)To simply pause the macro and step through it, use a simple BREAK->statement with no arguments. As long as Sys(800) is set to 1 or 2, themacro will pause at the break point and display the following prompt inthe Debug window:-> BREAK-> F5: Continue, F8: Next Statement, F9: Remove Breakpoint, Esc: Stop ProgramThe macro can then be stepped through using F5 and F8, or the breakpoint can be removed (but only from the copy of the macro that isstored in memory – the original source file is not affected).The BREAK-> statement can also be used to display the value of oneor more variables using a format string. The string can consist of anytext, including placeholders for variables to be displayed. After theformat string come the names of the variables to be displayed, in theorder of their placeholders. "%d" is used to indicate a numeric variable,and "%s" is used to specify a string variable.Simple examples of format strings and variables:"The values of x and y are: (%d, %d)", x, y"Current drawing material: %s", Sys$(91)"This layer is named: %s", layname$"The drawing %s contains %d drawing entities", fname$, entcountSee Also: FORMATCOMPATIBILITY:Version 15 and laterEXAMPLE:Sys(800) = 1Precision 0Break->For i = 1 To 10b$ = "I had", i, "eggs for breakfast"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 29 von 743Break-> "i = %d, b$ = %s", i, b$Next iSys(800) = 0End


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 30 von 743CALL StatementPURPOSE:SYNTAX:EXPLANATION:To temporarily transfer control to another DesignCAD macro.CALL macronameThis statement is used to run another DesignCAD macro, then resumethe current macro on the next line after the CALL statement.The CALL statement causes the new macro (macroname) be loadedinto a separate memory space. The new macro has its own memoryfor variables, so it has no interaction with the variables that have beendefined in the original macro. When the new macro ends, executionreturns to the original macro on the next line following the CALLstatement.Differences between CALL and CHAIN:A macro that was started by the CHAIN statement always begins at thefirst line in the new macro. This makes it impossible to return directly tothe next line by CHAINing back to the original macro.A macro started by the CHAIN statement has access to the samevariables as the macro that was CHAINed from. A macro begun by theCALL statement has a separate memory stack for variables.Variable data can only be transferred between the CALLed macro andthe CALLing macro through the use of the SysEx() functions and theSysStr() functions.Note: You should always specify the macro name complete with its extension.See Also: RUN, CHAINCOMPATIBILITY:Version 14 and laterEXAMPLES:Call MACNAME$Call "TEST1.D3M"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 31 von 743CHAIN StatementPURPOSE:SYNTAX:EXPLANATION:To transfer control to another DesignCAD macro.CHAIN macronameThis statement is used to run another DesignCAD macro, leaving allthe variables from the current macro intact when the other macro isexecuted. A string variable or constant can be used for the macroname.The CHAIN statement causes the new macro (macroname) to replacethe current macro in memory. To return to the original macro, you mustexecute another CHAIN or RUN statement from the new macro. Theexecution of a macro called by the CHAIN statement always begins atthe first line in the called macro.The RUN statement is similar to the CHAIN statement, but the RUNstatement clears all variables before executing the new macro.Note: You should always specify the macro name complete with its extension.See Also: RUN, CALLCOMPATIBILITY:All versionsEXAMPLES:Chain MACNAME$Chain "TEST1.D3M"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 32 von 743CHANGE StatementPURPOSE:SYNTAX:EXPLANATION:To change specific parameters of an entity that has been loaded usingthe ENTITY statement.CHANGE parameter, value [,value, value,…]This statement is used to change a specific parameter of an entity to anew value. Available parameters and corresponding values are listedin DCADALIAS.d3i, and also in QUERY and CHANGE ParametersNote: Immediately after you have finished changing all the desiredparameters to an entity, run the Update statement to refresh the entity.See Also: QUERY, UPDATE, QUERY and CHANGE ParametersCOMPATIBILITY:Version 14 and laterEXAMPLE:Include "*\dcadalias.d3i"Entity 1Change ENT_COLOR, 255, 0, 0 ' Change the first entity’s color to RED.Change ENT_NHANDLES, 1 ' define one selection handle for the entity.Query ENT_POINT, 1, X1, Y1, Z1 ' locate the entity’s first pointChange ENT_HANDLE, 1, X1, Y1, Z1 ' set the handle at the first point.Update


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 33 von 743CLEAR StatementPURPOSE:SYNTAX:EXPLANATION:COMPATIBILITY:To erase all variables in the macro.CLEARThis statement is used to erase and de-allocate all variables in themacro. It can be used to free memory or to re-initialize variables.All versionsEXAMPLE:Clear


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 34 von 743CLEARSTORAGE StatementPURPOSE:SYNTAX:To erase some or all SYSVAL_ ini files.CLEARSTORAGECLEARSTORAGE nCLEARSTORAGE m {, }nEXPLANATION:This statement is used to erase one or more of the SysVal ini files thatstore the SysEx() function values.If the CLEARSTORAGE statement is used alone, all SysVal ini files(SysVal_001 – SysVal_100) will be erased.If CLEARSTORAGE is followed by single number or expression n,then the single SysVal ini file whose numeric suffix matches n will beerased.If CLEARSTORAGE is followed by a pair of numbers or expressionsm and n, separated by a comma or a space, all SysVal ini files in therange from m to n will be erased.If three or more arguments are presented to the CLEARSTORAGEstatement, the macro will report a syntax error.COMPATIBILITY:Version 14 and laterEXAMPLE:' Delete all SYSVAL_xxx.ini filesClearStorage' Delete SYSVAL_010.ini onlyClearStorage 10' Delete a range of SysVal ini files from 5 to 14x = 5ClearStorage x, x+9' orClearStorage 5 14


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 35 von 743CLEARSTORAGE$ StatementPURPOSE:SYNTAX:To erase some or all SYSSTR_ ini files.CLEARSTORAGE$CLEARSTORAGE$ nCLEARSTORAGE$ m {, }nEXPLANATION:This statement is used to erase one or more of the SYSSTR ini filesthat store the SysEx$() function values.If the CLEARSTORAGE$ statement is used alone, all SYSSTR ini files(SysStr_001 – SysStr_100) will be erased.If CLEARSTORAGE$ is followed by single number or expression n,then the single SysStr ini file whose numeric suffix matches n will beerased.If CLEARSTORAGE$ is followed by a pair of numbers or expressionsm and n, separated by a comma or a space, all SysStr ini files in therange from m to n will be erased. If n


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 36 von 743CLOSE StatementPURPOSE:SYNTAX:EXPLANATION:To close a disk file.CLOSE {filenumber}This statement is used to close a file that has been opened using theOPEN statement. If a disk file has been opened for input or output, itshould be closed after being used.Filenumber is the number of the file to be closed. If it is omitted, allopen files will be closed.Any input/output files left open when the macro ends are automaticallyclosed. However, the CLOSE statement must be used to close anopen file before that file number can be opened again in the samemacro.See Also: OPENCOMPATIBILITY:All versionsEXAMPLE:Close 1


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 37 von 743CLS StatementPURPOSE:SYNTAX:EXPLANATION:Clear a text window.CLSThe CLS statement clears all the text inside the text window. If a textwindow is not open, this statement has no effect. See the WINDOWstatement for more information on text windows.If you have set the text background color using the COLOR statement,then CLS also set the background color of the entire window to matchthe current text background color.COMPATIBILITY:All versionsEXAMPLE:Window 5, 30 ' open a window 5 lines x 30 charsPrint "press any key to continue..."Anykey' wait for key pressCls ' clear the text window


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 38 von 743CMDLINE StatementPURPOSE:SYNTAX:EXPLANATION:Set the commandline parameters for an upcoming CALL, CHAIN, orRUN statement.CMDLINE commandstring$The CMDLINE statement sets up a commandline string which canthen be queried by a macro that is subsequently run using the CALL,CHAIN, or RUN statements. The new macro may determine the valueof the passed commandline by reading the contents of Sys$(0) assoon as it starts.See Also: CALL, CHAIN, RUNCOMPATIBILITY:Version 14 and laterEXAMPLE:Cmdline "1, 10, 100"Call "*\ThreeNums.d3m"' The contents of Sys$(0) will be "1, 10, 100" when ThreeNums starts.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 39 von 743COLOR StatementPURPOSE:SYNTAX:EXPLANATION:Set the text color in a text window.COLOR foreground {, background}This statement is used to set the color of text in a text window.Foreground is the foreground color for the text, and background is thebackground color. The colors can range from zero to 19. Thesenumbers correspond to the standard Windows palette, not toDesignCAD's palette.The COLOR statement affects only the text displayed with PRINTstatements after the COLOR statement is executed. The text colorremains set at the specified color until the next COLOR statement isexecuted. COLOR will also affect the background color of the entirewindow if you follow it with a CLS statement.COMPATIBILITY:All versionsEXAMPLE:Precision 0 ' print as integersWindow 20, 30 ' open a window 20 lines by 30 charsColor 0, 1 ' white text on blackClsFor i = 0 To 19 ' loop to change the background colorColor 0,i ' foreground 0, background iPrint "this is a test of color", iNext iAnykey


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 40 von 743DIM StatementPURPOSE:SYNTAX:EXPLANATION:To specify the size of one or more arrays.DIM variable(expression) {, variable(expression)...}The DIM statement is used to allocate storage for arrays. An array is asingle variable with several elements, addressed with a subscript inparentheses such as: A(20).An array must be dimensioned before it is used. Any numericexpression can be used for the array size. String arrays are allowed.All arrays are one-dimensional – that is, an array can have only onesubscript.An array cannot be re-dimensioned. A DIM statement must beexecuted only once for a particular variable.COMPATIBILITY:All versionsEXAMPLES:Dim a(10)Dim jx(200), jy(200)Dim a$(20)n = 15Dim point(n)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 41 von 743DO WHILE and LOOP <strong>Statements</strong>PURPOSE:SYNTAX:EXPLANATION:To execute a series of instructions in a loop.DO WHILE logexpression...LOOPThe DO WHILE statement is used to start a loop that will be executedas long as the logical expression "logexpression" is true. When theLOOP statement is encountered, macro execution is transferred backto the DO WHILE statement and the logical expression is checkedagain. When the expression is false, execution continues at the firstline after the LOOP statement.The logical expression consists of one or more relational expressionsseparated by AND or OR. A logical expression can also be precededby NOT.A relational expression consists of two numeric or string expressionsseparated by one of the following relational operators: ,.When using a DO loop, be sure the logical expression will eventuallychange to false, or the loop will never end.DO loops can be nested, that is, one DO loop can be placed insideanother. DO loops can be nested up to 20 levels deep.See Also: EXIT DOCOMPATIBILITY:All versionsEXAMPLE:j = 1Window 5,8Do While j < 20Print jj = j * 2LoopPrint "done"Anykey'opens a text window'prints: 1.000' 2.000' 4.000' 8.000' 16.000'done


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 42 von 743END StatementPURPOSE:SYNTAX:EXPLANATION:COMPATIBILITY:To terminate the macro and return to DesignCAD.ENDThe END statement can be placed anywhere in the macro. When theEnd statement is executed, the macro terminates. This statement isthe same as the STOP statement.All versionsEXAMPLES:If i >= max ThenEndElsePrint "I less than max"End IfEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 43 von 743ENTITY StatementPURPOSE:SYNTAX:EXPLANATION:To access an entity in the drawing by entity number.ENTITY expressionThe ENTITY statement is used to read an entity's information into theSYS function variables 90-99, 290-299, and 390-399. It also places allthe points of the entity into the points buffer, so they can be accessedusing the POINTVAL statement. The entity is accessed by its indexnumber – the arbitrary order in which the entity was placed in thedrawing. This makes it possible to process all entities in the drawing.After running the ENTITY statement, the entity can also be accessedthrough the QUERY and CHANGE statementsCOMPATIBILITY:All versionsEXAMPLE:' Count the number of line entities in layer 20.' Sys(9) is the number of entities in the drawingn = 0For j = 1 To Sys(9)Entity j' Sys(93) = entity layer.' Sys(90) = entity type.If Sys(93) = 20 And Sys(90) = 1 Thenn = n + 1End IfNext jMessage "Number of lines: ", n


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 44 von 743EXIT DO StatementPURPOSE:SYNTAX:EXPLANATION:To exit a DO WHILE loop prematurely.EXIT DOThe EXIT DO statement can be used to exit a DO loop from anywherewithin the loop. This makes it easy to exit a DO loop without using alabel and a GOTO statement.See Also: DO WHILE and LOOPCOMPATIBILITY:All versionsEXAMPLE:Do While i < 1000Anykey keycodeIf keycode = 27 Then Exit Do27 is the ASCII value for Esc..Loop


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 45 von 743EXIT FOR StatementPURPOSE:SYNTAX:EXPLANATION:To exit a FOR loop prematurely.EXIT FORThe EXIT FOR statement can be used to exit a FOR loop fromanywhere within the loop. This makes it easy to exit a FOR loopwithout using a label and a GOTO statement. When executed from anested FOR loop, the EXIT FOR statement will branch out into thenext-higher level of the FOR loop.See Also: FOR and NEXTCOMPATIBILITY:All versionsEXAMPLE:For j = 1 To 100Anykey keycode 'check for the ESC keyIf keycode = 27 Then Exit For..next


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 46 von 743FOR and NEXT <strong>Statements</strong>PURPOSE:SYNTAX:EXPLANATION:To execute a section of the macro a certain number of times.FOR variable = expression1 TO expression2 {STEP expression3}...NEXT variable"Variable" is used as the counter. "Expression1" is the initial value ofthe counter variable. "Expression2" is the test or final value of thecounter. The optional STEP "expression3" can be used to specify theamount that the counter is incremented (or decremented) each pass.The default increment is 1.The macro statements after the FOR statement and before the NEXTstatement are called the loop. Each time the loop is executed, thecounter is incremented (or decremented, if expression3 is a negativevalue). If it is greater than the test value, the loop is exited and themacro branches to the line following the NEXT statement. (If"expression3" is negative, then the loop is exited when the counter isless than the test value.)FOR loops can be nested, that is, one FOR loop can be placed insideanother. The FOR loops can be nested up to 20 levels deep.See Also: EXIT FORCOMPATIBILITY:All versionsEXAMPLES:For j = 1 To 4 'output: 1.00Print j'2.00Next j'3.00'4.00For j = 4 To 1 Step -1 'output: 4.00Print j'3.00Next j'2.00'1.00For j = 1 To 2 'output: 1.000 1.000For k = 1 To 3 '1.000 2.000Print j, k '1.000 3.000Next k 'loop 1Print "loop ", i '2.000 1.000Next j '2.000 2.000'2.000 3.000'loop 2For j = 2 To 1Print "this will not be printed"Next j


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 47 von 743FORMAT StatementPURPOSE:SYNTAX:EXPLANATION:To generate a text string according to a specified pattern usingvariables for portions of the string.FORMAT out$, fmt$ [,var1, var2, var3, …]This statement is used to format a text string according to a specifiedpattern which uses placeholders for numeric and string variables. Out$is the string variable that is to hold the generated string. Fmt$ is thestring that specifies the pattern. Var1, var2, etc. are string and numericvariables. They must appear in the same order as the format specifiersin the format string. If more format specifiers are used than variables,the unmatched format specifiers are ignored and converted as plaintext.You may purposely display a format specifier verbatim by preceding itwith a % mark – ex. %%10d will be converted to "%10d" in the outputstring.If you are familiar with the sprintf() function of C, you shouldimmediately grasp how to use this command.Format specifiers:%[-][n]s formats a string variable.If the optional length specifier n is present, the resulting field willcontain at least n characters. If the string variable is shorter than ncharacters, the string will be right-justified, and the remainingcharacters will be padded with spaces to the left of the string. If thestring is longer than n characters, the entire string will be included, andno padding will occur. If the optional minus sign is present along withthe length specifier n, the field will be left-justified with added spaceson the right instead of on the left.%[-][0][n]d formats an integer variable.If the optional length specifier n is present, the resulting field willcontain at least n decimal digits. If the integer is shorter than n digits,the number will be right-justified and any remaining digits will be filledin with spaces to the left of the number. If the optional 0 is present, theremaining digits will be filled in with leading zeros instead of spaces. Ifthe optional minus sign is present, the number will be left-justified (andthe optional 0 will be ignored if present).%[-][0][n]u formats an unsigned integer variable. (Negativeintegers will be converted to their twos-complement form andpresented as positive integers)If the optional length specifier n is present, the resulting field willcontain at least n decimal digits. If the integer is shorter than n digits,the number will be right justified, and any remaining digits will be filledin with spaces to the left of the number. If the optional 0 is present, theremaining digits will be filled in with leading zeros instead of spaces. Ifthe optional minus sign is present, the number will be left-justified, andany remaining digits will be padded with spaces on the right instead ofon the left.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 48 von 743%[-][0][n]o formats an integer variable into octal form.If the optional length specifier n is present, the resulting field willcontain at least n octal digits. If the integer is shorter than n digits, theremaining digits will be filled in with spaces to the left of the number. Ifthe optional 0 is present, the remaining digits will be filled in withleading zeros instead of spaces. If the optional minus sign is present,the number will be padded with spaces on the right instead of on theleft.%[-][0][n]x formats an integer variable into hexadecimal form.If the optional length specifier n is present, the resulting field willcontain at least n hexadecimal digits. If the integer is shorter than ndigits, the remaining digits will be filled in with spaces to the left of thenumber. If the optional 0 is present, the remaining digits will be filled inwith leading zeros instead of spaces. If the optional minus sign ispresent, the number will be padded with spaces on the right instead ofon the left.%[-][x.y]f formats a floating-point variable.The default format displays six digits after the decimal character. If theoptional width x.y is specified, the number will be formatted with ydigits after the decimal point and a width of at least x digits (includingthe decimal character). If the optional minus sign is included, thenumber will be padded to the left. Regardless of the width specifier x,the complete integer portion of the number will always be displayed. Ifthe fractional width specifier y is absent, the default number offractional digits is 6.See Also: PARSECOMPATIBILITY:All versionsEXAMPLES:fmt$ = "This is an integer: %d"Format out$, fmt$, 12Message out$' out$ = "This is an integer: 12"fmt$ = "float 2.5: (%2.5f) float 10.2: (%10.2f) " + Chr$(13) + _"decimal left-justified 10 wide (%-10d) " + Chr$(13) + _"decimal right-zero-padded 10 wide (%010d) " + Chr$(13) + _"unused (%10d) (no variable)"x1 = 12345.1234567y1 = 1234567Format out$, fmt$, x1, x1, y1, y1Message out$' out$ = "float 2.5 (12345.12345) float 10.2 ( 12345.12)' decimal left-justified 10 wide (12 )' decimal right-zero-padded 10 wide (0001234567)'unused (%10d) (no variable)"' Note that the first floating point number is wider than two' digits, but that exactly five decimal digits are still shown.' Get three points from the user then display their valuesDim X(3), Y(3), Z(3)Get3:SetPoint "Set three points: ", 3


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 49 von 743If Sys(1) < 3 Then Goto Get3For i = 1 to 3PointVal X(i), Y(i), Z(i), iNext ixyz$ = "Point %d:" + Chr$(13) + "x: %-20.5f" + Chr$(13) + _"y: %-20.5f" + Chr$(13) + "z: %-20.5f"For i = 1 To 3Format point$, xyz$, i, x(i), y(i), z(i)Message point$Next i


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 50 von 743GET StatementPURPOSE:SYNTAX:EXPLANATION:To read a record from a random access file.GET file, recordnumber, stringvarThis statement is used to read a record from a random access file. Therecord length is specified in the OPEN statement.See Also: PUT, INPUT #, OPEN, CLOSEWhen the GET statement is executed, the designated record(recordnumber) of the file will be read into the string variable(stringvar). The MKS$ and the CVS functions can be used to convertnumeric values to and from eight-byte strings for file input and output.COMPATIBILITY:All versionsEXAMPLE:Open "r," 1, "test.dat," 80For j = 1 To 10Input "Enter record number: ", recnoGet 1, recno, a$ ' get record recnoPrint right$(a$, 20) ' print the last 20 bytesNext j


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 51 von 743GETATTR StatementPURPOSE:SYNTAX:EXPLANATION:To get entity type, group status, and layer of an entity.GETATTR entity, type {,select, laynum, group, red, green, blue, solid}This statement is used to get the entity type, group status, and layer ofan entity. Entity is the entity number – one for the first entity in thedrawing, two for the second, etc. Type is the entity type: Possiblevalues are:1 = Line2 = Ellipse3 = 3D Text4 = Curve7 = Elliptical Arc11 = Bezier Curve (4-point)12 = Bezier Curve (Continuous)13 = 2D Text15 = Attribute16 = Circle, Circular Arc17 = Hatch22 = Text Arc24 = Arrow26 = Symbol31 = Plane32 = Grid Header33 = Grid Line34 = Group68 = Construction Line70 = Point Mark71 = Attribute Definition74 = Dimension, Angle75 = Dimension76 = Dimension, Diameter/Radius77 = Dimension, Arc78 = Dimension, Radius Progressive79 = Dimension, Progressive80 = Dimension, Chamfer81 = Dimension, Coordinate90 = Bitmap Image92 = Double Line93 = Double Curve94 = Double Bezier95 = Double Circle/Arc96 = Double Elliptical Arc97 = Double Ellipse119 = Multiline TextSelect is zero if the entity is not selected, or one if the entity is currentlyselected. Laynum is the layer number of the entity. Group is the groupID number if the entity is part of a Group, or zero otherwise. Red,green, and blue are the color components of the entity's color. Solid isthe solid ID of the entity; it is zero if the entity is not part of a solid.Type, select, laynum, group, red, green, blue, and solid must be


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 52 von 743variables, not expressions, since they will be assigned values.Do NOT use "entity" or "layer" as variable names! Both arereserved words.Note that symbols and blocks indicate the same entity type (26). Todetermine a symbol's entity type more explicitly, you must access thesymbol entity's data using the Entity statement, and then check thevalue of Sys(296).See Also: PUTATTR, ENTITYCOMPATIBILITY:All versionsEXAMPLE:' Gets the total length of all lines in the drawing.' We can't use length as a variable name because' it's a reserved word, so we use leng. We use the' Length() function to determine the length of each line' entity.leng = 0For j = 1 To Sys(9) ' Sys(9) is the number of entitiesGetattr j, typeIf type = 1 Then leng = leng + Length(j)Next jMessage "The length is ", leng


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 53 von 743GETLAYERPROPS StatementPURPOSE:SYNTAX:EXPLANATION:To get a layer's default color and linestyle settings, if any.GETLAYERPROPS layerindexThis statement is used to determine the default settings for a layer.The layer's settings are loaded into Sys() functions 530-542:530 - Layer uses specific color? (0 = no, 1 = yes)531 - Layer red (default 0)532 - Layer green (default 0)533 - Layer blue (default 0)534 - Layer uses specific linestyle? (0 = no, 1 = yes)Note: this is the same as observing the status of the "Assign Linestyle"checkbox in Layer Options – If "checked", the complete linestyle (type,scale, width, filled) is applied to the layer, as indicated by the Sys()function values below.535 - Linetype (default 0)536 - Linescale (default 2)537 - Linewidth in drawing units (default 0)538 - Layer uses fixed linewidth? (0 = no, 1 = yes)if 0, uses the width specified by Sys(537);if 1, uses the linewidth specified by Sys(539)539 - Fixed linewidth in hundredths of mm (ex. 50 = .5 mm). If the widthspecified does not match one of the preset values, the actualwidth will change to the next lowest preset width value (0.00,0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 wouldrevert to 9, for 0.09mm.540 - Layer uses filled lines? (0=no, 1 = yes)541 - Force layer color on all new entities? (0=no, 1 = yes)542 - Force layer linestyle on all new entities? (0=no, 1 = yes)LayerIndex is the layer number of the layer whose properties are beingloaded.See Also: SETLAYERPROPS, UPDATELAYERCOMPATIBILITY:Version 14 and laterEXAMPLE:GetLayerProps 2Window 12, 50Print "Sys(530) -- use color?: ", sys(530)Print "Sys(531) -- red: ", sys(531)Print "Sys(532) -- green: ", sys(532)Print "Sys(533) -- blue: ", sys(533)Print "Sys(534) -- use linestyle?: ", sys(534)Print "Sys(535) -- linetype:", sys(535)Print "Sys(536) -- linescale:", sys(536)Print "Sys(537) -- linewidth: ", sys(537)Print "Sys(538) -- use fixed width?: ", sys(538)Print "Sys(539) -- fixed width: ", sys(539)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 54 von 743Print "Sys(540) -- filled lines?: ", sys(540)Print "Sys(541) -- force layer color?: ", sys(541)Print "Sys(542) -- force layer linestyle?: ", sys(542)AnykeyWClose


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 55 von 743GETSELECT StatementPURPOSE:SYNTAX:EXPLANATION:To get the entity number of one of the currently selected entities.GETSELECT expression, variableThis statement can be used to retrieve entity numbers of selecteditems so these items can be investigated with the ENTITY statement, ifdesired. Information about the entities can also be retrieved withGETATTR and changed with PUTATTR. "Expression" is a number,variable, or mathematical expression evaluating to an integer whichdetermines which of the selected entities you want the entity numberfor; "variable" is the name of the variable you want to store the entitynumber in.See Also: ENTITY, GETATTR, PUTATTRGETSELECT will ignore any selection status changes made by thePUTATTR statement. Entities must have been selected by theDesignCAD Select command, either earlier in the macro or before youran the macro.COMPATIBILITY:Version 9 (DesignCAD 97) and laterEXAMPLE:' This example assumes you have already selected' several items before running the macroDim ent(10) 'Create an array for ten entity numbers' Make sure no more than ten items get processedmaxsel= Sys(80)If maxsel > 10 Then maxsel = 10Window 10, 40For j = 1 To maxselGetselect j, ent(j) 'get info for selected itemsPrint "Picked item ",j, " is entity ", ent(j)Next j 'go to the next itemAnykey


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 56 von 743GETXY StatementPURPOSE:SYNTAX:EXPLANATION:To get the X, Y, Z coordinates of the current cursor positionGETXY variable, variable, variableThis statement can be used to assign the X, Y, Z coordinates of thecurrent cursor position to three variables. It is frequently used toprovide a reference location for the rest of the macro.Note: This statement was previously documented without commas separating thevariables. It often works either way, but we recommend using the commas forconsistency with other statements. In some cases, the commas may be requiredfor proper operation.COMPATIBILITY:All versionsEXAMPLE:Getxy x1, y1, z1>Line{For j = 0 To 360 Step 45x = x1 + Cos(j) * 10y = y1 - Sin(j) * 10


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 58 von 743GOTO StatementPURPOSE:SYNTAX:EXPLANATION:To branch to another statement.GOTO labelThis statement is used to transfer macro execution to anotherstatement out of the normal sequence of execution. "Label" can be anyvalid DesignCAD macro label. GOTO can skip forward or backward inthe macro.See Also: GOSUBCOMPATIBILITY:All versionsEXAMPLE:retry:Input "enter a number less than 20: ", xIf x >= 20 Then Goto retry ' loops until x < 20


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 59 von 743IF Statement (single line)PURPOSE:SYNTAX:EXPLANATION:To execute a single macro statement under certain conditions.IF logexpression THEN statement"Logexpression" is a logical expression that can be answered True orFalse. "Statement" is any valid macro language statement. Iflogexpression is true, then statement is executed; otherwise, it is not.The logical expression consists of one or more relational expressionsseparated by AND or OR. A logical expression can also be precededby NOT.A relational expression consists of two numeric or string expressionsseparated by one of the following relational operators: ,.COMPATIBILITY:All versionsEXAMPLES:If Eof(1) 0 Then Endretry:Input "Enter a number less than 20: ", xIf x >= 20 Then Goto retryIf a$ = "y" Then Goto affirmIf y < 5 Or z > 2 Then x = x + 1


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 60 von 743IF Statement (Group IF)PURPOSE:SYNTAX:EXPLANATION:To execute a set of macro statements under certain conditions.IF logexpression THENstatements..{ ELSEstatements.. }END IF"Logexpression" is a logical expression that can be answered True orFalse. If the expression is true, then the first set of statements(between IF and ELSE) is executed, otherwise the statementsbetween ELSE and END IF are executed. The ELSE section isoptional, but the END IF is required.The logical expression consists of one or more relational expressionsseparated by AND or OR. A logical expression can also be precededby NOT.A relational expression consists of two numeric or string expressionsseparated by one of the following relational operators: ,.With the Group IF statement, the IF statement line must end with theword "THEN" (except for comments). In contrast, the single-statementIF must have the conditionally executed statement following the word"THEN" on the same line.COMPATIBILITY:All versionsEXAMPLES:If Eof(1) 0 ThenPrint "end-of-file was encountered."End ' stop the macroEnd IfIf j > 90 ThenPrint "j is too large: ", jElsex = sin(j) * ly = y + 1End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 61 von 743INCLUDE StatementPURPOSE:SYNTAX:EXPLANATION:To incorporate variables and/or subroutines from other files into thecurrent macro.INCLUDE filenameThe INCLUDE statement can be used to load variables, subroutines,or aliases stored in external files into the current macro.See Also: GOSUB, ALIASYou can add an INCLUDE statement anywhere, but it's location doesmatter; please consider the points below:DesignCAD macros are read in a top-down fashion, and all names areglobal after they have been first assigned or used. The effect of anINCLUDE statement is the same as if you had manually copied the textof the included file into your current macro at the point where theINCLUDE statement is located.INCLUDE files that contain aliases or global variable definitions shouldbe included before they are used by your code; we recommend placingthem at the beginning of your macro. For example, if you have a filethat defines physical and numeric constants such as Pi, the GoldenMean, and the speed of light, you should include that file at thebeginning of your macro.INCLUDE files containing subroutines should be placed after the ENDstatement for your main routine. Again, recall that macros are readtop-down. Your main program code should be at the beginning of themacro. Subroutines, whether added manually or using Include, shouldgo after your main program's END statement.You may INCLUDE files that have any valid Windows filename;however, we recommend using a .d3i extension.COMPATIBILITY:Version 13 and laterEXAMPLES:' This example assumes the existence of two files:' Constants.d3i and Subs.d3i.' Constants.d3i defines a variable phi,' and Subs.d3i defines a subroutine phi_sub.Include "*\constants.d3i"'' The variable phi is now initialized.For i = 2 To 16 Step 2Print "Phi / ", i, " ", phi/iGosub phi_funcNext iEnd'Include "*\subs.d3i"' The subroutine phi_sub is now available,


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 62 von 743' just as if it had been added directly to the' bottom of this macro


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 63 von 743INPUT StatementPURPOSE:SYNTAX:To read a value from the keyboard and assign it to a variable.INPUT "promptstring", variable listINPUT [prompt$], variable listINPUT variable listEXPLANATION:The INPUT statement is used to ask the user for input and assign theentered value to a variable. "PromptString" is an optional message tobe displayed for the user. It can be a quoted string, like "Enter x andy", or it can be a string variable enclosed in square brackets, like[prompt$].Note: The ability to use a string variable for the prompt wasintroduced in DesignCAD 13, and is not backward compatiblewith older versions."Variable list" is one or more variables, separated by commas, towhich the input values are to be assigned. If the user is required toenter multiple values, he can separate the entries with spaces orcommas.If a single string variable is used in the variable list, the entire stringinput from the keyboard is assigned to the variable.If numeric variables are used, the numbers input from the keyboardare assigned to the corresponding variables.If more than one variable is used with the INPUT statement, anystrings input by the user should be enclosed in quotes ("") - otherwise,any spaces or commas in the string will be misinterpreted asseparators between input variables.Values read with the INPUT statement can be any valid DesignCADmacro language expressions – they do not have to be simple numbers.For example, the user can enter SQRT(2) or 45/2 when a number isrequested. However, if the expression contains any spaces, the usershould enclose the entire statement in parentheses, suchas(SQRT(2) - 1 + COS(45)).By default, the INPUT window is centered on the screen. However, thewindow's upper left corner can be moved by setting system variablefunctions Sys(130) and Sys(131). The INPUT window's captioncan be changed by setting system string variable function Sys$(41).Setting Sys$(41) to an empty string "" creates an INPUT window withno title bar at all.See Also: INPUT #COMPATIBILITY:All versionsEXAMPLES:


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 64 von 743Input "Enter the initial value: ", initprompt$ = "Enter x and y, separated by commas: "Input [prompt$], x, yMessage "You entered ", x, " for x and ", y, _" for y"Input "Enter the input file name: ", file$Open "i", 1, file$Input "Enter the coordinates: ", x, y, z


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 65 von 743INPUT # StatementPURPOSE:SYNTAX:EXPLANATION:To read a line from a disk file and assign it to a variable.INPUT # file, variablelistThis statement is used to read a line from a disk file and assign it to anumeric variable or to a string variable. The INPUT # statement readsan entire line from the disk file. File is the file number that was used inthe OPEN statement. Variablelist is a set of one or more variablesseparated by commas. The variables can be string or numericvariables.See Also: INPUT, OPEN, CLOSEWhen this statement is executed, a line from the file is read and avalue is assigned to each variable. If the line from the file has fewervalues than there are variables, the leftover variables are not modified.String values in the file should be enclosed in quotes if there aremultiple values on a line. If an entire line from the file is to be read intoa single string variable, use a single string variable with the INPUT #statement.Values read can be any valid macro language expressions – they donot have to be simple constants.The file must have been opened using the OPEN statement before theINPUT # statement is executed. The macro function EOF(filenumber)can be used to determine whether the end-of-file has been reached.COMPATIBILITY:All versionsEXAMPLES:For j = 1 To 20Input #1, jx(j), jy(j)NextInput #1, name$Open "i", 2, "testfile"Do While Eof(1) = 0Input #2, a$Print a$Loop


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 66 von 743LABELSPURPOSE:SYNTAX:EXPLANATION:To provide a reference to locations in the macro for GOTO, GOSUB,ON ERROR, or RESUME statements.label:"Label" can be up to twenty characters long, may consist of letters andnumbers, and must begin with a letter. A macro language statementcan optionally follow a label on a line.See Also: GOSUB, GOTO, ON ERROR, RESUMECOMPATIBILITY:All versionsEXAMPLE:retry: ' this is a labelInput "Enter a number less than 20: ", xIf x >= 20 Then Goto retry


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 67 von 743LAYER StatementPURPOSE:SYNTAX:EXPLANATION:To turn drawing layers on or off, and to set the current layer.LAYER(expression1) = expression2The LAYER statement can be used to set a layer to be visible/invisibleor editable/uneditable. It can also be used to set the current layer. Thefollowing values can be used with the LAYER statement:0 – Invisible and not editable2 – Visible but not editable6 – Visible and editable14 – Set as current layer (the current layer is always visible and editable)"Expression1" is (or evaluates to) the layer number, and "expression2"must evaluate to one of the above values. The LAYER function can beused to get the current status of a layer. See the macro languagesystem function descriptions in the next chapter.The REGEN statement or the DesignCAD >Regenerate commandshould be used to regenerate the drawing if the visibility of layers hasbeen changed. Otherwise, entities from invisible layers may remain onthe screen, while entities from visible layers may not appear on thescreen.If you have used PUTATTR to change the layer of an item, you mustuse the LAYER statement to reset the current layer in order for thelayer info in the coordinate bar to display correctly. You can use:Layer(Sys(3)) = 14' This updates the layer information in the' drawing.Note: Don't confuse the Layer statement, which is used to set thestatus of a layer, with the Layer function, which returns the currentstatus of a layer. The Layer function may return other values thanthose allowed by the Layer statement. Even immediately after settingthe layer's status with the Layer statement, the Layer function mayreturn a different value, depending on whether or not that layercontains any entities in it, or other factors.See Also: System FunctionsCOMPATIBILITY:All versionsEXAMPLES:Layer(1) = 14 ' set the current layer to layer 1For j = 0 To 1000 ' make all visible and editableLayer(j) = 6Next j


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 68 von 743LOCATE StatementPURPOSE:SYNTAX:EXPLANATION:To position the cursor in a text window.LOCATE row, columnThe LOCATE statement positions the cursor in the text window thatwas opened by the WINDOW statement. The next PRINT statementwill begin at the specified row and column.This statement has no effect if a text window is not open (it has noeffect on PRINT # statements either).See Also: WINDOWCOMPATIBILITY:All versions.EXAMPLE:Window 7, 40Locate 3, 9Print "centered in the window"Anykey


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 69 von 743MESSAGE StatementPURPOSE:SYNTAX:EXPLANATION:To output data to the screen.MESSAGE {list of expressions}The MESSAGE statement is used to output numeric and/or stringexpressions to the DesignCAD screen. It is similar to the PRINTstatement, except that a dialog box is opened for each messagestatement. The macro pauses until the user presses one of themessage box buttons. This command uses the Windows MessageBoxfunction.See Also: WINDOW, INPUTIf more that one line is to be output, Chr$(13) can be included in theoutput expressions to provide a carriage return.As of version 13, you can now specify what the style of message boxthe MESSAGE statement displays -- OK, Yes/No, OK/Cancel,Retry/Cancel, etc.Sys(1027) sets the MessageBox Style, while Sys(1028) holds theuser's response.COMPATIBILITY:All versionsEXAMPLES:Message j, " is the current value."Message "x: ", x, chr$(13), "y: ", y'(This puts x and y on separate lines in the same message box.)Again:Sys(1027) = 4 'Yes/No MessageBox styleMessage "Do you want to show this dialog box again?"If Sys(1028) = 6 ThenGoto Again ' If user presses yes, show it againEnd IfSys(1027) = 0 'Simple OK MessageBox styleMessage "See you later!"End


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 70 von 743ON ERROR StatementPURPOSE:SYNTAX:EXPLANATION:To set up an error handling routine.ON ERROR GOTO labelAfter the ON ERROR statement has been executed, any macrolanguage error will cause the execution to be transferred to thespecified label. <strong>Macro</strong> execution will continue from the label until aRESUME statement is encountered.This statement is used to trap errors in a macro. The Err() functioncan be used to determine the error code. See the RESUME statement.See Also: RESUMECOMPATIBILITY:All versionsEXAMPLE:On Error Goto keepgoingGet 4, 30, nothing$ ' generates an error (no file open)Print "Still going strong!" ' second line printedOn Error Goto badfileOpen "i", 1, "------" ' error due to invalid filenamePrint "No Error" ' this won't be printedfinish:Print "<strong>Macro</strong> Done"End' fourth line printedbadfile:Print "Error: ", Err(1) ' third line printedResume finish ' macro jumps to the finish labelkeepgoing:Print "Error: ", Err(1) ' first line printedResume' macro continues at the next line


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 71 von 743OPEN StatementPURPOSE:SYNTAX:To open a file for input or output for the INPUT #, PRINT #, GET, orPUT statements.OPEN "A", filenumber, filenameOPEN "I", filenumber, filenameOPEN "O", filenumber, filenameOPEN "R", filenumber, filename, recordlengthEXPLANATION: A file must be opened before it is accessed by the INPUT # or PRINT #statements. To open a file for sequential input, use the "I" parameterbefore the file name. To open a file for sequential output, use "O." (Thisis the letter "oh", not the number zero.) You can use "A" to append datato a file – this is like "O", but if the file exists, data will be output to theend of the file.See Also: INPUT #, PRINT #, GET, PUTTo open a file for random access (for GET and PUT), use "R." Ifrandom access is specified, then the record length must also bespecified. This value represents the number of bytes that will be reador written with the GET and PUT statements.LPT1 can be specified for the file name in order to output to the printer.However, LPT1 can be used only for output, with OPEN "O."The filenumber can be between one and twenty. No more than twentyfiles can be opened at one time. (The limit was four in version 12.0and earlier.) Filename can be any valid Windows file name, includingthe path.COMPATIBILITY: All versions. Note that the limit on the number of files increased from 4to 20 in version 13.EXAMPLES:Open "o", 1, "outfile"Input "Enter input file name: ", file$Open "i", 1, file$Open "r", k, file$, 80


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 72 von 743PARSE StatementPURPOSE:SYNTAX:EXPLANATION:To extract values from a specially-formatted string and store them invariables.PARSE in$, fmt$, var1 [, var2, var3, …]The PARSE statement allows the user to read data fromspecially-formatted strings into variables. This can be especially usefulfor retrieving values from a command line.in$ is the string to be parsed. It can be a string variable or anexpression. fmt$ is a string specifying the number, types, and orderingof the variables to be extracted from the input string.var1, var2, etc. are the names of the variables to be initialized from theinput string.By default, all values are assumed to be space-delimited, but theformat-specifier can explicitly define the delimiters for a specificvariable. A delimiter is required any time a string variable to beread contains, or might contain, spaces or other punctuation.Without such a delimiter, the %s format specifier stops readingafter the first empty space it encounters. Almost any character canbe used for a string delimiter – the choice of the best character willdepend on the situation.The Parse statement is not intended to parse English grammar, butrather to parse formatted data, where there is a clear distinctionbetween the data and its delimiters.Format Specifiers:%s – string%x – a hexadecimal value%o – an octal value%u – and unsigned decimal value%d – a signed decimal valuel\%f – a floating-point value%n, %e, %g – alternates for %fSample format string:fmt1$ = "%n %d ^%s^"This string implies two numbers, each separated by spaces, followedby a string enclosed in carets. The following input string would matchthe format string correctly:str1$ = "12 37 ^This is a delimited string^"whereas this string would not:str2$ = "12, 27, ^This is a delimited string^"The commas in the second string prevent it from matching the formatstring, and attempting to parse it with str1$ would result in a syntaxerror. However a slightly changed format string will correctly parse


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 73 von 743str2$:fmt2$ = "%n, %d, ^%s^"See Also: FORMATCOMPATIBILITY:Version 14 and laterEXAMPLES:Parse "24.5 12 37 ", "%f %d %n ", x, y, z, a$form$ = "x: %.2f" + Chr$(13) + "y: %4d" + Chr$(13) + "z: %f" + _Chr$(13) + "a$: %s"Format out$, form$, x, y, z, a$Message out$'Problem Example:form$ = "%s (%s) %s"s$ = "String with(delimited data)in parentheses"Parse s$, form$, front$, data$, back$Message "front$: ", front$ 'just displays "String "Message "data$: ", data$ ' displays "delimited data" as expectedMessage "back$: ", back$ ' just displays "in"end'The first and third string above only caught one word apiece because theyencountered whitespace with no other delimiters.'Another Problem Example:form$ = "%s(%s)%s"s$ = "String with(delimited data)in parentheses"Parse s$, form$, front$, data$, back$Message "front$: ", front$ 'now displays "String with" as expectedMessage "data$: ", data$ ' displays "delimited data" as expectedMessage "back$: ", back$ ' just displays "in"end'The third string above only caught the first word of "in parentheses" becauseit encountered a space, and no other delimiter was specified.'Corrected Example:form$ = "%s(%s)%s." ' Note the final period in the format string.s$ = "String with(delimited data)in parentheses."Parse s$, form$, front$, data$, back$Message "front$: ", front$ 'displays "String with" as expectedMessage "data$: ", data$ ' displays "delimited data" as expectedMessage "back$: ", back$ ' now displays "in parentheses"end'This time third string caught both words of "in parentheses" because it hada delimeter (the period) to mark the end of the string.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 74 von 743POINTVAL StatementPURPOSE:SYNTAX:To assign the coordinates of one of the points that has been set (eitherby the user in response to a SETPOINT statement, or by the ENTITYstatement) to three variables.POINTVAL xval, yval, zval, expressionEXPLANATION: xval, yval, and zval must be variables. They will be assigned the X, Y,and Z coordinates of the point that has been set in DesignCAD. The"expression" determines which point will be assigned to the variables.The number of points currently set can be determined in the systemfunction Sys(1). An error will occur if expression is greater than thenumber of points set in Sys(1).Note: This statement was previously documented without commas separating thevariables. It often works either way, but the commas are recommended forconsistency with other statements, and in some cases may be required.See Also: ENTITY, SETPOINT, SetPointsCOMPATIBILITY:All versionsEXAMPLE:' get all points into jx, jy, jzFor j = 1 To Sys(1)Pointval jx(j), jy(j), jz(j), jNext j


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 75 von 743POPPOINT StatementPURPOSE:SYNTAX:EXPLANATION:Remove a point from the point buffer.POPPOINT expressionThis statement removes the nth indexed point from the point buffer.See Also: PUSHPOINTCOMPATIBILITY:Version 14 and laterEXAMPLE:SetPoint "Input up to 10 points: ", 10If Sys(1) > 3 ThenFor i = Sys(1) To 4 Step -1PopPoint i 'remove all but first three points from bufferNext i' compare points 2 and 3. Delete point 3 if to the left of or below 2.PointVal x2, y2, z2, 2PointVal x3, y3, z3, 3If (x3 < x2) Or (y3 < y2) ThenPopPoint 3PushPoint x2+1, y2+1, z3End If>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 76 von 743PRECISION StatementPURPOSE:SYNTAX:EXPLANATION:To set the precision for PRINT statements and for numeric-to-stringconversions.PRECISION expressionThe PRECISION statement determines the number of digits to theright of the decimal point to be used in PRINT statements and innumeric-to-string conversions.See Also: PRINT, PRINT #For example, a precision of zero can be used to print or assign onlywhole numbers. A precision of four can be used to print numbers to thenearest .0001.The PRECISION statement affects only the conversion of a numericexpression to a string– it does not affect the value of a numericvariable. Also, it does not affect the numeric precision displayed inDesignCAD's coordinate bar, Info Box, or command dialogs.The precision remains the same until it is changed again by thePRECISION statement or the macro ends.Note that the PRECISION statement does not affect the way macroparameters interpret variables; see the last two examples belowinvolving the Text command.COMPATIBILITY:All versionsEXAMPLE:x = 44.123456789Precision 0Print x * 2 ' prints "88"Precision 4Print x ' prints "44.1235"Precision 0x = 2a$ = xf$ = "file" + a$ + ".dat"Print f$ ' prints "file2.dat"Precision 3x = 44.123456789x$ = x>Text{Text{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 77 von 743


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 78 von 743PRINT StatementPURPOSE:SYNTAX:EXPLANATION:To output data to the screen.PRINT {list of expressions}The PRINT statement is used to output numeric and/or stringexpressions to the DesignCAD screen. It is identical to the PRINT #statement, except the data is output to the screen rather than to disk.See Also: WINDOW, PRECISIONThe PRINT statement output is normally displayed in the DesignCADStatus Bar; thus, only one line of output can be displayed at a time,unless a text window is open. If more than one line is to be output tothe Status Bar, the PRINT statements can be separated by ANYKEYstatements. This requires the user to press a key before the next line isdisplayed.If a text window is open (see the WINDOW statement), the PRINTstatement will be displayed in the window. The LOCATE and TABstatements can be used to position the output for the window.The PRINT statement can be terminated with a semicolon (";") to leavethe cursor at the end of the line of a text window. The next PRINTstatement will begin at that location.The MESSAGE statement is similar to the PRINT statement, but theMESSAGE statement opens a dialog box for the message. The usermust press the OK button to continue after the message is displayed.COMPATIBILITY:All versionsEXAMPLES:Print j, " is the current value."Print "x: ", x, " Press any key to continue"AnykeyPrint "y: ", yWindow 5, 20Print "abcd";Print "efgh"' "abcdefgh" will be printed


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 79 von 743PRINT # StatementPURPOSE:To output data to a disk file.SYNTAX: PRINT #file, { list of expressions }EXPLANATION:The PRINT # statement is used to output numeric and/or stringexpressions to a disk file. It is identical to the PRINT statement, exceptthe data is output to disk rather than the screen. File is the file numberthat was used in the OPEN statement.The file must have been opened using the OPEN statement before thisstatement is executed. Numeric expressions are output in ASCIIformat. If no expressions are used with a PRINT # statement, a blankline is output.(The previous sentence should be true, but it is currently not workingthat way. To output a blank line, you must currently use the followingsyntax:Print #1, ""This behavior appears to have been broken for several versions now; itis currently under review.) FIXED IN 17.1A carriage return and line feed are output after each PRINT #statement - unless the statement ends with a semicolon, in which casethe next PRINT # statement will begin at the end of the previous line.The PRINT # statement can be used to output to a local parallel-portprinter by opening the file "LPT1" with the OPEN statement. (This maynot be possible for all versions of Windows, however.)See Also: OPEN, PUTCOMPATIBILITY:All versionsEXAMPLE:Open "o", 1, "fileone.txt"Open "o", 2, "filetwo.txt"Print #1, j, " is the current value."Print #2, "x = ", xj = 2Print #j, x, y, zPrint #1,Print #1, "abcd"; 'note the ending semicolonPrint #1, "efgh"' "abcdefgh" will be printed to the file


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 80 von 743PUSHPOINT StatementPURPOSE:SYNTAX:EXPLANATION:Appends a new point to the point buffer.PUSHPOINT x, y, zThis statement appends a new point to the end of the point buffer. Thecoordinate of the point is specified by the expressions x, y, and z.Points added to the buffer with PUSHPOINT cannot be deleted by theuser via the Esc key. They can only be removed by setting Sys(1) tozero, or by using the POPPOINT statement.See Also: POPPOINTCOMPATIBILITY:Version 4 and laterEXAMPLE:' Draw a sequence of line segments end-to-end.Dim X(2)Dim Y(2)Dim Z(2)Sys(81) = 1 ' Force SETPOINT to append points to the point buffer' If Sys(80) = 0, SETPOINT clears existing pointsSys(41) = 1 ' Set "line" rubberband stylePUSHPOINT 10, 10, 0 ' Preset the starting point;' Pressing Esc won't clear this pointGetTwo:SETPOINT "Set one more point for the line....", 1' note the 1 above -- that means SetPoint is expecting no more than' 1 new point from the userIf Sys(1) < 2 Then End' The user can press Esc or Enter to skip setting a point.' If no extra point was set, we end the macro.' Now we've got exactly two pointsFor i = 1 To Sys(1)Pointval X(i), Y(i), Z(i), iNext in = Sys(1)>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 81 von 743PUT StatementPURPOSE:SYNTAX:EXPLANATION:To output a record to a random access file.PUT file, recordnumber, stringexpressionThis statement is used to output a record to a random access file. Therecord length is specified in the OPEN statement.When the PUT statement is executed, the string (stringexpression) willbe written to the file at the designated record (recordnumber).If the string to be output is less than the record length, it will be paddedwith undefined characters. If the string is longer than the record length,it will be truncated.The MKS$ and the CVS functions can be used to convert numericvalues to and from eight-byte strings for file input and output.See Also: OPEN, GET, MKS$, CVS, PRINT #COMPATIBILITY:All versionsEXAMPLE:Open "r", 1, "test.dat", 80' read a name and address into the first and second 40 bytes of an 80 byterecord' then output it to record number threeInput "Enter the name: ", name$Input "Enter the address: ", address$i = 40 - Len(name$)a$ = name$ + String$(i, " "), address$Put 1, 3, a$ ' output to record three


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 82 von 743PUTATTR StatementPURPOSE:SYNTAX:EXPLANATION:To set the entity type, group status, and layer of an entity.PUTATTR entity, type, {,select, laynum, group, red, green, blue, solid}This statement is used to set the entity type, status, layer, or group ofan entity. Entity is the entity number – one for the first entity in thedrawing, two for the second, etc. The specified entity will be assignedthe specified attributes.Type is the entity type. Possible values are:1 = Line2 = Ellipse3 = 3D Text4 = Curve5 = Elliptical Arc11 = Bezier Curve (4-point)12 = Bezier Curve (Continuous)13 = 2D Text15 = Attribute16 = Circle, Circular Arc17 = Hatch22 = Text Arc24 = Arrow26 = Symbol31 = Plane32 = Grid Header33 = Grid Line34 = Group68 = Construction Line70 = Point Mark71 = Attribute Definition74 = Dimension, Angle75 = Dimension76 = Dimension, Diameter/Radius77 = Dimension, Arc78 = Dimension, Radius Progressive79 = Dimension, Progressive80 = Dimension, Chamfer81 = Dimension, Coordinate90 = Bitmap Image92 = Double Line93 = Double Curve94 = Double Bezier95 = Double Circle/Arc96 = Double Elliptical Arc97 = Double Ellipse119 = Multiline TextSelect is zero if the entity is not to be selected, and one if the entity is tobe selected. Laynum is the layer number to be assigned to the entity.Group is the group ID number if the entity is to become part of thatGroup, or zero if it is not to be part of a Group. Red, green, and bluedefine the color for the entity. Solid is the solid ID of the entity; it is zeroif the entity is not part of a solid.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 83 von 743See Also: ENTITY, GETATTRDo NOT use "entity" or "layer" as variable names! Both arereserved words.COMPATIBILITY:All versionsEXAMPLE:' Change all entities in layer 6 to layer 12.For j = 1 To Sys(9) ' Sys(9) is the number of entities in the drawingGetattr j, type, select, laynum, group, red, green, blueIf laynum = 6 Then laynum = 12Putattr j, type, select, laynum, group, red, green, blueNext j


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 84 von 743QUERY StatementPURPOSE:SYNTAX:EXPLANATION:To get a specific bit of information from an entity that has been loadedwith the Entity statement.QUERY parameter, variable [,variable, variable,…]This statement is used to a specific bit of information about a loadedentity. Some examples of parameters that can be queried are:ENT_TYPE – obtains the entity typeENT_COLOR – obtains the entity's RGB color valuesENT_NHANDLES – obtains the number of preset handles on theentity.ENT_NPOINTS – obtains the number of points in the entityENT_POINT – obtains the XYZ values of a given point in the entity.CA_RADIUS – the radius of the entity, if a circle or arcCA_CENTER – the center of the entity, if a circle or arc.T_FONTTYPE – the type of font, if the entity contains a text stringT_FONT – the font of the text, if a text entity.T_TEXT – the entity's text string, if a text entity.Available parameters and corresponding values are listed inDCADALIAS.d3i, and described in QUERY and CHANGEParametersSee Also: CHANGE, GETATTR, PUTATTR, ENTITYCOMPATIBILITY:Version 14 and laterEXAMPLE:Include "DcadAlias.d3i"Entity 1Change ENT_COLOR, 255, 0, 0Change CA_CENTER, 10, 10, 0Change CA_RADIUS, 10Change CA_STARTANGLE, 0Change CA_SPANANGLE, 180Change ENT_NHANDLES, 2Query ENT_POINT, 1, X1, Y1, Z1Change ENT_HANDLE, 1, 0, 0, 0Query ENT_POINT, 2, X2, Y2, Z2X = X2 - X1Y = Y2 - Y1Z = Z2 - Z1Change ENT_HANDLE, 2, X, Y, ZUpdate>RegenerateAll{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 85 von 743REGEN StatementPURPOSE:SYNTAX:EXPLANATION:COMPATIBILITY:To redraw the currently active view.REGENSome activities, when performed from a BasicCAD program, may notregenerate the screen immediately afterwards. The REGEN statementforces DesignCAD to redraw the drawing onto the screen. TheREGEN statement may be necessary, for example, after changinglayers, or after changing the background color.All versionsEXAMPLE:' change the background color to blackSys(321) = 0Sys(322) = 0Sys(323) = 0' change the current drawing color to light redSys(300) = 255Sys(301) = 64Sys(302) = 64REGEN' now you have a black background, and all' items will be drawn in light red


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 86 von 743RESUME StatementPURPOSE:SYNTAX:EXPLANATION:To resume macro execution after an ON ERROR unit.RESUME {label}The RESUME statement is used to continue macro execution after anON ERROR unit has been activated by a macro language error.Label can be used to specify the location at which macro execution willresume. If the label is omitted, the macro execution will resume at thestatement following the one that caused the error.See Also: ON ERRORCOMPATIBILITY:All versionsEXAMPLE:On Error Goto handlerOpen "i", 1, "------"Print "No error"cont:Print "<strong>Macro</strong> done"End' invalid file name' this won't be printed' second line printedhandler:Print "Error: ", err(1) ' first line printedResume cont


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 87 von 743RUN StatementPURPOSE:SYNTAX:EXPLANATION:To transfer control to another macro or to a DOS or Windows program.RUN programname$ {, Status}The Run statement can be used to run another DesignCAD macro oran external program from within your macro. The following statusvalues can be used with the RUN statement:0 – resume the macro immediately (default)1 – halt the macro until the focus returns to DesignCAD (This willoccur even if the other program is still running! All it takes is aclick on the DesignCAD window, or an Alt+Tab to switch focus toDesignCAD.)2 – halt the macro until the OLE Automation program issues aResumeBasicCAD command. This option should only be usedwhen specifying a DesignCAD-based OLE Automation programin the RUN statement.Running another DesignCAD macro with the RUN statementWhen this statement is used to run another DesignCAD macro, all thevariables from the current macro are cleared when the other macro isexecuted. A string variable or constant can be used for the macroname.The RUN statement causes the new macro (programname$) toreplace the current macro in memory. To return to the original macro,you must execute another RUN or CHAIN statement from the newmacro. The execution of a macro called by the RUN statement alwaysbegins at the first line in the called macro.You should always specify the extension in the filename of the macroto be run. To use an encrypted BasicCAD program, specify theextension .BSX. (DesignCAD includes a utility program Encrypt.exe,which allows you to encrypt your macros so that others can use them,but can't read your code.)The CHAIN statement is similar to the RUN statement, but the CHAINstatement leaves all variables intact when the new macro is executed.In other words, if x has the value of 10.125 in macro1.d3m, x is still10.125 at the start of macro2.d3m if you CHAIN from macro1 tomacro2.Running an EXE program with the RUN statementTo run an external program from within a macro, just specify theprogram name with the RUN statement. For example:run "notepad.exe c:\test.dat", 1This command will run the notepad editor and automatically load thefile TEST.DAT if it exists. The macro will continue as soon as the focus


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 88 von 743See also: CHAIN, CALL, CMDLINEis returned to DesignCAD (whether or not notepad is closed).With the RUN statement, you can run both DOS and Windowsapplications.Running a BAT file with the RUN statementTo run a DOS batch file from within a macro, you must runCOMMAND.COM to interpret the batch file. It is usually best to use the/C command-line switch for command.com, which forces the DOSwindow to close when the batch file is done. For example:run "command.com /c myscript.bat"or, for Windows NT/2000/XP:run "cmd.exe /c myscript.bat"Using the new CmdLine statement to pass command lineparameters to a macro or programYou may also pass commandline parameters through theCommandline statement. Repeating the above example for WindowsNT/2000/XP:Cmdline "/c myscript.bat"' Now open a command prompt and run the above commandsRun "cmd.exe"COMPATIBILITY:All versionsEXAMPLE:Run pgmname$Run "test1"Run "edit.com myfile.bsc", 1Message "Finished Editing"Run "*\MyOleProgram.exe", 2' won't resume until the OLE program' executes the ResumeBasicCAD methodMessage "Back in the macro again"CmdLine "1, 10, 0" ' set the commandline for the run statementRun "LineFromHere.d3m"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 89 von 743SETLAYERPROPS StatementPURPOSE:SYNTAX:EXPLANATION:To set a layer's default color and linestyle settings from preset values.SETLAYERPROPS layerindexThis statement is used to override the default settings for a layer. Thelayer's settings are loaded from Sys() functions 530-542:530 - Layer uses specific color? (0 = no, 1 = yes)531 - Layer red (default 0)532 - Layer green (default 0)533 - Layer blue (default 0)534 - Layer uses specific linestyle? (0 = no, 1 = yes)535 - Linetype (default 0)536 - Linescale (default 2)537 - Linewidth in drawing units (default 0)538 - Layer uses fixed linewidth? (0 = no, 1 = yes)if 0, uses the width specified by Sys(537);if 1, uses the linewidth specified by Sys(539)539 - Fixed linewidth in hundredths of mm (ex. 50 = .5 mm). If the widthspecified does not match one of the preset values, the actualwidth will change to the next lowest preset width value (0.00,0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 wouldrevert to 9, for 0.09mm.540 - Layer uses filled lines? (0=no, 1 = yes)541 - Force layer color on all new entities? (0=no, 1 = yes)542 - Force layer linestyle on all new entities? (0=no, 1 = yes)LayerIndex is the layer number of the layer whose properties are beingloaded.To use this statement, set the desired layer properties by modifying thevalues in Sys(530-542), then run the SetLayerProps statement.Note that changing a layer's settings won't automatically update allentities that are already on that layer. To do that, you must also run theUpdateLayer statement after running SetLayerProps.See Also: GETLAYERPROPS, UPDATELAYERCOMPATIBILITY:Version 14 and laterEXAMPLE:Sys(530)= 1Sys(531) = 0Sys(532) = 128Sys(533) = 0Sys(534) = 1Sys(535) = 4Sys(536) = 1.5Sys(537) = 0Sys(538) = 1Sys(539) = 20Sys(540) = 1Sys(541) = 1SetLayerProps 2Window 12, 50


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 90 von 743UpdateLayer 2


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 91 von 743SETPOINT StatementPURPOSE:SYNTAX:EXPLANATION:To prompt the user to set a number of points.SETPOINT string, expressionThis statement displays the message in "string," and allows the user toset a number of points. "Expression" is the maximum number of pointsto be set. The user can press ENTER or ESC before all the points areset. The system function Sys(1) is the current number of points set –it can be checked to determine if enough points were set.Note: This statement was previously documented without commas separating thevariables. It often works either way, but the commas are recommended forconsistency with other statements, and in some cases may be required.See Also: POINTVAL SetPoints CommandCOMPATIBILITY:All versionsEXAMPLE:retry:Setpoint "Set 2 to 4 points.", 4If Sys(1) < 2 Then Goto retry


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 92 von 743SETSELECTEDPOINTS StatementPURPOSE:SYNTAX:EXPLANATION:To set highlighted points in PointSelect Mode into a point buffer forretrieval by POINTVAL.SETSELECTEDPOINTSThis statement stores the locations of all highlighted points inPointSelect Mode (points may be highlighted by selecting an object inPointSelect Mode, then dragging a selection box around one or moreof the points in the selected object. The selected points turn solid blue.)The system function Sys(1) is the current number of points set – itcan be checked to determine if any points were highlighted.See Also: POINTVALCOMPATIBILITY:Version 13 and laterEXAMPLE:retry:Message "Select an object on the screen"Setpoint "Set a point on an object... ", 1Pointval x y z 1>PointSelect{PointSelectMode{}End IfMessage "Now select some points on the object"retry2:Sys(41) = 2 'rubberband box for user pointsSetpoint "Set two points for a selection box", 2If Sys(1) < 2 Then Goto retry2>DragSelect{Pointval x y z 1 ' get the first point the user setGroupPointsMove{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 95 von 743UPDATE StatementPURPOSE:SYNTAX:EXPLANATION:To update the bounding box of an entity that has been changed usingthe CHANGE statement.UPDATEThis statement forces DesignCAD to recalculate the bounding box ofan entity that has been modified using the CHANGE statement.See Also: CHANGECOMPATIBILITY:Version 14 and laterEXAMPLE:Entity 1Change ENT_POINT, 1, 0, 0, 0UpdateRegenerateAll{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 96 von 743UPDATELAYER StatementPURPOSE:SYNTAX:EXPLANATION:To update all entities in a layer to match the layer's settings.UPDATELAYER [laynum]This statement forces DesignCAD to all entities in a layer to match thelayer's settings. If laynum is not specified, all entities in the drawing areupdated to match their host layer.See Also: SETLAYERPROPS, GETLAYERPROPSCOMPATIBILITY:Version 14 and laterEXAMPLE:Entity 1Change ENT_POINT, 1, 0, 0, 0UpdateRegenerateAll{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 97 von 743WCLOSE StatementPURPOSE:SYNTAX:EXPLANATION:To close the text windowWCLOSEThis statement closes the text window. The drawing behind the textwindow will return.A text window that is opened by the WINDOW statement remains onthe screen until it is closed or until the macro terminates.See Also: WINDOWCOMPATIBILITY:All versionsEXAMPLE:Window 5, 20 ' open a window 5 x 20 chars.Locate 3, 10Print "This is a test"AnykeyWclose' close the text window


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 98 von 743WINDOW StatementPURPOSE:SYNTAX:EXPLANATION:To open a text window to display the output from PRINT statements.WINDOW nrows, ncolsThis statement opens a text window or dialog box on the screen.Nrows and ncols are the number of rows and columns for the textwindow – they determine the window size.By default, the window is centered on the screen. However, thelocation of the window's upper left corner can be controlled by usingsystem variable functions Sys(132) and Sys(133). The window'scaption can be changed by modifying system string functionSys$(42). A captionless window (no title bar) may be created byassigning an empty string "" to Sys$(42). Once these sys functionsare set, they remain in effect for all subsequent windows until they arereset or until the macro ends.As long as the text window is open, all PRINT statements aredisplayed in the window. The text window remains open until aWCLOSE statement is executed or until the macro terminates.The CLS, LOCATE, and TAB statements can be used to clear thescreen and position the cursor in the text window. The COLORstatement can be used to set the text color inside the window.Only one text window can be opened at a time.See Also: WCLOSE, CLS, TAB, LOCATE, PRINTCOMPATIBILITY:All versionsEXAMPLE:Window 5, 20 ' open a window 5 x 20 chars.Locate 3, 10Print "This is a test"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 99 von 743Chapter 2: <strong>Macro</strong> <strong>Language</strong> - Functions<strong>Macro</strong> language functions can be used in numeric expressions. The functions all have a singlenumeric argument, which can be any numeric expression. For example, ABS(J * 2) would beequal to the absolute value of J * 2.The following functions are supported:Numerical FunctionsSystem FunctionsString FunctionsTwo other functions that are supported are:SYS(x) - System Variable FunctionThis function returns the value of a DesignCAD System Variable. The variable returned isdetermined by the value of the argument. See the SYS function.SYS$(x) - System String Variable FunctionThis function returns the value of a DesignCAD System StringVariable. The variable returnedis determined by the value of the argument. See the SYS$ function.<strong>Macro</strong> Error Codes<strong>Macro</strong> <strong>Language</strong> Key Words<strong>Macro</strong> Limitations


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 100 von 743Numerical FunctionsABS(x) - Absolute value of x. – always returns a positive number.ACOS(x) - Arc cosine of x (result is in degrees). [-1


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 101 von 743System FunctionsAREA(x)EOF(x)ERR(x)EXIST(a$)- Area of the entity x. If x is a grid entity, AREA(x) finds the surface area.- Returns one if file x is at end-of-file, zero otherwise. Note that x is the numberused to OPEN the file.- Returns the error code of the error. This function returns zero until an ONERROR has been activated. The error codes are listed in the <strong>Macro</strong> Error Codestopic. You can use any number or variable for x -- it doesn't matter, as long asthere is some expression inside the parentheses.- Returns 1 if file a$ exists, 0 if not, -1 if a$ is an invalid file name.a$ = "c:\test\mytest.txt"y = EXIST(a$)if y = 1 then print "The file exists"if y = 0 then print "The file does not exist"if y = -1 then print a$, " is not a valid filename."Note: Unlike most other functions that accept filenames, EXIST accepts wildcards(such as "*.bsc". It is therefore unable to recognize the "*\" shortcut usedelsewhere to start a path in the DesignCAD root directory.LAYER(x) - Layer status of layer x. Returns 0-15[legal values: 0, 1, 2, 3, 6, 7, 14, 15]Assume y=LAYER(x)if ODD(y)=0, -> no entities in layer x. [y = 0, 2, 6, or 14]if ODD(y)=1, -> entities are in layer x. [y = 1, 3, 7, or 15]if ODD(y\2)=0, -> layer x is invisible. [y = 0 or 1]if ODD(y\2)=1, -> layer x is visible. [y = 2, 3, 6, 7, 14, or 15]if ODD(y\4)=0, -> layer x is not editable. [y = 0, 1, 2, or 3]if ODD(y\4)=1, -> layer x is editable. [y = 6, 7, 14, or 15]if ODD(y\8)=1, -> x is the current layer. [y = 14 or 15]LENGTH(x) - Length of the entity x. It should be a line entity.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 102 von 743String FunctionsASC(a$) - ASCII code for the first character of a$.a$ = "Test"y = ASC(a$)' y = 84CVS(a$) - Convert the eight-character string a$ to a real number. This is the inverse ofMKS$.ERR$(x) Returns the description of the specified error number.errnum=Err(1)Message Err$(errnum)INSTR(a$, b$) - Returns the location of the first occurrence of string b$ in string a$. Zero isreturned if there are no occurrences.a$ =" This is a test"b$ = "test"z = INSTR(a$,b$)' z = 11LEN(a$) - Length of string a$.a$ = "This is a test"l = len(a$)' l = 14VAL(a$) - Numeric value of string a$ (accepts feet-inches or degrees-minutes-seconds).For example:a$ = "2'4""n = Val(a$)' n = 2.3333.a$ = "60D40M15S"n = Val(a$).' n = 60.6708a$ = "45"n = Val(a$)' n = 45.0000n may now be used for calculations.Note: To convert a numeric value back into a text string, just use a normal Assignmentstatement, a$=n. The string will be assigned using the current Precision setting.CHR$(x) - Returns the character with an ASCII code of x.x = 84a$ = CHR$(x)' a$ = "T"LEFT$(a$, x) - Returns the leftmost x characters of a$.a$ = "This is a test"x = 8b$ = LEFT$(a$, x)' b$ = "This is " (note the trailing space)MID$(a$, x, y) - Returns y characters of a$ beginning at x.a$ = "This is a test"x = 4y = 6


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 103 von 743b$ = MID$(a$, x, y)' b$ = "s is a"MKS$(x) - Converts x to an eight-character string.x = 108.45a$ = MKS$(x) 'convert the number to a stringprint "[" + a$ + "]"anykeyy = CVS(a$) 'convert the string back to a numberprint yanykeyRIGHT$(a$, x) - Returns the rightmost x characters of a$.a$ = "This is a test"x = 8b$ = RIGHT$(a$, x)' b$ = "s a test"STRING$(x, a$) - Returns a string of x copies of a$.a$ ="HELP! " ' (note trailing space)x = 3b$ = STRING$(3, a$)' b$ = "HELP! HELP! HELP! " (note trailing space)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 104 von 743SYS FunctionThe SYS function represents many different DesignCAD system variables. SYS(1), forexample, is the number of points set, and SYS(3) is the current layer. A list of the availableSYS variables and their valid ranges follows:0 - Error checking (enable/disable) [0 = Off, 1 = On]The error checking function is enabled by default. This setting is only effective during thecurrent macro.1 - Number of points currently in the point buffer after being set by SETPOINT or ENTITY orSETSELECTEDPOINTS. Mostly read-only, but you can clear the point buffer by setting itto zero.2 - OpenGL shading mode for the currently active view window[0 = wireframe, 1 = hiddenline, 2 = flatshade, 3 = smoothshade, 4 = quickhiddenline]3 - Current layer index [0-1000]4 - Current line type [0-12][0 = solid, 1 = dashed, 2 = hidden, 3 = center, 4 = phantom, 5 = dotted, 6 = dashdot,7 = border, 8 = divide, 9 = special-1, 10 = special-2, 11 = speciall-3, 12 = special-4]Numbers above 12 can be used but will refer to custom line types which may vary fromuser to user or even drawing to drawing.5 - Current line type scale [0


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 105 von 74320 – Minor Display Grid spacing along y (or radial spacing for polar grid) (V. 16 and higher)Snap grid size (Version 15 and earlier)21 - Attribute display mode[0 = Don't display attributes, 1 = Display Visible Attributes Only,2 = Display All Attributes]This function applies only to attribute entities, not attribute definition entities. To control thevisibility of attribute definitions, use Sys(62).By default, attributes are assumed to be visible, so old macro code which used only the 0and 1 values for this function will still behave much as before. That behavior will onlychange if you create new attribute entities with the "invisible" option checked.22 - Save parameters with drawing, enable/disable [0 = off, 1 = on]23 - Mathematical or geographical angles [0 = Mathematical, 1 = Geographical]Mathematical angles are measured counterclockwise from the positive X axis, whilegeographical angles are measured clockwise from the positive Y axis.24 - Fill wide lines enable/disable [0 = off, 1 = on]25 = WMF output scale (metafile units per drawing unit).One metafile unit is about 1/576 of in inch. A value of zero creates a WMF file of 5 inchwidth or height (5 inches along longest side). Note that the 5-inch size does not include theborder margin -- that's just the output size of the drawing data. Given a default margin of1/8 inch, the overall width or height of the output file (with Sys(25) = 0) will be 5.25 inches.The default value of Sys(25) is 80.26 - Edit current layer only [0 = off, 1 = on]Note that this function has the opposite behavior of the "Enable Multilayer Editing" checkbox in Layer Options – when Sys(26) is zero, the multilayer editing box is checked.27 - Beep on point set [0 = off, 1 = on]. Uses the "default" system sound. For best results, usea very short wav file - if you set points faster than the sound file can play, some beeps willbe skipped (but the points will still be set).28 - Update coordinates in Digitizer Tracing Mode [0 = off, 1=on].Default is off; when in Digitizer Tracing Mode, the coordinate bar will only update when thepointing device (mouse or digitizer puck/pen) stops moving. Since in tracing mode theuser normally is looking at the drawing he is digitizing rather than at the screen, thisusually presents no problem.If Sys(28) is turned on, then the coordinate bar will continuously update as the pointingdevice is moved on the tablet. With some digitizers, the on-screen cursor is not able tokeep up as the pointer is moved across the tablet, resulting a slow-motion replay onscreen of the motion performed on the tablet. This also sometimes causes points to bedropped if the user sets points too quickly.30 - Large cursor step size [0


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 106 von 743macro has complete control of the program and you are not expecting user input.Silent mode 2 completely suppresses view regeneration and drawing command dialogboxes when you draw entities.Note: After performing any drawing operations in Silent Mode 2, you will need tomanually regenerate the screen after setting Silent Mode back to zero.Note: You should always return silent mode to zero when your macro exits. Failure todo so may result in improper manual operation of DesignCAD.37 - Cursor step consistent with Screen or Drawing[1 = Screen, 2 =Drawing]38 - Text mirror enable/disable [0 = off, 1 = on] 3D Text Only.If you mirror a piece of text with this setting turned on, the mirrored text is drawnbackwards.39 - Point mark type [1 = cross, 2 = box, 3 = circle, 4 = circle+box, 5 = filled dot]40 - Crosshair enable/disable [0 = off, 1 = on]41 - Rubberband type0=none,1=line,2=2D-Box,3=3D-Box,4=Curve,5=Bezier Curve,6=Circle (center-radius),7=Circle(diameter points),8=Circle(3-point),9=Arc(center-start-end),10=Arc(3-point),11=Ellipse,12=Elliptical Arc,13=Plane,14=OrthoLine,15=Cylinder,16=Cone,17=Truncated Cone,18=Sphere,19=Hemisphere,20=Torus,21=Tube,22=RoundBox,23=Angled 2D-Box24=Elliptical Arc(center, axis1, axis2, start angle, end angle)25=Arc(beginning, end, center)26=ParallelogramThis sets the type of rubberband-line that is displayed as points are set by the programor during SetPoint.42 - Parallel-2 offset distance [0


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 107 von 743This Sys function overrides the current setting of Sys(25). Setting this value to zerorestores the normal function of Sys(25).46 - Margin for WMF output (inches). Default value is 1/8 inch.47 - AutoRender in Paperspace Mode.This function controls whether ViewFrames with OpenGL shading are automaticallyrendered when you enter Paperspace mode. If set to 0, the viewframes are notautorendered, and you must use the preview button to see the rendered result. If set to 1,the views are autorendered -- which may take some time on a complex drawing.48 - Realtime Snap Preview. [0=off, 1=on].Controls the snap preview cursor for snap modes. On very busy drawings, the snappreview can sometimes slow down the mouse movement, so we provided a means to turnit off.49 - Disable Cursor Movement -- [0=off, 1=on] (Version 13)When this flag is on it prevents the cursor from following the points which the macro sets indrawing commands. This can often speed up drawing operations50 - Cursor Lock behavior in 2D mode[0=new behavior - Shift forces Ortho Mode from the last point set1=old behavior - Shift locks horizontal movement from the last cursor position, and Ctrllocks vertical movement from the last cursor position.]51 – Display Arcs as Vectors (Version 14)[0 = Disable, 1 = Enable] If this is set to zero, arcs are drawn using Windows API functionsexclusively. The default setting is 1, whereby arcs are displayed as vector approximationsin order to prevent display anomalies where an arc joins the end of a line.52 – Sets the major Display Grid divisions along X (or Angular spacing for Polar grid) (V. 16)53 – Sets the major Display Grid divisions along Y (or Radial spacing for Polar grid) (V. 16)54 – Sets the Display Grid style (V. 16)[0=lines, 1=dots, 2=crosses]55 – Sets the Display Grid Angle (in degrees) for isometric display grids (V. 16)[0 – 360]60 - Tick mark segments [0


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 108 von 743If any grid entities are selected, this number does not include grid lines, only the gridheaders. Not affected by PUTATTR. Sys(80) can be set to zero to clear the currentselection set (nothing is selected). Zero is the ONLY value that can be written to this Sys()function.81 - SetPoint behavior * (V. 14)[0=clear buffer (default), 1 = append points to buffer]Normally, when you run the SetPoint statement, it clears any previous points from thepoint buffer. If Sys(81) is set to 1, you can run multiple SetPoint statements to accumulatemore and more points.Functions 90 - 99 are properties of an entity just selected with the Entity statement. They are allread_only values.90 - Entity type91 - Entity line typeNote: For Entity type 34 (Group Entities) Sys(91) indicates the group entity's InternalGroup Number – that is, the group number that will be shown for all entities that arecontained in this group. The group entity itself may also be contained inside anothergroup, which is indicated by Sys(94) just as for all other entity types.93 - Entity layer94 - Group number95 - Solid number96 - Selection status of entity [0 = not selected, 1 = selected]97 - Line type scale98 - Line thickness99 - Number of points in the entity, or number of grid lines for a grid header entity (entity type32). For a Group entity (entity type 34) it represents the number of entities contained in thegroup (including any nested Group entities).100 – Line Fill Spacing for HPGL Export * (V. 15)Controls the spacing between line fill pen strokes. Distance in plotter units.101 - Dimension text format (same as Sys(424) - changing one changes the other)[0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches]102 - Static dimensioning enable/disable [0 = off, 1 = on]Static dimensions are drawn as individual arrows, lines and text. However, when youfirst draw a static dimension, all the pieces still form a group, which will need to beexploded if you want to edit an individual piece.104 - Dimension arrowhead style [1-12]106 - Dimension precision [-7


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 109 von 743entities that were on layer 0 of an included symbol move to the layer on which theincluded symbol was loaded in it's host symbol or drawing.3 -- mostly flattened. Mostly like case 1, except that layer 0 entities are treated as incase 2.Example: Symbol A contains a red line drawn in layer 0, and a black box on layer 1.Symbol B contains Symbol A on layer 7, a blue circle on layer 9, and a green star onLayer 0.Now you include Symbol B on layer 12 of your drawing, and explode it.If Sys(111) = 0, the black box stays on layer 1, the blue circle stays on layer 9, and a redline and green star move to layer 12.If Sys(111) = 1, all four entities move to layer 12.If Sys(111) = 2, the black box stays on layer 1, the red line moves to layer 7, the greenstar moves to layer 12, and the blue circle stays on layer 9.If Sys(111) = 3, the red line moves to layer 7, the black box moves to layer 12, the greenstar moves to layer 12, and the blue circle moves to layer 12.112 - Depth of Nested Folders in Symbol Library window (V 15.1)Sets the number levels of nested folders under the symbol library search path. Defaultvalue of 1, which only shows a tab for the target path and any folders immediately beneathit that contain drawing files. Higher values will show tabs for increasingly deeper folderlevels. Once this value is changed, if you have already opened the Symbol Librarycommand you may have to manually browse to a different folder and then back again inorder to update the Symbol Library display.120 - Minimum X value in the drawing [read_only]121 - Minimum Y value in the drawing [read_only]122 - Maximum X value in the drawing [read_only]123 - Maximum Y value in the drawing [read_only]124 - Minimum Z value in the drawing [read_only]125 - Maximum Z value in the drawing [read_only]130 - Input window left boundary pixel location (-10000 to center)131 - Input window top boundary pixel location (-10000 to center)132 - Output window left boundary pixel location (-10000 to center)133 - Output window top boundary pixel location (-10000 to center)134 - Printer top margin [varies with media]135 - Printer bottom margin [varies with media]136 - Printer left margin [varies with media]137 - Printer right margin [varies with media]139 – Sets/Clears the "Trim Picked Segments Only" options in Trim commands (V. 17)[0 = off, 1 = on]Version 17 offers a new option in the Trim commands: Trim Picked Segments Only. Thisoption affects whether or not segments beyond the selected segment are also trimmedaway.140 – Sets/Clears the "Grid Smoothly Degrade" checkbox in Grid Options (V. 17)[0 = off, 1 = on]If this is set to 1, the display grid will smoothly reduce the number of visible grid lines asyou zoom out. If it is set to 0, the grid will become invisible if you zoom out too far to displayevery grid division.150 - Coordinate bar angle display mode


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 110 von 743[0 = degrees, 1 = grads, 2 = radians, 3 = degrees-minutes-seconds, 4 = bearings]151 - Coordinate bar distance display mode[1 = decimal, 2 = fractions, 3 = feet + fractional inches]152 - Scale mode for retrieving/copying drawings [1 = fixed, 2 = changeable]160 - Printed height of drawing [read_only]161 - Printed width of drawing [read_only]162 - Print drawing centered [0=no, 1=yes]163 - Print drawing fit to paper [0=no, 1=yes]164 - Consider all drawing objects when printing [0=no, 1=yes]165 - Print panel mark style [0=none, 1=corners, 2=outline box]166 - Print panel numbers [0=no, 1=yes]167 - Print output style[0=wireframe, 1=quickshade, 2=smoothshade, 3=hidden, 4=hidden (plotter), 5=hidden(scan-line)]168 - Printed panel rows [read_only]169 - Printed panel columns [read_only]170 - Print selected objects only [0=no, 1=yes]190 - Selection Handle 1 X value [-10e6


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 111 von 743225 - Viewing Toolbox visibility [0=off, 1=on]226 - Color Toolbox visibility [0=off, 1=on]227 - Material Toolbox visibility [0=off, 1=on]228 - Line Style Toolbox visibility [0=off, 1=on]229 - Ruler visibility [0=off, 1=on]230 - Scrollbar visibility [0=off, 1=on]231 - Info Box visibility [0=off, 1=on]232 - Double Line Toolbox visibility [0=off, 1 = on]233 - Toolbox Icon style[0=small color, 1=large color, 2=small b/w, 3=large b/w]240 - Drag as box [0=drag image, 1=drag outline box]241 - Save preview bitmap with drawing [0=no, 1=yes]242 - Select object when created [0=no, 1=yes]243 - This flag is no longer supported. Used to be Shade when Created244 - Old-style command dialog bar [0=no, 1=yes]245 - Show Tooltips [0=no, 1=yes]246 - Draw text as outline [0=no, 1=yes]247 - Group arrays when created [0=no, 1=yes]248 - Use offscreen bitmap [0=no, 1=yes]249 - 2D mode working plane [0=xy, 1=zy, 2=xz]250 - AutoSave status [0=off, 1=on]251 - AutoSave time interval (minutes)252 - Display Grid extent253 - 3D Display Grid Plane [0=zy, 1=xz, 2=xy]254 - Draw text in current color [0=no, 1=yes]255 - Draw text in current layer [0=no, 1=yes]256 - Default text layer257 - Text justification [0=left, 1=center, 2=right]258 - Text style [0=normal, 1=bold, 2=italic, 3=bold italic]259 - Text arc vertical scale261 - Draw attributes in current color262 - Draw attributes in current layer263 - Default attribute layer269 - Number of Arc Segments (V. 16)This function how many segments to create when an arc, ellipse, or circle is created as aplane or line.Note 1: this only affects entity creation – it does not affect conversion to plane or vectorafter the object is created.Note 2: This represents the total number of segments for the new entity – 20-degree arcsand full circles will have the SAME NUMBER OF SEGMENTS. For example, if it is set to20, a circle drawn with the "create as line" option will have 20 segments, as will a20-degree arc created with the "Save as line" option.270 – Display Entities by Layer Order [0 disables, 1 enables] (V. 16)Changed in 17.1. Display Entities by Layer Order flag removed. Added instead:AutoName Entities When Created [0 disables, 1 enables] (V 17.1)271 – Layer List Filter Mode (V. 16[ 0 = Active Layers Only, 1 = Named Layers Only, 2 = Active Or Named Layers Only, 3 =All Layers, 4 = Layer Groups Only]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 112 von 743272 – Layer List Sort Mode (V. 16)[ 0 = by index, 1 = by status, 2 = by name, 3 = by content]273 – Number of Multiline Styles in the current document (Read_Only) (V. 16)274 – Number of Layer Groups in the current document (Read_Only) (V. 16)275 – Visibility of Symbol Layers controlled by Symbol Host Layer (V. 17.1)[0 = no, 1 = yes]If this is set to 1, you can not hide individual layers inside symbols; the entire symbol ishidden or shown based on the visibility of its host layer.When this is set to 0, you may hide or show entities inside the symbol by hiding or showingtheir original layers.279 – MultiLine Mode Status (V. 16)[0 = off, 1 = on]If MultiLine Mode Status is on, all new lines will be drawn as multilines.280 – Current Layer Group Number (V. 17)[0 = off, 1 = on]If MultiLine Mode Status is on, all new lines will be drawn as multilines.281 – Current Layer Group Status (V. 17)[0 = invisible, not editable,2 = visible, not editable4 = visible and editable]282 – Select Invisible Attributes (V. 17.1)[0=off, 1 = on]If Select Invisible Attributes is on, the user is able to select hidden attributes that are onvisible, editable layers (emulating DesignCAD behavior from Version 13 and earlier). If it isoff, only attributes that are visible (and on editable layers) can be selected.283 – Opaque Texture Maps (V. 17.2)[0=off, 1=on]If Opaque Texture Maps is off, the wirefram color blends with the colors of the texture map(like a photographic slide projected onto a colored screen). If it is off, the texture map hidesthe wireframe color of the shaded object, showing only the colors of the texture map.Functions 290 - 299 are properties of an entity just selected with the Entity statement.290 - Current Entity color, Red value [0-255]291 - Current Entity color, Green value [0-255]292 - Current Entity color, Blue value [0-255]293 - Current Entity Double Line Cap Style [read_only][0=none, 1=beginning, 2=end, 3=both294 - Current Entity Double Line AutoTrim mode [read_only][0=off, 1 = on]295 - Current Entity Double Line Alignment [read_only][0=Left, 1 = Center, 2 = Right]296 - Entity Symbol Type (Read-only) (V. 13)[0=not a symbol, 1=symbol by reference, 2=embedded symbol,3 = block]This function indicates the symbol type of the current entity selected by the ENTITYstatement.297 - Entity Construction Line Type (Read-only) (V. 13) 0[0=not a construction line, 1=ray, 2=construction line]This function indicates the construction line type of the current entity selected by the


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 113 von 743ENTITY statement.298 - Entity Attribute Definition Text Type (Read-only) (V. 13)[0=not an attribute definition, 1=fixed text, 2=changeable text]This function indicates the text type of the current Attribute Definition entity selected by theENTITY statement.299 - Entity Attribute Definition Visibility (V. 13)[0=not an attribute definition, 1=visible, 2=hidden]This function indicates the visibility of the current Attribute Definition entity selected by theENTITY statement.Note: The Attribute Definition Display Mode flag (Sys(62)) must be set to 1 or 2 for ANYattribute definitions to be visible.300 - Current drawing color, Red value [0-255]301 - Current drawing color, Green value [0-255]302 - Current drawing color, Blue value [0-255]306 - Rubber-band color, Red value [0-255]307 - Rubber-band color, Green value [0-255]308 - Rubber-band color, Blue value [0-255]309 – Major Grid color, Red Value [0-255] (V. 16)Display Grid color, Red value [0-255] (V. 15 and earlier)310 – Major Grid Color (Red Value) [0 – 255] (V. 16)Display Grid color, Green value [0-255] (V. 15 and earlier)311 – Major Grid Color, Blue value [0-255] (V. 16)Display Grid color, Blue value [0-255] (V. 15 and earlier)312 - Point color, Red value [0-255]313 - Point color, Green value [0-255]314 - Point color, Blue value [0-255]315 - Selection color, Red value [0-255]316 - Selection color, Green value [0-255]317 - Selection color, Blue value [0-255]318 - Dimension color, Red value [0-255]319 - Dimension color, Green value [0-255]320 - Dimension color, Blue value [0-255]321 - Background color, Red value [0-255]322 - Background color, Green value [0-255]323 - Background color, Blue value [0-255]324 - Selection rubberband color, Red value [0-255]325 - Selection rubberband color, Green value [0-255]326 - Selection rubberband color, Blue value [0-255]327 - Entity point color (point select mode), Red value [0-255]328 - Entity point color, Green value [0-255]329 - Entity point color, Blue value [0-255]331 - Cursor color, Red value [0-255]332 - Cursor color, Green value [0-255]333 - Cursor color, Blue value [0-255]334 - 3D cursor X color, Red value [0-255]335 - 3D cursor X color, Green value [0-255]336 - 3D cursor X color, Blue value [0-255]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 114 von 743337 - 3D cursor Y color, Red value [0-255]338 - 3D cursor Y color, Green value [0-255]339 - 3D cursor Y color, Blue value [0-255]340 - 3D cursor Z color, Red value [0-255]341 - 3D cursor Z color, Green value [0-255]342 - 3D cursor Z color, Blue value [0-255]343 - Smooth solids when shading [0 = off, 1 = on]344 - 2D Drafting Mode status [0 = off, 1 = on] read_only345 - Point Select Mode Status [0 = off, 1 = on] read_only346 - Double Line Mode Status [0=off, 1 = on]347 - Ortho Mode [0=off, 1 = on]348 - Number of material textures in drawing [read_only]349 - Current material texture350 - Current material color, Red value [0-255]351 - Current material color, Green value [0-255]352 - Current material color, Blue value [0-255]353 - Default text color, Red value [0-255]354 - Default text color, Green value [0-255]355 - Default text color, Blue value [0-255]356 - Default attribute color, Red value [0-255]357 - Default attribute color, Green value [0-255]358 - Default attribute color, Blue value [0-255]359 - Default dimension color, Red value [0-255]360 - Default dimension color, Green value [0-255]361 - Default dimension color, Blue value [0-255]370 - Default Double Line width371 - Default Double Line Cap Style[0 = none, 1 = Begin, 2 = Both, 3 = End]372 - Default AutoTrim status [0 = off, 1 = on]373 - Default Double Line Alignment [0 = left, 1 = center, 2 = right]374 - Default Double Line Fill status [0 = off, 1 = on]375 – Current MultiLine Style index376 – Minor Display Grid Color (Red value) (V. 16)[0 – 255]377 – Minor Display Grid Color (Green value) (V. 16)[0 – 255]378 – Minor Display Grid Color (Blue value) (V. 16)[0 – 255]390 - Number of attribute definitions in the block entity (V. 13)391 - Index of current attribute definition in the current block entity (V. 13)(0 to clear, or if none selected)392 - Indexed attribute definition type (in current block) (V. 13)[1=fixed, 2=changeable]393 - Indexed attribute definition visibility (in current block) (V. 13)[1=visible, 2=hidden]401 - Angular dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 115 von 743402 - Linear dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]403 - Radius dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]404 - Diameter dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]405 - Chamfer dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]406 - Coordinate dimension prefix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]407 - Angular dimension suffix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]408 - Linear dimension suffix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]409 - Radius dimension suffix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]410 - Diameter dimension suffix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]411 - Chamfer dimension suffix [0-5][0 = None, 1-Custom1, 2=Custom2, etc.]412 - Coordinate dimension suffix [0-5]413 - Dimension layer [0-255]415 - Dimension line position [0 = text and arrows inside lines, 1 = text inside, arrows outside]416 - Dimension text location[0 = text aligned between arrows,1 = text above and between arrows2 = text below and between arrows3 = text aligned to right of arrows4 = text above and right of arrows5 = text below and right of arrows6 = text aligned to left of arrows7 = text above and left of arrows8 = text below and left of arrows]417 - Angular text location [0 = above arrows, 1 = below arrows]418 - Linear text direction[0 = parallel, 1 = perpendicular, 2 = horizontal, 3 = vertical]419 - Angular text direction [0 = parallel to center of arc, 1 = horizontal]421 - Progressive dimension text format[0 = 123.125, 1 = 123-1/8, 2 = 123' 1.5", 3 = 123' 1-1/2"]424 - Dimension text format ( identical to Sys(101) - changing one changes the other)[0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches]425 - Progressive text direction [0 = along dimension, 1 = horizontal]428 - Angular dimension text format[0 = degrees, 1 = grads, 2 = radians, 3 = DMS]433 - Angular dimension precision [-7


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 116 von 743438 - Dimension text size [0


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 117 von 7431 = text above and between arrows2 = text below and between arrows3 = text aligned to right of arrows4 = text above and right of arrows5 = text below and right of arrows6 = text aligned to left of arrows7 = text above and left of arrows8 = text below and left of arrows]501 - Dimension Baseline text format[0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches]502 - Dimension Baseline Text Orientation[0 = parallel, 1 = perpendicular, 2 = horizontal, 3 = vertical]503 - Dimension Baseline text precision [-7


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 118 von 743521 - Dimension Distance text format[0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches]522 - Dimension Distance text orientation[0 = parallel, 1 = perpendicular, 2 = horizontal, 3 = vertical]523 - Dimension Distance text precision [-7


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 119 von 743[1=explode to attribute (uses the text contents, not the tag name)2=leave as attribute definition]This function allows you to control what happens to attribute definitions when a block isexploded.600 - Minimum X-value of the current display area [-10e6


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 120 von 743behavior unless there is code that specifically turns on the enhanced mode.Note: Sys(996) does not interfere in any way with the operation of Sys(999), which isspecifically for Input statements.997 - Save empty files [0=no, 1=yes]998 - Document changed since last save [0=no, 1=yes]999 - INPUT Exit condition: 0 for Enter or OK; 1 for Esc or Cancel1000 - Print By Layer Order [0 = no, 1 = yes]. If off, prints in display order.1001 - Snap range in pixels. This sets the minimum distance in pixels that the cursor must befrom the desired snap location.1002 - Skip DWG Hatch patterns [0= no, 1 = yes]. If this mode is on, all DWG hatch patternswill be skipped when importing DWG files. Occasionally this may help import an otherwiseintractable DWG drawing.1004 - 2-Point line DWG/DXF export [0=off, 1=on] (V. 13)This function allows you to turn the option to export lines as 2-point line entities instead ofpolyline entities. The default setting is off. If turned on, this function will export ALLpolylines in the drawing as 2-point Line entities.1008 - Backup File Save status [0=off, 1=on]. (Read/Write) (V. 13)This function indicates whether DesignCAD is set to automatically copy the previousversion of your drawing to a BAK file when you save it.1009 - Construction line visibility flag [0=hidden, 1=visible] (Read/Write) (V. 13)This function indicates whether DesignCAD shows or hides construction line entities.1010 - DWG Export code pageSupported code pages:-1 - use the codepage of the active keyboard layout0 - use the code page in the DesignCAD drawing file1250 - Eastern Europe (Poland, Czech Republic, etc.)1251 - Cyrillic (Russia)1252 - US, Western European1253 - Greek1254 - Turkish1257 - Baltic (Latvia, Slovenia, etc.)1011 - DWG Import code pageSupported code pages:-1 - use the codepage of the active keyboard layout0 - use the code page in the DWG file1250 - Eastern Europe (Poland, Czech Republic, etc.)1251 - Cyrillic (Russia)1252 - US, Western European1253 - Greek1254 - Turkish1257 - Baltic (Latvia, Slovenia, etc.)1015 - Sticky Handle mode [0=off, 1=on] (R/W) (V. 13)This function controls whether DesignCAD saves selection handles with the entity or not.1016 - Synchronize Snap Grid to Display Grid [0=off, 1=on] (R/W) (V. 13)This function controls whether DesignCAD keeps the display grid and snap grid aligned tothe same center. In previous versions the snap grid was always centered on the origin, butthe new default behavior is to align them both on the same center. Therefore it is nowpossible to move the display grid center and have the snap grid shift to match.1020 - Number of points to average when using SmoothLine (menu command Smooth Line byPoint Reduction) (V. 13)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 121 von 7431021 - Sets the smoothing angle to be used by SmoothLine2 (menu command Smooth Line byAngle Detection) (V. 13)1022 - Smoothed lines convert-to-curves flag [0=leave, 1=convert to curve] (V. 13)1023 - Enable/Disable SmoothOptions dialog for smooth commands. (V. 13)[0=hide, 1=show]1024 - Angle Constraint mode [0=off, 1=on] (R/W) (V. 13)This function allows the programmer to enable or disable Angle Constraints in a macro.1027 - Message Box Style for the Message statement (V. 13)[0=OK (default)1 = OK/Cancel2 = Abort/Retry/Ignore3 = Yes/No/Cancel4 = Yes/No5 = Retry/Cancel]This function allows the programmer to specify the style of MessageBox that appears forthe Message statement.1028 - Return code for the last Message statement (Read-only) (V. 13)[1=OK2 = Cancel3 = Abort4 = Retry5 = Ignore6 = Yes7 = No]This function allows the programmer to determine the user's response to a Messagestatement.1032 - Plane Snap mode [0 or 1] (R/W) (V. 13)This function controls the behavior of the Plane Snap command. When set to zero, theplane snap command snaps to the nearest point in the mathematical plane occupied bythe nearest surface (but that point may not actually be on the surface).When set to one, the plane snap command behaves normally, and always snaps to thenearest point on the nearest surface (default).1033 - Symbol Snap mode [0 or 1] (R/W) (V. 13)This function controls the behavior of the Snap commands in the vicinity of symbols. Whenset to zero, the snap commands ignore entities that are embedded in symbols. When setto one (default), the snap commands can snap to points on entities inside symbols.1035 – Reconstruct grids after solid operations [0=no, 1=yes] (V. 15)By default, DesignCAD will attempt to combine adjacent facets from a cut grid entity intoone or more new grids. By turning this flag off, all facets of a cut grid will be converted toplanes.1036 -- selectable invisible attributes? [0=no, 1 = yes] (V. 15)If this is set to 1, SelectAll will select both visible and hidden attributes on visible layers.1100 – Current Units of Measurement (V. 15)[0 = none, 1 = inches, 2 = feet, 3 = miles, 4 = mm, 5 = cm, 6 = m, 7 = km]1101 – Default Units of Measurement for new drawings (V. 15)[0 = none, 1 = inches, etc.]1102 – Default Units of Measurement for unitless drawings (V. 15)[0 = none, 1 = inches, etc.]1103 – Interruptible Snap Mode (V. 15)[0 = off, 1 = on]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 122 von 7431104 – Running Snap Mode (V. 15)[0 = off, 1 = on]Which snaps are on during Running Snap Mode is determined by Sys(1105) – (1109)1105 – Running Gravity Snap (V. 15)[0 = disabled, 1 = enabled]1106 – Running Line Snap (V. 15)[0 = disabled, 1 = enabled]1107 – Running Midpoint Snap (V. 15)[0 = disabled, 1 = enabled]1108 – Running Intersect-1 Snap (V. 15)[0 = disabled, 1 = enabled]1109 – Running Tangent Snap (V. 15)[0 = disabled, 1 = enabled]1110 – Current Toolbars Visibility (V. 15)[0 = off, 1 = on]Reflects the current status of Show All Toolbars command1111 – Snap to Hatch points (V. 15)[0 = disabled, 1 = enabled]1112 – File Lock (V. 15)[0 = unlocked, 1 = locked by another instance of DesignCAD]1113 – Drawing Handles Visible (V. 15)[0 = no, 1 = yes]1114 – Printing Base Units (V. 15)[1 = inches, 2 = feet, 3 = mi, 4 = mm, 5 = cm, 6 = m, 7 = km] See also Sys(10)1115 – Explode Symbols/Blocks at Top-Level only (V. 15)[0 = no (explodes recursively) 1 = yes (retains sub-blocks or symbols)]1116 – PresetPoint Mode (V. 15)[0 = off, 1 = on]1117 – Skip font data when saving DC2/DC3 ASCII files. (V. 15)[0 = off, 1 = on]1118 – Ortho tolerance angle (Default value 10 degrees) (V. 15)This setting controls the maximum deviation from horizontal/vertical axes that the Orthocommand will convert to horizontal or vertical.1119 – Truncate trailing zeros in dimensions? (V. 15)[0 = no, 1 = yes]1120 – Truncate trailing zeroes in angular dimension? (V. 15)[0=no, 1=yes]1121 – Truncate trailing zeroes in arc dimensions? (V. 15)[0=no, 1=yes]1122 – Truncate Trailing zeroes in chamfer dimensions? (V. 15)[0=no, 1=yes]1123 – Truncate trailing zeros in diameter dimensions? (V. 15)[0=no, 1=yes]1124 – Truncate trailing zeros in radius dimensions? (V. 15)[0=no, 1=yes]1125 – Truncate trailing zeros in coordinate dimensions? (V. 15)[0=no, 1=yes]1126 – Truncate trailing zeros in progressive dimensions? (V. 15)[0=no, 1=yes]1127 – Truncate trailing zeros in progressive radius dimensions? (V. 15)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 123 von 743[0=no, 1=yes]1128 – Truncate trailing zeros in distance-only dimensions? (V. 15)[0=no, 1=yes]1129 – Truncate trailing zeros in baseline dimensions? (V. 15)[0=no, 1=yes]1130 – Truncate trailing zeros in extended dimensions? (V. 15)[0=no, 1=yes]20000 - Owner Validated flag. This is set to 1 if a protected drawing has been accessed withthe correct password. The value is zero if the owner has not entered the password duringthis session, or if the drawing is unprotected.20001 - Password Protected. [0 if unprotected, non-zero otherwise].20004 - Export disabled. [1 prevents export to other file formats; 0 allows export (no layerprotection in the exported file)]20007 - Save To Older Format disabled [ 1 prevents the file from being saved to olderDesignCAD file formats; 0 allows the file to be saved to older formats (no layer protectionin the saved file)]20008 - Symbol Load/Merge disabled [1 prevents the file from being loaded as a symbol orfrom being merged into another drawing. 0 allows the drawing to be merged or used as asymbol (no layer protection in the loaded/merged data)]20011 - Priority Class. [32 = normal, 64 = idle, 128 = high priority, 256 = real-time priority].To use the SYS function in a macro, use it like you would any other function. For example, thefollowing program segment checks that at least three points have been set:if Sys(1) < 3 thensetpoint "Set at least three points." 3end ifThe SYS function is different from the other macro functions in that you can assign a value tomost SYS variables. In other words, you can use the SYS function on the left side of the equalsign in an Assignment statement. For example, to set the current layer to layer number seven,you could use the following statement:SYS(3) = 7This is equivalent to using the macro language statement LAYER(7)=14.When assigning a SYS function value to a variable however, it is necessary to place thevariable on the left side of the equal sign. For example to set the current value for SYS(421) tothe new variable v, you could use the following statement:v = SYS(421)SYS variables nine (the number of entities in the drawing) and 90-99 (entity characteristics)cannot be modified by assigning a value to the SYS function – they are read-only variables.There are other read-only SYS variables; they are noted as such in the chart above.When some of the SYS variables are modified, the DesignCAD drawing screen should beregenerated with the REGEN statement or the DesignCAD >Regenerate command (or the>RegenerateAll command to update all views). For example, if you change the viewcharacteristics or the screen colors, the drawing screen must be regenerated for correctoperation. The macro language interpreter does NOT check for valid SYS assignments orscreen regeneration – if you change the SYS variables, your macro is responsible for all


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 124 von 743validity checking.The SYS variables 90-93 can be used together with the ENTITY statement to read the type,line type, and layer of the entity referred to by the last ENTITY statement.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 125 von 743SYS$ FunctionThe SYS$ function represents several different DesignCAD system variables in string format.SYS$(6), for example, is the current path name. A list of the available SYS$ functions follows:0 – Commandline parameters. (V. 14)This function contains any extra information that was on the command line after the macroname, or was passed by the CMDLINE statement to a RUN or CALL statement. Forexample, if you run mymacro.d3m by typing "mymacro.d3m 1, 10, 100" at thecommandline, when the macro checks Sys$(0) it will find the string "1, 10, 100"1 - Entity text string. This is the text from a Text or Attribute entity that was "loaded" with theENTITY statement (read_only)2 - Current drawing name (with full path) (read_only).Contains an empty string until the drawing has been saved at least once.3 - Current drawing name (minus path) (read_only).Contains an empty string until the drawing has been saved at least once.5 - Current drive (read_only)6 - Current path name7 - Current time (read_only)8 - Current date (read_only)20 - Default drawing directoryTerminate the desired directory with a backslash '\'. Example:Sys(20) = "C:\Program Files\IMSI\DesignCAD 3D Max 14\My Drawings\"21 - Default symbol directoryTerminate the desired directory with a backslash '\'. Example:Sys(21) = "C:\Program Files\IMSI\DesignCAD 3D Max 14\Symbols\2DSymbols\Windows\"22 - Default bitmap directoryTerminate the desired directory with a backslash '\'.23 - Default macro directoryTerminate the desired directory with a backslash '\'. Example:Sys(23) = "C:\Program Files\Addons\DrollTroll's <strong>Macro</strong> Tools\"25 - Default view directoryTerminate the desired directory with a backslash '\'.34 - Default Material List directoryTerminate the desired directory with a backslash '\'.36 - DesignCAD root directory (read_only)37 - Default import directory38 - Default export directory39 - Default EXE directory40 - Windows clipboard text41 - Input window caption. Use an empty string "" for no title bar.42 - Output window caption. Use an empty string "" for no title bar.43 – Default Symbol Library Path (V. 15)90 - Name of current view window91 - Name of current material92 - Entity color. This 9-digit string represents the RGB values for the color of the itemreferenced by the last ENTITY statement. It replaces Sys(92) in earlier versions ofDesignCAD. The first three characters represent the red component, the second threerepresent the green component, and the last three the blue component of the color.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 126 von 743(read_only). Note: This function is no longer necessary, as there are dedicated Sys()functions, Sys(290) – Sys(292), which directly represent the RGB values of the currentEntity color.93 - Name of current layer (30 characters, max.)94 - Name of current TrueType font95 - Name of current Vector Font100 - Registered serial number (read_only)101 - Registered user name (read_only)102 - Registered company name (read_only)103 - DesignCAD release date (read_only)104 - DesignCAD release time (read_only)105 - DesignCAD version number (read_only)200 - Statusbar panels visibility (write_only) (V. 13)This is a six-digit string consisting of ones and zeros. Each digit controls the visibility ofone of the panes of the status bar, as follows:DigitPanel1 Snap mode2 Points counter3 Zoom factor4 Drafting mode5 Preset Point mode6 Working PlaneThe command prompt panel cannot be turned off. The string must be exactly sixcharacters in length, or it will be ignored. Any character other than "0" (zero) will make thecorresponding panel visible.Examples:Sys$(200) = "010001" ' shows only points counter and working planeSys$(200) = "111111" ' turns all panels back onNotes: The string must be exactly six characters long, or it will have no effect on thecurrent settings. Any character other than "0" will turn the corresponding panel ON.Note for 15.0 and later: an extra field has been added, increasing the number of zeros orones from six to seven. Digit 1 is now the Units of Measurement, and everything else isshifted one location to the right.DigitPanel1 Units of Measurement2 Snap mode3 Points counter4 Zoom factor5 Drafting mode6 Preset Point mode7 Working Plane296 - Entity Symbol Name. (Read-only) (V. 13)This function contains the full path and filename of the symbol entity currently selected bythe ENTITY statement, or the block name if the entity is a block.297 - Entity Attribute Definition Tag. (V. 13)This function contains the tag name of the Attribute Definition currently selected by theENTITY statement.298 - Entity Attribute Definition Prompt. (V. 13)This function contains the user prompt for the Attribute Definition currently selected by theENTITY statement.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 127 von 743299 - Entity Attribute Definition Default Text. (V. 13)This function contains the default text of the Attribute Definition currently selected by theENTITY statement.300 - Entity Name. (V. 16)This function contains the name of the ENTITY statement.301 – Layer Group Name. (V. 17)This function contains the name of the current layer group.390 - Indexed Block Attribute Definition Tag. (V. 13)This function contains the tag name of the indexed Attribute Definition that is contained ina Block entity currently selected by the ENTITY statement. The index of the attributedefinition being described is set by Sys(391).391 - Indexed Block Attribute Definition Default Text. (Read-only) (V. 13)This function contains the default text string for the indexed Attribute Definition that iscontained in a Block entity currently selected by the ENTITY statement. The index of theattribute definition being described is set by Sys(391).392 - Indexed Block Attribute Definition Text. (V. 13)This function contains the actual text contents of the indexed Attribute Definition that iscontained in a Block entity currently selected by the ENTITY statement. The index of theattribute definition being described is set by Sys(391).Sample code -- how to extract Attribute Definition data from blocks:For entnum = 1 To Sys(9) ' check every entity in the fileEntity entnumOn Error ResumeIf (Sys(90) = 26) And (Sys(296) = 3) Then' This is a Symbol entity, of subtype BlockblkName$ = Sys$(296)nAttributes = Sys(390)for i = 1 to nAttributes' get data for every attribute definition in this' block instanceSys(391) = iisFixed = Sys(392)isVisible = Sys(393)tag$ = Sys$(390) ' attribute definition tagdefText$ = Sys$(391) ' default text stringattText$ = Sys$(392) ' actual text stringnext iEnd IfIf Sys(90) = 71 Then' This is an attribute definition (outside a block)isFixed = Sys(298)isVisible = Sys(299)tag$ = Sys$(297) ' attribute definition tagprompt$ = Sys$(298) ' user promptdefText$ = Sys$(299) ' default text stringEnd IfIf Sys(90) = 68 Then' This is a construction lineCLineType = Sys(297)If CLineType = 0 ThenCLMsg$ = "Invalid Data"End IfIf CLineType = 1 ThenCLMsg$ = "Construction Line"End IfIf CLineType = 2 ThenCLMsg$ = "Construction Ray"


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 128 von 743End IfEnd IfNext entnum803 - Current Paperspace Layout NameTo use the SYS$ function in a macro, use it like you would any other string function. Forexample, the following macro displays the current drive and path name:message Sys$(6)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 129 von 743<strong>Macro</strong> LimitationsMaximum Program Size: Depends on available memory - up to 30,000 lines. Blank lines andlines containing only comments do not count.Maximum Array Size: Depends on available memory - up to 200,000 elements (total of allarrays).Maximum Number of Array Dimensions: 1Maximum Number of Symbols: 200,000. Symbols include Labels and Variables. Eachelement of an array counts as one symbol.Maximum String Size: 255 characters.Maximum Nesting for Group IF: 30.Maximum Nesting for FOR-NEXT: 30.Maximum Nesting for DO-LOOP: 30.Maximum Nesting for GOSUB: 30.Maximum Number of Strings: Depends on available memory - up to 30,000 strings.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 130 von 743<strong>Macro</strong> <strong>Language</strong> Key WordsThe following reserved keywords cannot be used as macro variable names or as labels:ABS ACOS ALIASAND ANGLE ANYKEYAREA ASC ASINATAN CALL CHAINCHANGE CHR$ CLEARCLEARSTORAGE CLEARSTORAGE$ CLOSECLS CMDLINE COLORCOS CVS DIMDO ELSE ENDENDIF ENTITY EOFERR EXIST EXITEXP FOR FORMATGET GETATTR GETLAYERPROPSGETSELECT GETXY GOSUBGOTO HCOS HSINHTAN IF INCLUDEINPUT INSTR INTLABEL LAYER LEFT$LEN LENGTH LNLOCATE LOG LOOPMESSAGE MID$ MKS$MOD NEXT NOTODD ON OPENOR PARSE POINTVALPOPPOINT PRECISION PRINTPUSHPOINT PUT PUTATTRQUERY RESUME RETURNRIGHT$ ROUND SCREENXSCREENY SETLAYERPROPS SETPOINTSETSELECTEDPOINTSSGNSIN SQR SQRTSTEP STOP STRSTRING$ SYS SYS$SYSEX SYSEX$ TABTAN THEN TOTRUNC UPDATE UPDATELAYERWCLOSE WINDOW


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 131 von 743<strong>Macro</strong> Error CodesWhen the macro interpreter encounters an error, the error code is displayed along with themacro line in which the error occurred. The macro error codes and their meanings are listedbelow:1 - Out of memory. There are too many numeric variables.2 - Invalid numeric expression.3 - '[' does not have a matching ']'.5 - There is an unmatched quote in a string constant.6 - There is an ELSE without a corresponding IF statement.7 - There is an ENDIF without a corresponding IF statement.8 - An invalid variable name was encountered.11 - A FOR statement is nested too deeply.13 - A FOR statement has invalid syntax.15 - An IF statement has invalid syntax.16 - A Block IF statement does not have a corresponding END IF statement.21 - Invalid syntax in OPEN statement.22 - Invalid file name.23 - CLOSE statement was encountered when the file was not open.26 - The subscript is out of range in a numeric array.28 - The external subroutine file could not be loaded.29 - An external subroutine has not been loaded and a CALLEXT statement was encountered.31 - A DO statement is nested too deeply.32 - Invalid syntax in DO statement.33 - No LOOP statement was found for the DO statement.34 - The EXIT statement is not inside a loop.35 - A FOR or DO statement does not have a corresponding LOOP or NEXT statement.36 - Out of string space.37 - Out of symbol space.38 - Invalid syntax.39 - A variable has been re-dimensioned.40 - There is a FOR statement without a corresponding NEXT statement.41 - A String is too long—more than 80 characters.42 - An error occurred reading a disk file.43 - A disk file read was attempted after end-of-file was reached.44 - A disk file read was attempted when the file was not open for input.45 - A disk file write was attempted when the file was not open for output.46 - A disk file could not be opened.47 - The expression in a POINTVAL statement is larger than the number of points currently set.48 - Not enough memory is available to run a program.49 - Not enough memory is available to read the program.50 - The label in a GOTO or GOSUB statement was not found.51 - A GOSUB statement is nested too deeply.52 - A RETURN statement was encountered without a GOSUB.53 - Too many symbols are in the program.54 - There is a duplicate label in program.55 - A label name is too long. It must be a maximum of 7 characters plus a colon.56 - The program file could not be opened.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 132 von 74357 - The subscript was out of range in a Layer statement.58 - A division by 0 was attempted.59 - X ^ Y was encountered where X < 0. X must be positive.60 - The entity number was out of range in an ENTITY statement.61 - Syntax error in GET or PUT statement.62 - File I/O error in GET or PUT statement.63 - Invalid record length in OPEN statement.64 - Invalid record number in GET or PUT statement.65 - The file number in an OPEN statement was already open.66 - Error in CALLEXT statement.67 - Invalid precision in PRECISION statement.68 - A window was already open when a WINDOW statement was executed.69 - Too many strings are in the program.92 - SYS(92) is no longer supported. Please use SYS(290) – SYS(292) to get the entity's red,green, and blue values.100 - An error occurred in a DesignCAD command.102 - An expression is invalid. This is caused by a syntax error.103 - An expression or statement is too complex.104 - An invalid argument was used with a numeric function.105 - Too many files are open for a Chain or Run statement. A maximum of twenty files can beopen.106 - A get or a put statement was attempted when the file was not open or was not opened forrandom access (R).107 - The layer number was out of range in a Layer statement.108 - The entity is not a symbol.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 133 von 743SysEx FunctionThe SysEx functions are numeric variables that are stored in text files and are thereforeremembered between DesignCAD sessions. There are 10,000 values available: SysEx(1) –SysEx(10000). The variables are stored in files of 100 each, as follows:SysVal_001.ini stores SysEx(1) – SysEx(100).SysVal_002.ini stores SysEx(101) – SysEx(200)etc. throughSysVal_100.ini stores SysEx(9901 – SysEx(10000)All SysVal ini files can be cleared by running the ClearStorage statement with no arguments.An individual SysVal ini file can be cleared by running ClearStorage n, where n is the number inthe ini file's name. For example,ClearStorage 100clears SysVal_100.ini, thereby clearing all values from SysEx(9901) – SysEx(10000).Example:For k = 1 To 5SysEx(k) = (k-1)^2Next kFor k = 1 to 5Message "n: ", k-1, "Next kn squared: ", SysEx(k)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 134 von 743SysEx$ FunctionThe SysEx$ functions are string variables that are stored in text files and are thereforeremembered between DesignCAD sessions. There are 10,000 strings available: SysEx$(1) –SysEx$(10000). The variables are stored in files of 100 each, as follows:SysStr_001.ini stores SysEx$(1) – SysEx$(100).SysStr_002.ini stores SysEx$(101) – SysEx$(200)etc. throughSysStr_100.ini stores SysEx$(9901 – SysEx$(10000)All SysStr ini files can be cleared by running the ClearStorage$ statement with no arguments.An individual SysStr ini file can be cleared by running ClearStorage$ n, where n is the numberin the ini file's name. For example,ClearStorage$ 100clears SysStr_100.ini, thereby clearing all values from SysEx$(9901) – SysEx$(10000).


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 135 von 743Chapter 3: <strong>Macro</strong> <strong>Language</strong> - DesignCAD Commandsand ParametersParameters to Set PointsDesignCAD <strong>Macro</strong> Commands


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 136 von 743Parameters to set points:When developing a macro, sometimes you want the user to set the points himself, but most ofthe time you want to set the points in the macro. The following macro parameters provide youwith a number of ways to set points where you want them.Remember: if your macro starts with the command >SetStartPoint{} then the coordinates aremeasured from the start point, NOT from the true origin of the drawing.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 137 von 743}Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 138 von 743


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 139 von 743{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 140 von 743Use this to set a point at the nearest quadrant point of a circle or arc.Example:Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 141 von 743DesignCAD <strong>Macro</strong> CommandsThe information is given in the following format:CommandName>CommandName{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 142 von 743


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 143 von 743affects the commands such as Line, Curve, OrthoLine, OrthoLine2, Arrow, Hatch, and Plane,which all accept an arbitrary number of points.)


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 144 von 743<strong>Macro</strong> Command22DBox2DMode2DSelectMode33DSelectModeAAboutDesignCADAcquireAddLayerToGroupAlignObjectsAngleDistanceApplyArrowSizeApplyColorApplyDoubleLineStyleApplyFixedTextApplyLayerApplyLineFillApplyLineStyleApplyLineWidthApplyMaterialApplyTextSizeArcArc2Arc3Arc4Arc5Arc6AreaArrangeIconsArrangeEntitiesByIDArrangeEntitiesByLayerOrderArrayArrowAttribDefAttribNormalDisplayAttributeAutoDimensionBBalloonBatchConvert


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 145 von 743BatchPrintBezierCurveBlockDefineBlockInsertBoxBreakLineCCalculatorCascadeWindowsCenterOfGravityChamferChangeCodePageChangePSTemplatePropertiesCircleCircle2Circle3Circle4CircleTan2LinesCircleTan3LinesCircleTanLineCircularArrayClearDrawingHandleCloseCloseAllColorToolBoxCombineComplementArcConeConstructionLineContourLineConvertTextConvertToMultilineCoordinateBarCopyCopyBitmapCreateLayerGroupCrosshairCrossSectionCursorOptionsCurveCurveToLineCustomColor


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 146 von 743CutCutCornerCutEdgeCutLineCutoffCutoffDel *deprecated – See SectionTrimCutPlaneCylinderDDCADTileDecVDisDeleteCurrentLayoutDeleteLayerFromGroupDeleteLayerGroupDeletePointsDeleteWorkplaneDeSelectDimAngleDimArcDimBaseDimCenterPointDimChamferDimCoordinateDimDiameterDimensionDimensionDistanceOnlyDimExtendDimProgressDimRadiusDimRadProgressDoEntitySelectionDoorDoubleLineBarDoubleLineConvertDoubleLineModeDoubleLineToPlaneDoubleLineToWideLineDragCopyDragMoveDragMoveSelectedPointsDragSelectDrawingHandle


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 147 von 743DrawingInfoDrawSymbolAsBoxDuplicateDuplicateToLayerDwgInDwgOutDxfInDxfOutEEllipseEllipsoidEllipticalArcEllipticalArc2EntitySelectEraseEraseLastErasePresetPointExitExplodeExportPlotFileExtendExtendByDistanceExtrudeExtrudeAlongCurveFFileBackupFilletFilletCornerFilletEdgeFillWideLineFitToAllWindowFitToWindowGGetEntityGravityGridOptionsGroupDefineGroupExplodeGroupPointsMoveHHammer


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 148 von 743HatchHatchFillHatchLineHatchOptionsHatchPositionHelpIndexHelpUsingHemisphereHiddenEdgeHiddenEdgeBySectionHideHideCommandHideRestoreToolbarsHideSecHpglInIID_SHOW_EDGEID_ZOOM_SELECTIONIgesInIgesOutIncVDisInfoBoxInterfereIntersect-1Intersect-2JJoinLLayerCopyLayerOptionsLayerSaveLightLineLineAngleLineDistanceLinePlaneLineSnapLineStyleToolBoxLineToCurveLoadBMPLoadCustomKeysLoadCustomMenu


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 149 von 743LoadPSTemplateLoadToolboxLoadWorkplaneLockXLockYLockZMMainToolBoxMakePlaneMaterialEditMaterialListMaterialToolBoxMergeMidpointMidpoint2MirrorMoveMoveCursorMoveDownMoveLeftMoveRightMoveToBackMoveToBackOfMoveToFrontMoveToFrontOfMoveUpMultilineModeMultiLineStyleEditorNNewNewWindowOObjectRepeatOffScreenBitmapOpenOptionsOriginOriginalSizeOrthoOrthoLine


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 150 von 743OrthoModePPanPaperSpaceConfigurationPaperSpaceModeParallelParallelByDistanceParallelogramPasswordProtectionManagerPastePatchPerimeterPerpendicularFromPerpendicularPlanePerpendicularToPlanePlanesnapPlaneSubtractPlotSortPointMarkPointMovePointSelectPointSelectModePolygonAddPolygonCenterPolygonEdgePolygonIntersectPolygonSelectionPolygonSubtractPolygonXOrPresetPointPresetPointModePrintPrintCurrentViewPrintNowPSViewerBoxPulloutPurgeBlocksPyramidQQShadeQShadeSec


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 151 von 743QuarterCircleQuitRRecursiveGroupExplodeRedoRedrawRedrawAllRegenerateRegenerateAllRemoveDrawingHandlesRemoveToolboxResizingNodesRestoreDCADTileRestoreDefaultMenuReversePointsRoundBoxRoundCylinderRotateRulerRunXSSaveSaveAsSaveAsSymbolSaveBMPSaveCopySaveCurrentViewSaveCustomKeysSaveCustomMenuSavePSTemplateSaveSelectedScrollBarSectionCopySectionCutSectionCutByLineSectionDeleteCutSectionTrimSegmentSelectAddPointSelectAllSelectDeleteSelectDuplicate


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 152 von 743SelectDuplicateToLayerSelectEverythingSelectImageSourceSelectionFilterSelectLayerSelectMirrorSelectModeSelectModeChangeSelectMoveSelectOrthoSelectPreviousSelectScaleSelectScaleOrthoSelectSlantSemiCircleSendAllFilesSendCurrentFileSetColorSetDcadTileSetDimensionOptionsSetDrawingHandleSetGridCenterSetHandleSetPointsSetPrintOptionsSetShadeStyleSetStartPointSetViewSetViewerPointsShadeCommandShadeSectionShadeViewShowAttributesShowConstructionLinesShowDrawingHandlesShowGridShowHideShowSymbolHandlesShowToolboxSketchSliceSliceBySurfaceSmoothLine


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 153 von 743SmoothLine2SmoothOffSmoothOnSmoothSettingSnapGridSnapPreviewModeSnapSizeSnapToolBoxSolidAddSolidDefineSolidExplodeSolidIntersectSolidSegregateSolidSubtractSolidXOrSphereSplitSplit2StatusBarStretchSurfaceAreaSurfaceConnectSurfaceIntersectionSweepSymbolExplodeSymbolLoadTTangentBetweenTangentFromTangentToTextText2DText3DTextArcTextBlockTextOutlineFillTickMarkTileHTileVToolBarTorusTruncatedCone


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 154 von 743Trim1Trim2Trim3TrimDoubleTrimMultiLinesTruncatedConeTubeUUndoUnitsUnitsOfMeasurementUnWorkplaneUserDefinedViewsEditorVVectorConvertViewChangeViewerLeftViewerRightViewReadViewRedoViewSaveViewToolBoxVolumeVPlaneVrmlOutWWallWeldWindowWmfInWmfOutWorkplaneXXyzInZZoomZoomInZoomOutZoomPreviousZoomWindow


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 155 von 743


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 156 von 7432DBox>2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 157 von 7432DDraftingMode>2DDraftingMode{}Deprecated. You should use 2DMode instead. 2DDraftingMode is retained only for backwardscompatibilityCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 158 von 7432DMode>2DMode{}This command toggles 2D Drafting Mode on or off. To determine the current setting, check thevalue of Sys(344).Compatibility: All versionsExample: Test if 2D Drafting Mode is currently active; if not, turn it on.If (NOT Sys(344)) Then>2DMode{}ElseMessage "2D Drafting Mode already active!"End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 159 von 7432DSelectMode>2DSelectMode{}Note: This command forces the program into 2D Selection Mode.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 160 von 7433DSelectMode>3DSelectMode{}Note: This command forces the program into 3D Selection Mode.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 161 von 743AboutDesignCAD>AboutDesignCAD{}Displays the About DesignCAD dialog boxCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 162 von 743Acquire>Acquire{}Acquires an image from a scanner.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 163 von 743AddLayerToGroup>AddLayerToGroup{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 164 von 743AlignObjects>AlignObjects{2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 165 von 743AngleDistance>AngleDistance{2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 166 von 743ApplyArrowSize>ApplyArrowSize{}Applies the current arrowhead size to the selected arrow entities. The current arrowhead sizecan be determined by checking Sys(445) (as of Version 16)Compatibility: All versions. Note that starting with Version 16, arrowhead size is no longer aproportion of text size, but is independent of text size.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 167 von 743ApplyColor>ApplyColor{}Applies the current drawing color to the selected items. The current drawing color's Red,Green, and Blue components can be obtained from Sys(300), (301) and (302).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 168 von 743ApplyDoubleLineStyle>ApplyDoubleLineStyle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 169 von 743ApplyFixedText>ApplyFixedText{ApplyFixedText{ApplyFixedText{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 170 von 743ApplyLayer>ApplyLayer{}Moves the selected items to the current layer. The current layer index can be determined fromSys(3), or the current layername from Sys$(93).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 171 von 743ApplyLineFill>ApplyLineFill{}Applies the current line fill setting to the selected objects (doesn't affect Double Line entities).The current linefill setting can be extracted from Sys(24).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 172 von 743ApplyLineStyle>ApplyLineStyle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 173 von 743ApplyLineWidth>ApplyLineWidth{}Applies the current line width to the selected items. The current Line Width can be extracted (orset) from Sys(4).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 174 von 743ApplyMaterial>ApplyMaterial{}Applies the current material to the selected items. The current material index can be obtainedfrom Sys(349), or the material name from Sys$(91).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 175 von 743ApplyTextSize>ApplyTextSize{}Applies the current text size to the selected items. The current text size can be obtained fromSys(12).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 176 von 743Arc>Arc{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 177 von 743Arc2>Arc2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 178 von 743Arc3>Arc3{Arc3{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 179 von 743Arc4Arc4{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 180 von 743Arc5>Arc5{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 181 von 743Arc6>Arc6{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 182 von 743Area>Area{Pointselect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 183 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 184 von 743ArrangeIcons>ArrangeIcons{}Arranges the minimized view windows.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 185 von 743ArrangeEntitiesByID>ArrangeEntitiesByID{}Sorts all entities so that they display in the order of their internal entity IDs (the 64-bitnumbers exposed through OLE Automation --- not the same as the entity IDs returnedin BasicCAD).This is likely to change all entity IDs reported by BasicCAD!Compatibility: Version 17.1 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 186 von 743ArrangeEntitiesByLayerOrder>ArrangeEntitiesByLayerOrder{}Sorts all entities so that they display in the order of their layers.This is likely to change all entity IDs reported by BasicCAD!Compatibility: Version 17.1 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 187 von 743Array>Array{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 188 von 743Compatibility: All versions, but several new parameter were added in Version 14.Example:>Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 189 von 743Arrow>Arrow{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 190 von 743AttribDef>AttribDef{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 191 von 743AttribNormalDisplay>AttribNormalDisplay{}Has some affect on the display of attributesCompatibility: Version 14 and higherExample:>AttribNormalDisplay{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 192 von 743Attribute>Attribute{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 193 von 743AutoDimension>AutoDimension{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 194 von 743Balloon>Balloon{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 195 von 743BatchConvert>BatchConvert{}Opens the Batch Conversion dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 196 von 743BatchPrint>BatchPrint{}Opens the Batch Print dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 197 von 743BezierCurve>BezierCurve{BezierCurve{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 198 von 743BlockDefine>BlockDefine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 199 von 743BlockInsert>BlockInsert{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 200 von 743Box>Box{SetStartPoint{}>Box{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 201 von 743BreakLine>BreakLine{}Break a multi-segment line into individual line segments.Compatibility: All versionsExample: Draw a 2D box, then break it into individual sides.>2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 202 von 743Calculator>Calculator{}Opens the DesignCAD calculator.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 203 von 743CascadeWindows>CascadeWindows{}Cascades all the drawing view windows.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 204 von 743CenterOfGravity>CenterOfGravity{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 205 von 743Chamfer>Chamfer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 206 von 743ChangeCodePage>ChangeCodePage{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 207 von 743ChangePSTemplateProperties>ChangePSTemplateProperties{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 208 von 743Circle>Circle{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 209 von 743Circle2>Circle2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 210 von 743Circle3>Circle3{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 211 von 743Circle4>Circle4{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 212 von 743CircleTan2Lines>CircleTan2Lines{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 213 von 743CircleTan3Lines>CircleTan3Lines{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 214 von 743CircleTanLine>CircleTanLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 215 von 743CircularArray>CircularArray{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 216 von 743ClearDrawingHandle>ClearDrawingHandle{}Removes the handles from a drawing.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 217 von 743Close>Close{Close{} with caution. You can check the value of Sys(211) to see howmany drawing files are open. If it is only 1, you should either not useClose, or if you use it, follow it IMMEDIATELY with New.Example:>Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 218 von 743CloseAll>CloseAll{Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 219 von 743ColorToolBox>ColorToolbox{}Toggles the visibility of the Color Toolbox.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 220 von 743Combine>Combine{}Combines the selected lines into a single line.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 221 von 743ComplementArc>ComplementArc{}Complements the selected arcs.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 222 von 743Cone>Cone{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 223 von 743ConstructionLine>ConstructionLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 224 von 743ContourLine>ContourLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 225 von 743ConvertText>ConvertText{}Converts the selected text from 2D Text to 3D Text or vice versa.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 226 von 743ConvertToMultiLine>ConvertToMultiLine{}Converts the selected entities to multiline entities.Compatibility: Version 16 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 227 von 743CoordinateBar>CoordinateBar{}Toggles the visibility of the Coordinate Bar.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 228 von 743Copy>Copy{}Copies the selected items to the clipboard.Compatibility: All versionsExample:>Box{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 229 von 743CopyBitmap>CopyBitmap{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 230 von 743CreateLayerGroup>CreateLayerGroup{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 231 von 743Crosshair>Crosshair{}Toggles the crosshairs on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 232 von 743CrossSection>CrossSection{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 233 von 743CursorOptions>CursorOptions{}Opens the Cursor Options window.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 234 von 743Curve>Curve{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 235 von 743CurveToLine>CurveToLine{}Converts a curve to a line, keeping the same points as the nodes of the curve. (The resultingline may not resemble the curve at all.)Compatibility: All versionsExample:>Curve{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 236 von 743CustomColor>CustomColor{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 237 von 743Cut>Cut{}Cuts the selected items from the drawing to the clipboard.Compatibility: All versionsExample:>Box{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 238 von 743CutCorner>CutCorner{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 239 von 743CutEdge>CutEdge{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 240 von 743CutLine>CutLine{2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 241 von 743Cutoff>Cutoff{Box{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 242 von 743CutoffDel>CutoffDel{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 243 von 743CutPlane>CutPlane{Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 244 von 743Cylinder>Cylinder{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 245 von 743DCADTile>DcadTile{}Arranges the view windows in the default DesignCAD arrangement


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 246 von 743DecVDis>DecVDis{}Reduces viewing distance by 10% of current value.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 247 von 743DeleteCurrentLayout>DeleteCurrentLayout{}Deletes the current Paperspace Layout Template, unless it is the last one remaining.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 248 von 743DeleteLayerFromGroup>DeleteLayerFromGroup{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 249 von 743DeleteLayerGroup>DeleteLayerGroup{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 250 von 743DeletePoints>DeletePoints{}Deletes the selected points when points are selected in PointSelectMode.Compatibility: Version 17.1 and higherExample:>2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 251 von 743DeleteWorkplane>DeleteWorkplane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 252 von 743DeSelect>DeSelect{}Clears the selection set.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 253 von 743DimAngle>DimAngle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 254 von 743Compatibility: All versionsExample:>DimAngle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 255 von 743DimArc>DimArc{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 256 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 257 von 743DimBase>DimBase{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 258 von 743}use this same text.*New parameters added in Version 15


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 259 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 260 von 743DimCenterPoint>DimCenterPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 261 von 743DimChamfer>DimChamfer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 262 von 743}*New parameters added in Version 15


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 263 von 743DimCoordinate>DimCoordinate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 264 von 743}on]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 265 von 743DimDiameter>DimDiameter{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 266 von 743-


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 267 von 743Dimension>Dimension{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 268 von 743}*New parameters added in Version 15


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 269 von 743DimensionDistanceOnly>DimensionDistanceOnly{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 270 von 743- Once the DimensionDistanceOnly{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 271 von 743DimExtend>DimExtend{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 272 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 273 von 743DimProgress>DimProgress{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 274 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 275 von 743DimRadius>DimRadius{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 276 von 743}on]


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 277 von 743DimRadProgress>DimRadProgress{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 278 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 279 von 743DoEntitySelection>DoEntitySelection{PresetPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 280 von 743Door>Door{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 281 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 282 von 743DoubleLineBar>DoubleLineBar{}This command toggles the DoubleLineToolbar off or on.Compatibility: All versionsExample:If Not (Sys(232)) Then>DoubleLineBar{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 283 von 743DoubleLineConvert>DoubleLineConvert{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 284 von 743DoubleLineMode>DoubleLineMode{}This command toggles DoubleLine Mode off or on.Compatibility: All versionsExample:If Not (Sys(346)) Then>DoubleLineMode{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 285 von 743DoubleLineToPlane>DoubleLineToPlane{}This command converts selected Double Lines to planes.Compatibility: Version `3 and higherExample:Sys(346) = 0>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 286 von 743DoubleLineToWideLine>DoubleLineToWideLine{}This command converts selected Double Lines to wide lines.Compatibility: Version 13 and higherExample:Sys(346) = 0>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 287 von 743DragCopy>DragCopy{Duplicate{} in that it uses only the primaryselection handle. Therefore with >DragCopy{} it is not possible to makea copy and change the scale and/or orientation of the copy at the sametime.Example:>2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 288 von 743DragMove>DragMove{Move{} in that it uses only the primaryselection handle. Therefore with >DragMove{} it is not possible to movethe object and change its scale and/or orientation at the same time.Example:>2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 289 von 743DragMoveSelectedPoints>DragMoveSelectedPoints{PointSelect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 290 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 291 von 743DragSelect>DragSelect{Type t[0 = select only items inside box, 1 = add items inside box to current selection, 2 = select onlyitems inside or touched by box, 3 = add items inside or touched by box to current selection][for PointSelectMode, 0 = new point selection, 1 = add enclosed points, 2 = remove enclosedpoints, 3 = toggle status of enclosed points]SelectMode3D{}>DragSelect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 292 von 743DrawingHandle>DrawingHandle{DrawingHandle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 293 von 743DrawingInfo>DrawingInfo{}Shows the Drawing Info window.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 294 von 743DrawSymbolAsBox>DrawSymbolAsBox{}Toggles whether DesignCAD draws symbols as boxes (for faster redraws) or actually drawseach entity comprising the symbols.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 295 von 743Duplicate>Duplicate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 296 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 297 von 743DuplicateToLayer>DuplicateToLayer{DuplicateToLayer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 298 von 743DwgInDwgIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 299 von 743DwgOut>DwgOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 300 von 743DxfIn>DxfIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 301 von 743DxfOut>DxfOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 302 von 743Ellipse>Ellipse{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 303 von 743Ellipsoid>Ellipsoid{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 304 von 743EllipticalArc>EllipticalArc{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 305 von 743EllipticalArc2>EllipticalArc2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 306 von 743EntitySelect>EntitySelect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 307 von 743Erase>Erase{}This command erases all selected objects. It is identical to SelectDelete below.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 308 von 743EraseLast>EraseLast{}This command erases the last item that was drawn.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 309 von 743ErasePresetPoint>ErasePresetPoint{}This command erases the last point in the point buffer.Compatibility: All versionsExample: Preset some points, then erase the last one.Sys(1) = 0>PresetPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 310 von 743Exit>Exit{}This closes DesignCAD.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 311 von 743Explode>Explode{}This command explodes the selected compound object (dimensions, grids, symbols, etc.) intoits component pieces.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 312 von 743ExportPlotFile>ExportPlotFile{}This command exports a plotter/cutter/engraver file (HPGL, DMPL, Dhalgren IntermediateFile, etc).Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 313 von 743Extend>Extend{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 314 von 743ExtendByDistance>ExtendByDistance{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 315 von 743Extrude>Extrude{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 316 von 743


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 317 von 743ExtrudeAlongCurve>ExtrudeAlongCurve{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 318 von 743FileBackup>FileBackup{}This command toggles DesignCAD's automatic save of backup file versions. See alsoSys(1008).Compatibility: Version 15 and higherExample:>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 319 von 743Fillet>Fillet{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 320 von 743FilletCorner{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 321 von 743FilletEdge>FilletEdge{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 322 von 743FillWideLine>FillWideLine{}Toggles wide line fill mode off or on.Compatibility: All versionsNote: This command will not affect existing lines. It simply toggles the FillWide Lines setting in the Linestyle toolbox, and will affect any linesdrawn after the change. DesignCAD currently allows a mix of filled andunfilled wide lines in the same drawing.Example: Check to see if Fill Wide Lines is on; if not, set it.If NOT Sys(24) Then>FillWideLines{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 323 von 743FitToAllWindow>FitToAllWindow{}This command performs Fit To Window in all views of the drawing.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 324 von 743FitToWindow>FitToWindow{}This command zooms the drawing in or out so that it will completely fill the view window.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 325 von 743GetEntity>GetEntity{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 326 von 743EndGoto AgainLoop


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 327 von 743Gravity>Gravity{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 328 von 743GridOptions>GridOptions{}Opens the Grid Options folderCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 329 von 743GroupDefine>GroupDefine{}Defines the selected objects as a groupCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 330 von 743GroupExplode>GroupExplode{}Explodes the selected group(s) into individual objectsCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 331 von 743GroupPointsMove>GroupPointsMove{PointSelect{PointSelectMode{}End IfMessage "Now select some points on the object"Retry2:Sys(41) = 2 ' rubberband box for user pointsSetpoint "Set two points for a selection box", 2If Sys(1) < 2 Then Goto Retry2>DragSelect{Pointval x y z 1 ' get the first point the user setGroupPointsMove'>MovePoints{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 332 von 743Hammer>Hammer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 333 von 743Hatch>Hatch{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 334 von 743HatchFill>HatchFill{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 335 von 743HatchLine>HatchLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 336 von 743HatchOptions>HatchOptions{}This command opens the Hatch Options dialog box.Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 337 von 743HatchPosition>HatchPosition{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 338 von 743HelpIndex>HelpIndex{}This command opens the Help index.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 339 von 743HelpUsing>HelpUsing{}This command opens the "Using Help" topic.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 340 von 743Hemisphere>Hemisphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 341 von 743HiddenEdge>HiddenEdge{Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 342 von 743HiddenEdgeBySection>HiddenEdgeBySection{Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 343 von 743Hide>Hide{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 344 von 743HideCommand>HideCommand{}Opens the Hide command dialog box for user interaction.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 345 von 743HideRestoreToolbars>HideRestoreToolbars{}Toggles the visibility of all currently enabled toolbars at once.Compatibility: Version 15 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 346 von 743HideSec>HideSec{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 347 von 743HpglIn>HpglIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 348 von 743ID_SHOW_EDGE>ID_SHOW_EDGE{}This command shows all hidden edges. Since a user-friendly name for the command such as"ShowHiddenEdges" was inadvertently omitted from <strong>Macro</strong>cmd.ini, this uglier name is usedinstead. It still works fine.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 349 von 743ID_ZOOM_SELECTION>ID_ZOOM_SELECTION{}This command zooms the view so that the selected objects fill the view area. Since auser-friendly name for the command such as "ZoomToSelection" was omitted from<strong>Macro</strong>cmd.ini, this uglier name is used instead. It still works fine.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 350 von 743IgesIn>IgesIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 351 von 743IgesOut>IgesOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 352 von 743IncVDis>IncVDis{}Increase viewing distance 10%.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 353 von 743InfoBox>InfoBox{}This command opens the Info Box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 354 von 743Interfere>Interfere{Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 355 von 743Intersect-1>Intersect-1{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 356 von 743Intersect-2>Intersect-2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 357 von 743Join>Join{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 358 von 743LayerCopy>LayerCopy{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 359 von 743LayerOptions>LayerOptions{}This command opens the Layer Options dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 360 von 743LayerSave>LayerSave{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 361 von 743Light>Light{}This command opens the Light Options dialog. The command only works in 3D mode.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 362 von 743Line>Line{}Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 363 von 743LineAngle>LineAngle{Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 364 von 743LineDistance>LineDistance{Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 365 von 743LinePlane>LinePlane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 366 von 743LineSnap>LineSnap{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 367 von 743LineStyleToolBox>LineStyleToolbox{}Toggles the visibility of the Linestyle ToolboxCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 368 von 743LineToCurve>LineToCurve{}This command converts a line entity to a curve entity using the same points as the original line.The resulting curve may not resemble the original line.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 369 von 743LoadBMP>LoadBmp{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 370 von 743LoadCustomKeys>LoadCustomKeys{LoadCustomKeys{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 371 von 743LoadCustomMenu>LoadCustomMenu{LoadCustomMenu{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 372 von 743LoadPSTemplate>LoadPSTemplate{LoadPSTemplate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 373 von 743LoadToolbox>LoadToolbox{LoadToolbox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 374 von 743LoadWorkplane>LoadWorkplane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 375 von 743LockX>LockX{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 376 von 743LockY>LockY{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 377 von 743>LockZ{LockX{Line{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 378 von 743LockZ>LockZ{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 379 von 743Message "Locking Z at 5">LockZ{LockX{Line{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 380 von 743MainToolBox>MainToolbox{}Toggles the visibility of the Main ToolboxCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 381 von 743MakePlane>MakePlane{}This command converts the selected entities into planes of the same shape.Compatibility: All versionsExample:>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 382 von 743MaterialEdit>MaterialEdit{}Opens the Material Options dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 383 von 743MaterialList>MaterialList{}Generates a counted list of the attributes in the drawing.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 384 von 743MaterialToolBox>MaterialToolbox{}Toggles the visibility of the Material ToolboxCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 385 von 743Merge>Merge{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 386 von 743Midpoint>MidPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 387 von 743Midpoint2>MidPoint2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 388 von 743Mirror>Mirror{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 389 von 743Move>Move{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 390 von 743{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 391 von 743MoveCursor>MoveCursor{MoveCursor{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 392 von 743MoveDown>MoveDown{}Rotates the camera below the object.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 393 von 743MoveLeft>MoveLeft{}Rotates the camera to the left.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 394 von 743MovePoints>MovePoints{PointSelect{PointSelectMode{}End IfMessage "Now select some points on the object"Retry2:Sys(41) = 2 ' rubberband box for user pointsSetpoint "Set two points for a selection box", 2If Sys(1) < 2 Then Goto Retry2>DragSelect{Pointval x y z 1 ' get the first point the user set


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 395 von 743MoveRight>MoveRight{}Rotates the camera to the right.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 396 von 743MoveToBack>MoveToBack{}Moves the selected items to the back of the display list (so they appear to be "behind" all otherobjects in the drawing).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 397 von 743MoveToBackOf>MoveToBackOf{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 398 von 743MoveToFront>MoveToFront{}Moves the selected items to the front of the display list (so they appear to be "in front of" allother objects in the drawing).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 399 von 743MoveToFrontOf>MoveToFrontOf{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 400 von 743MoveUp>MoveUp{}Rotates camera toward the top of the object.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 401 von 743MultilineMode>MultilineMode{}Toggles Multiline Mode off and on.Compatibility: Version 16(?) and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 402 von 743MultiLineStyleEditor>MultiLineStyleEditor{}Toggles MultilineStyleEditor off and on.Compatibility: Version 16(?) and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 403 von 743New>New{}Opens a new drawing fileCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 404 von 743NewWindow>NewWindow{}Opens a new view window.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 405 von 743ObjectRepeat>ObjectRepeat{}Deprecated. Same as Array above. Array is the preferred command.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 406 von 743OffScreenBitmap>OffScreenBitmap{}Toggles the OffscreenBitmap option.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 407 von 743Open>Open{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 408 von 743Options>Options{}Opens the Options folder.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 409 von 743Origin>Origin{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 410 von 743OriginalSize>OriginalSize{}Restores the drawing to its original zoom factor and location.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 411 von 743Ortho>Ortho{}Aligns selected objects with the X, Y, and Z axes if the objects are almost parallel to the axes.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 412 von 743OrthoLine>OrthoLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 413 von 743OrthoMode>OrthoMode{}Toggles OrthoMode off or on.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 414 von 743Pan>Pan{}Pan{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 415 von 743PaperSpaceConfiguration>PaperSpaceConfiguration{}Opens the PaperSpace Configuration dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 416 von 743PaperSpaceMode>PaperSpaceMode{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 417 von 743Parallel>Parallel{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 418 von 743ParallelByDistance>ParallelByDistance{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 419 von 743Parallelogram>Parallelogram{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 420 von 743PasswordProtectionManager>PasswordProtectionManager{}Opens the Password Protection Manager dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 421 von 743Paste>Paste{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 422 von 743Patch>Patch{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 423 von 743Perimeter>Perimeter{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 424 von 743PerpendicularFrom>PerpendicularFrom{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 425 von 743PerpendicularPlane>PerpendicularPlane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 426 von 743PerpendicularTo>PerpendicularTo{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 427 von 743Plane>Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 428 von 743Planesnap>PlaneSnap{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 429 von 743PlaneSubtract>PlaneSubtract{Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 430 von 743PlotSort>PlotSort{}This command enables/disables the “Optimize plot by color sorting” option in the Print dialogbox. In this mode DesignCAD sends the drawing to a plotter one color at a time.Compatibility: Version 14(?) and laterExample:>PlotSort{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 431 von 743PointMark>PointMark{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 432 von 743PointMove>PointMove{2DBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 433 von 743PointSelect>PointSelect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 434 von 743PointSelectMode>PointSelectMode{}Toggles Point Select Mode status.Compatibility: All versionsNote: You can check the value of Sys(345) to determine if Point Select Mode iscurrently active.Example: Make sure PointSelectMode is active.If NOT(Sys(345)) Then>PointSelectMode{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 435 von 743PointXYZ>PointXYZ{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 436 von 743PolygonAdd>PolygonAdd{}Adds two or more shapes together to form one continuous shape. The shapes must line in thesame plane.Compatibility: Version 13 and laterExample: Add two circles to form a single shape.>Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 437 von 743PolygonCenter>PolygonCenter{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 438 von 743PolygonEdge>PolygonEdge{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 439 von 743PolygonIntersect>PolygonIntersect{}Finds the common region of two or more shapes.Compatibility: Version 13 and higherExample: Find the intersection of two overlapping circles.>Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 440 von 743PolygonSelection>PolygonSelection{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 441 von 743PolygonSubtract>PolygonSubtract{}Subtracts one or more shapes from another shape.Compatibility: Version 13 and higherExample: Subtract one circle from another overlapping circle.>Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 442 von 743PolygonXOr>PolygonXOr{}Deletes the area common to two shapes.Compatibility: Version 13 and higherExample: Cut away the overlap between two circles.>Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 443 von 743PresetPoint>PresetPoint{Line{PresetPoint{Curve{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 444 von 743End


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 445 von 743PresetPointMode>PresetPointMode{}Toggles Preset Point Mode off and on. You can determine if Preset Point Mode is currentlyactive by testing Sys(1116).Compatibility: Version 15(?) and higherExample: Turn on PresetPointMode if not activeIf (Not Sys(1116)) Then>PresetPointMode{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 446 von 743Print>Print{}Opens the Print command dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 447 von 743PrintCurrentView>PrintCurrentView{}Prints the portion of the drawing that is currently displayed in the active view, sized to fill thepage.Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 448 von 743PrintNow>PrintNow{}Sends the document directly to the default printer, using the most recent print settings.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 449 von 743PSViewerBox>PSViewerBox{}Prompts the user to set points to create paper-space view frame. Only works in Paper SpaceMode.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 450 von 743Pullout>Pullout{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 451 von 743PurgeBlocks>PurgeBlocks{}Deletes unused blocks from the drawing.Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 452 von 743Pyramid>Pyramid{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 453 von 743QShade>QShade{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 454 von 743QShadeSec>QShadeSec{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 455 von 743QuarterCircle>QuarterCircle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 456 von 743Quit>Quit{}Exits DesignCAD.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 457 von 743RecursiveGroupExplode>RecursiveGroupExplode{}Explodes all groups and nested groups that are currently selected. Afterwards the selectedentities are not part of any group.Compatibility: Version 17 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 458 von 743Redo>Redo{}Restores an operation that was previously cancelled with Undo.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 459 von 743Redraw>Redraw{}Refreshes the active view image.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 460 von 743RedrawAll>RedrawAll{}Refreshes the screen image of all views.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 461 von 743Regenerate>Regenerate{}Redraw every entity in the active view.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 462 von 743RegenerateAll>RegenerateAll{}Redraw every entity in the drawing for every view.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 463 von 743RemoveDrawingHandles>RemoveDrawingHandles{}Removes the handles from a drawing. (Identical to ClearDrawingHandle)Compatibility: Version 15 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 464 von 743RemoveToolbox>RemoveToolbox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 465 von 743ResizingNodes>ResizingNodes{}Toggles Resizing nodes for selections on and offCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 466 von 743RestoreDCADTile>RestoreDCADTile{}Restores the default DesignCAD Tile settings.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 467 von 743RestoreDefaultMenu>RestoreDefaultMenu{}Restores the default DesignCAD menu.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 468 von 743ReversePoints>ReversePoints{}Reverses the point order in selected lines, planes, and curves. The apparent shape is notchanged; only the order of points (last-to-first instead of first-to-last)Compatibility: Version 13 and later


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 469 von 743RoundBox>RoundBox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 470 von 743RoundCylinder>RoundCylinder{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 471 von 743Rotate>Rotate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 472 von 743Ruler>Ruler{}Toggles the ruler display on or off (but ruler only displays in 2D Drafting Mode).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 473 von 743RunX>RunX{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 474 von 743Save>Save{}Saves the drawing under its current name; if it has not been saved yet, the SaveAs dialog boxopens.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 475 von 743SaveAs>SaveAs{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 476 von 743SaveAsSymbol>SaveAsSymbol{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 477 von 743SaveBMP>SaveBmp{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 478 von 743SaveCopy>SaveCopy{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 479 von 743SaveCurrentView>SaveCurrentView{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 480 von 743SaveCustomKeys>SaveCustomKeys{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 481 von 743SaveCustomMenu>SaveCustomMenu{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 482 von 743SavePSTemplate>SavePSTemplate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 483 von 743SaveSelected>SaveSelected{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 484 von 743ScrollBar>ScrollBar{}Toggles the scroll bar on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 485 von 743SectionCopy>SectionCopy{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 486 von 743SectionCut>SectionCut{}Same as CutOff above.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 487 von 743SectionCutByLine>SectionCutByLine{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 488 von 743SectionDeleteCut>SectionDeleteCut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 489 von 743SectionTrim>SectionTrim{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 490 von 743Segment>Segment{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 491 von 743SelectAddPoint>SelectAddPoint{Point 1: Point on the entity where a point is to be added.Point 2: The location of the new point.}Adds a new point to a selected line or curve, much as you can manually in Point Select Mode.Caveats:1) You must be in Point Select Mode to use this command effectively.2) Point 1 must be near enough to snap to the intended segment of the line or curve; otherwisePoint 1 will be inserted into the first segment of the entity and the second point ignored.3) If Point 1 is exactly on the ENDPOINT of a given segment of the line or curve (i.e. entity point2 for the first segment, or entity point 3 for the second segment, etc.), the new point is added tothat segment. Knowing this can help avoid the problems of item 2 above. (You should perhapsavoid inserting a point at the very first point in a line or curve unless it is a closed entity.)Compatibility: Version 16 and higherExample:' SelAddPt.d3m' Test of the SelectAddPoint macro command.' First, we'll draw a line to play with>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 492 von 743' Basically, if the first point is too far away from the' segment, the command adds that first point to the FIRST' SEGMENT in the line or curve, and completely ignores the' second point.>SelectAddPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 493 von 743SelectAll>SelectAll{}Selects all editable objects in the drawing.Note: The behavior of SelectAll changed in DesignCAD version 12. SelectAll no longer selectsall entities in the drawing. Instead, it only selects all entities which are both visible and editable.To emulate the old behavior (which selected even hidden and non-editable layers), useSelectEverything.Compatibility: All versions; note behavior change for Versions 13 and higher.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 494 von 743SelectDelete>SelectDelete{}Erases the selected objects. Same as Erase above.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 495 von 743SelectDuplicate>SelectDuplicate{}Same as Duplicate above.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 496 von 743SelectDuplicateToLayer>SelectDuplicateToLayer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 497 von 743SelectEverything>SelectEverything{}SelectEverything selects all entities in the drawing, even those on non-editable layers, andmakes those layers editable. Only password-protected layers are skipped. In Version 12 andolder versions of DesignCAD, this was the behavior of the SelectAll command.Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 498 von 743SelectImageSource>SelectImageSource{}Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 499 von 743SelectionFilter>SelectionFilter{}Opens the Selection Filter dialog box.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 500 von 743SelectLayer>SelectLayer{SelectLayer{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 501 von 743SelectMirror>SelectMirror{}Same as Mirror aboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 502 von 743SelectMode>SelectMode{}Same as PointSelectMode aboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 503 von 743SelectModeChange>SelectModeChange{}Toggles between 2D Selection Mode and 3D Selection Mode.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 504 von 743SelectMove>SelectMove{}Same as Move aboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 505 von 743SelectOrtho>SelectOrtho{}Same as OrthoaboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 506 von 743SelectPrevious>SelectPrevious{}Re-selects the previously selected object(s)Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 507 von 743SelectScale>SelectScale{Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 508 von 743SelectScaleOrtho>SelectScaleOrtho{Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 509 von 743SelectSlant>SelectSlant{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 510 von 743SemiCircle>SemiCircle{SemiCircle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 511 von 743SendAllFiles>SendAllFiles{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 512 von 743SendCurrentFile>SendCurrentFile{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 513 von 743SetColor>SetColor{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 514 von 743SetDCADTile>SetDcadTile{}Makes the current view window arrangement the default DesignCAD tile arrangement. (Notethat there is a separate tile setting for 2D mode and 3D mode).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 515 von 743SetDimensionOptions>SetDimensionOptions{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 516 von 743SetDrawingHandle>SetDrawingHandle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 517 von 743SetGridCenter>SetGridCenter{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 518 von 743SetHandle>SetHandle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 519 von 743SetPointsGets a sequence of points from the user and stores them in the point buffer. It is possible to callthis command with the first one or more points pre-set by the macro. SetPoints is quite similarto the SETPOINT statement, except that this command allows you to preset the initial points,and SETPOINT does not.>SetPoints{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 520 von 743SetPrintOptionsSets certain default print settings.>SetPrintOptions{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 521 von 743SetShadeStyle>SetShadeStyle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 522 von 743SetStartPoint>SetStartPoint{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 523 von 743SetView>SetView{}Interactively changes the viewing angles.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 524 von 743SetViewerPoints>SetViewerPoints{SetViewerPoints{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 525 von 743ShadeCommandShadeCommand{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 526 von 743ShadeSectionShadeSection{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 527 von 743ShadeViewShadeView{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 528 von 743ShowAttributes>ShowAttributes{}Show or hide the visibility of Attribute entities (toggles off and on).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 529 von 743ShowConstructionLines>ShowConstructionLines{}Toggles the display of construction lines.Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 530 von 743ShowDrawingHandles>ShowDrawingHandles{}Toggles the visibility of the drawing handles (if any) for the drawing. (Compatibility: Version 15 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 531 von 743ShowGrid>ShowGrid{}Toggles the Display Grid on or off.Compatibility: All versionsExample: Make sure the display grid is off.If (Sys(15)) Then>ShowGrid{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 532 von 743ShowHide>ShowHide{}Opens the View Options folder.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 533 von 743ShowSymbolHandles>ShowSymbolHandles{}Toggles the visibility of the symbol handles (if any) for all symbols and blocks in the drawing. (Compatibility: Version 15 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 534 von 743ShowToolbox>ShowToolbox{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 535 von 743Sketch>Sketch{}Draws a line using the sketch tool.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 536 von 743Slice>Slice{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 537 von 743SliceBySurface>SliceBySurface{2DMode{}End If>Cylinder{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 538 von 743SmoothLine>SmoothLine{}Smoothes the selected lines by averaging points.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 539 von 743SmoothLine2>SmoothLine2{}Smoothes the selected lines by slope detection.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 540 von 743SmoothOff>SmoothOff{}Toggles facet smoothing off for smooth shading.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 541 von 743SmoothOn>SmoothOn{}Toggles facet smoothing on for smooth shading.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 542 von 743SmoothSetting>SmoothSetting{}This command opens the dialog box for setting the line smoothing preferences. The smoothsettings can also be specified directly by setting Sys functions 1020, 1021, 1022, and 1023Compatibility: Version 13 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 543 von 743SnapGrid>SnapGrid{}Toggles the snap grid on or off.Compatibility: All versionsExample:If Not(Sys(17) Then>SnapGrid{}End If


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 544 von 743SnapPreviewMode>SnapPreviewMode{}Toggles the snap preview cursor on or off.Compatibility: All versionsExample:>SnapPreviewMode{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 545 von 743SnapSize>SnapSize{}same as GridOptions aboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 546 von 743SnapToolBox>SnapToolbox{}Toggles the Snap Toolbox on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 547 von 743SolidAdd>SolidAdd{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 548 von 743SolidDefine>SolidDefine{}Defines the selected entities as a solid.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 549 von 743SolidExplode>SolidExplode{}Explodes the selected solid(s).Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 550 von 743SolidIntersect>SolidIntersect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 551 von 743SolidSegregate>SolidSegregate{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 552 von 743SolidSubtract>SolidSubtract{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 553 von 743SolidXOr>SolidXOr{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 554 von 743Sphere>Sphere{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 555 von 743Split>Split{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 556 von 743Split2>Split2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 557 von 743StatusBar>StatusBar{}Toggles the status bar on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 558 von 743Stretch>Stretch{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 559 von 743SurfaceArea>SurfaceArea{Plane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 560 von 743SurfaceConnect>SurfaceConnect{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 561 von 743SurfaceIntersection>SurfaceIntersection{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 562 von 743Sweep>Sweep{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 563 von 743SymbolExplode>SymbolExplode{}Explodes a symbol into its component pieces.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 564 von 743SymbolLoad>SymbolLoad{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 565 von 743TangentBetween>TangentBetween{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 566 von 743TangentFrom>TangentFrom{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 567 von 743TangentTo>TangentTo{Circle{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 568 von 743Text>Text{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 569 von 743Text2D>Text2D{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 570 von 743Text3D>Text3D{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 571 von 743TextArc>TextArc{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 572 von 743TextBlock>TextBlock{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 573 von 743TextOutlineFill>TextOutlineFill{}Toggles between filled and unfilled text.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 574 von 743TickMark>TickMark{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 575 von 743TileH>TileH{}Tiles the view windows horizontally.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 576 von 743TileV>TileV{}Tiles the view windows vertically.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 577 von 743ToolBar>Toolbar{}Toggles the toolbar on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 578 von 743Torus>Torus{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 579 von 743Trim1>Trim1{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 580 von 743Trim2>Trim2{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 581 von 743Trim3>Trim3{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 582 von 743TrimDouble>TrimDouble{Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 583 von 743TrimMultiLines>TrimMultiLines{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 584 von 743TruncatedCone>TruncatedCone{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 585 von 743Tube>Tube{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 586 von 743Undo>Undo{}Undo the result of the last command.Compatibility: All versionsExample:>Line{Redo{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 587 von 743Units>Units{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 588 von 743UnitsOfMeasurement>UnitsOfMeasurement{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 589 von 743UnWorkplane>UnWorkplane{}Restores the default working plane.Compatibility: All versionsExample: See Workplane.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 590 von 743UserDefinedViewsEditor>UserDefinedViewsEditor{}Opens the editor for user-defined viewsCompatibility: Version 17 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 591 von 743VectorConvert>VectorConvert{}Converts the currently selected entities to line entities.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 592 von 743ViewChange>ViewChange{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 593 von 743ViewerLeft>ViewerLeft{}Rotates the camera to the left.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 594 von 743ViewerRight>ViewerRight{}Rotates the camera to the right.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 595 von 743ViewRead>ViewRead{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 596 von 743ViewRedo>ViewRedo{}Reverts the view settings that were active before the last ZoomPrevious.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 597 von 743ViewSave>ViewSave{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 598 von 743ViewToolBox>ViewToolBox{}TogglesViewing toolbox on or off.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 599 von 743Volume>Volume{Box{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 600 von 743VPlane>VPlane{}same as PerpendicularPlane aboveCompatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 601 von 743VrmlOut>VrmlOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 602 von 743Wall>Wall{}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 603 von 743Weld>Weld{}Welds the selected objects into a single group.Compatibility: All versionsExample:>Line{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 604 von 743Window>Window{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 605 von 743WmfIn>WmfIn{WmfIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 606 von 743WmfOut>WmfOut{Box{WmfOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 607 von 743Workplane>Workplane{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 608 von 743}


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 609 von 743XyzIn>XyzIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 610 von 743Zoom>Zoom{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 611 von 743ZoomIn>ZoomIn{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 612 von 743ZoomOut>ZoomOut{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 613 von 743ZoomPrevious>ZoomPrevious{}Revert to the previous zoom setting.Compatibility: All versions


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 614 von 743ZoomWindow>ZoomWindow{ZoomWindow{


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 615 von 743QUERY and CHANGE ParametersQuery and Change offer the ability to examine and change many kinds of informationabout an entity that has been selected with the Entity statement. Parameters arecategorized by the type of entity they affect. Here is the current list of entity parametersthat can be queried and/or changed. Default aliases for these parameters are declaredin dcadalias.d3i.Common Entity Parameters – the following parameters are common to mostentities:ENT_TYPEENT_LAYERENT_LAYERNAMEENT_COLORENT_LINETYPEENT_LINETYPENAMEENT_LINETYPESCALEENT_LINEWIDTHENT_LINEFILLENT_LINEWEIGHTENT_FIXEDWIDTHENT_SELECTEDENT_NPTSENT_POINTENT_MINBOUNDENT_MAXBOUNDENT_MATERIALENT_MATERIALNAMEENT_NHANDLESENT_GROUPINDEXENT_SOLIDINDEXENT_COLORBYLAYERENT_LINESTYLEBYLAYERDouble Line Entity Parameters – the following parameters are specific to doubleline entities.DoubleLine entity type numbers are:92 – Double Line93 – Double Curve94 – Double Bezier95 – Double Circle/Arc96 – Double Elliptical Arc97 – Double EllipseDL_TRIMDL_WIDTHDL_CAPSDL_FILLDL_ALIGNDL_HATCHDL_HATCHNAME


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 616 von 743DL_HATCHSCALEDL_HATCHANGLECircle/Arc Entity Parameters – the following parameters are specific to circlesand arcs.Circle/Arc entity type numbers are:16 – Circle/Circular Arc95 – Double Circle/ArcCA_CENTERCA_RADIUSCA_STARTANGLECA_ENDANGLECA_SPANANGLECA_DIRECTIONCA_STARTPOINTCA_ENDPOINTEllipse/Elliptical Arc Entity Parameters – the following parameters are specificto ellipses and elliptical arc.:Ellipse/Elliptical Arc entity type numbers are:2 – Ellipse7 – Elliptical Arc96 – Double Elliptical Arc97 – Double EllipseEA_CENTEREA_RADIUS1EA_RADIUS2EA_STARTANGLEEA_ENDANGLEEA_SPANANGLEEA_STARTPOINTEA_ENDPOINTEA_AXIS1EA_AXIS2Text Entity Parameters – the following parameters are specific to text entities.Text entity type numbers are:3 – 3D Text13 – 2D Text15 – Attribute22 – Text Arc71 – Attribute DefinitionT_INSERTIONPOINTT_SIZET_JUSTIFICATION


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 617 von 743T_BOLDT_ITALICT_ANGLET_FONTTYPET_FONTT_2DTEXTT_TEXTAttribute Definition Entity Parameters – the following parameters are specific toattribute definition entities.Attribute Definition entity type numbers are:71 – Attribute DefinitionA_VISIBLEA_TAGA_PROMPTA_CONSTANTA_VALUEText Arc Entity Parameters – the following parameters are specific to text arcentities.Text Arc entity type numbers are:22 – Text ArcTA_CENTERTA_RADIUSTA_STARTANGLETA_ENDANGLETA_SPANANGLETA_STARTPOINTTA_ENDPOINTTA_VSCALETA_DIRECTIONHatch Entity Parameters – the following parameters are specific to hatchentities.Hatch entity type numbers are:17 – HatchH_PATTERNH_PATTERNNAMEH_SCALEH_ANGLEH_TYPEArrow Entity Parameters – the following parameters are specific to arrowentities.Arrow entity type numbers are:25 – Arrow


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 618 von 743AW_TYPEAW_SCALEAW_SIZEAW_DOUBLEDimension Entity Parameters – the following parameters are specific todimension entities.Dimension entity type numbers are:74 – Angle Dimension75 – Linear Dimension76 – Diameter/Radius Dimension77 – Arc Dimension78 – Progressive Radial Dimension79 – Progressive Linear Dimension80 – Chamfer Dimension81 – Coordinate DimensionD_ARROWTYPED_ARROWSCALED_ARROWSIZED_TEXTSIZED_FONTTYPED_FONTD_PRECISIOND_FIXEDTEXTD_TRUNCATEZEROSD_TEXTBOLDD_TEXTITALICD_TEXTFORMATD_TEXTLOCATIONConstruction Line Entity Parameters – the following parameters are specific toconstruction line entities.Construction Line entity type numbers are:68 – Construction LineCL_RAYCL_INSERTIONPOINTCL_DIRECTIONPoint Mark Entity Parameters – the following parameters are specific to pointmark entities.Point Mark entity type numbers are:70 – Point MarkPM_TYPEPM_SIZEPM_CENTERParameters common to all Bitmap entities begin with BM_ and are in the&H0D00 range.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 619 von 743Bitmap entity type numbers are:90 – BitmapBM_INSERTIONPOINTBM_NAMEBM_TYPEBM_WIDTHBM_HEIGHTBM_ANGLEParameters common to all Symbol entities begin with SY_ and are in the&H0E00 range.Symbol entity type numbers are:26 – Symbol (this type includes both blocks and symbols. Check the SY_TYPEparameter to see which one it is.)SY_INSERTIONPOINTSY_NAMESY_TYPESY_XSCALESY_YSCALESY_ZSCALESY_ATTDEFCOUNTSY_ATTDEFTAGSY_ATTDEFPROMPTSY_ATTDEFVALUESY_ATTDEFCONSTANTSY_ATTRIBUTECOUNTSY_ATTRIBUTE


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 620 von 743ENT_TYPE ParameterQuery and Change ParametersENT_TYPEDeclaration: Alias ENT_TYPE &H0101Arguments: One number (an integer), representing the entity type (i.e. line, curve,circle, text, dimension, etc.).Values: See GetAttr or PutAttr for entity type values.Accessibility: Query onlyPurpose: This parameter allows you to determine the entity's type. It gives the sameresult as Sys(90).Query Usage:Query Ent_Type, etypewhere etype is a numeric variable representing the entity's type.Compatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' This should be placed at the top of the macro,' before any Query or Change statements.Entity 1' Load the first entity's data.Query Ent_Type, etype ' Find out the entity's type.If etype = 16 ThenMessage "This is a circle or arc"ElseMessage "This is not a circle or arc."End IfEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 621 von 743ENT_LAYER ParameterQuery and Change ParametersENT_LAYERDeclaration: Alias ENT_LAYER &H0102Arguments: One number (integer, [0, 1000]) representing the layer number.Accessibility: Query/ChangePurpose: This parameter allows you to determine and/or change the entity's layernumber. The Query result is the same as Sys(93).Query Usage:Query Ent_Layer, elayerwhere elayer is a numeric variable to represent the entity's layer.Change UsageChange Ent_Layer, elayerwhere elayer can be a numeric variable or simple expression (noparentheses).Compatibility: Version 14 and higherExample:Include "dcadalias.d3i"Entity 1Query Ent_Layer, elayerIf elayer > 100 and elayer < 199 ThenChange Ent_Layer, 199Update 'ALWAYS Update the entity when done with Change.End IfEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 622 von 743ENT_LAYERNAME Parameter Query and Change ParametersENT_LAYERNAMEDeclaration: Alias ENT_LAYERNAME &H0103Arguments: One string representing the entity's layer name.Accessibility: Query/ChangePurpose: This parameter allows you to determine the name of the entity's host layer.Query Usage:Query Ent_LayerName, elayname$where elayname$ is a string variableChange Usage:Change Ent_LayerName, elayname$where elayname$ can be a string variable or expression. If the specified layername does not exist, the entity's layer will not be changed.Compatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' This should be placed at the top of the macro,' before any Query or Change statements.Entity 1 ' load the first entity's dataQuery Ent_LayerName, elayname$ ' find out the entity's layer nameIf elayname$ = "Floor" ThenMessage "This entity is already on the floor"ElseChange Ent_LayerName, "Floor"Update ' ALWAYS Update the entity when done with ChangeEnd IfEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 623 von 743ENT_COLOR ParameterQuery and Change ParametersENT_COLORDeclaration: Alias ENT_COLOR &H0104Arguments: Three numbers (integers) for the red, green, and blue color components.Accessibility: Query/ChangePurpose: This parameter allows you to determine or change the entity's color. TheQuery results are identical, in order, to Sys(290), Sys(291), and Sys(292).Query Usage:Query Ent_Color, redval, greenval, bluevalwhere redval, greenval,and blueval are numeric variablesChange Usage:Change Ent_Color, redval, greenval, bluevalwhere redval, greenval,and blueval are numeric variables or expressionsCompatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' this should be placed at the very top of the macroEntity 1 ' load the first entity's dataQuery Ent_Color, redval, greenval, blueval ' find out the entity's colorMessage "Current color: ", redval, greenval, bluevalIf redval < 128 Then redval = 192If greenval > 192 Then greenval = 128If blueval >= 128 Then blueval = 0Change Ent_Color, redval, greenval, bluevalUpdate ' ALWAYS Update the entity when done with ChangeEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 624 von 743ENT_LINETYPE Parameter Query and Change ParametersENT_LINETYPEDeclaration: Alias ENT_LINETYPE &H0105Arguments: One number (an integer) representing the linetype.Values: 0 = solid, 1 = Dashed, 2 = Hidden, 3 = Center, 4 = Phantom, 5 = Dot,6 = Dashdot, 7 = Border, 8 = Divide, 9 = Special-1, 10 = Special-2,11 = Special-3, 12 = Special-4.Numbers over 12 are custom line types in their order of definition inDcLstyle.sys.Accessibility: Query/ChangePurpose: This parameter allows you to determine or change the entity's line type index.The Query result is indentical to Sys(91).Query Usage:Query Ent_LineType, eltypewhere eltype is a numeric variableChange UsageChange Ent_LineType, eltypewhere eltype is a numeric variable or expressionCompatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' this should be placed at the very top of the macroEntity 1 ' load the first entity's dataQuery Ent_Linetype, eltype ' find out the entity's linetypeQuery Ent_Layer, elayerIf elayer = 4 and eltype 2 ThenChange Ent_Linetype, 2ElseChange Ent_Linetype, 0End IfUpdate 'ALWAYS Update the entity when done with ChangeEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 625 von 743ENT_LINETYPENAME Parameter Query and Change ParametersENT_LINETYPENAMEDeclaration: Alias ENT_LINETYPENAME &H0106Arguments: One string representing the name of the entity's line type.Accessibility: Query/ChangePurpose: This parameter allows you to determine or change the entity's linetype byname.Query UsageQuery Ent_LineTypeName, eltypename$where eltypename$ is a string variableChange UsageChange Ent_LineTypeName, eltypename$where eltypename$ is a string variable or expressionCompatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' this should be placed at the very top of the macroEntity 1 ' load the first entity's dataQuery Ent_LineTypeName, eltypename$ ' find out the entity's linetype nameQuery Ent_Layer, elayerIf elayer = 7 and eltypename$ "Solid" ThenChange Ent_LinetypeName, "Solid"ElseIf elayer = 8 And eltypename$ "Dashed" ThenChange Ent_LinetypeName, "Dashed"End IfEnd IfUpdate 'ALWAYS Update the entity when done with ChangeEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 626 von 743ENT_LINETYPESCALE Parameter Query and Change ParametersENT_LINETYPESCALEDeclaration: Alias ENT_LINESCALE &H0107Arguments: One number (floating-point) representing the linetype scale.Accessibility: Query/ChangePurpose: This parameter allows you to determine or change the entity's linetype scale.Unlike Sys(97), the Query result is in "real-world" units (i.e. the same value you wouldsee in the Info Box).Query Usage:Query Ent_LineScale, eltypescalewhere eltypescale is a numeric variableChange UsageChange Ent_LineScale, eltypescalewhere eltypescale is a numeric variable or expressionCompatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' this should be placed at the very top of the macroEntity 1 ' load the first entity's dataQuery Ent_LineTypeScale, eltscale ' find out the entity's linetype scaleQuery Ent_Layer, elayerIf elayer = 7 and eltscale 1.5 ThenChange Ent_LinetypeScale, 1.5End IfUpdate 'ALWAYS Update the entity when done with ChangeEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 627 von 743ENT_LINEWIDTH Parameter Query and Change ParametersENT_LINEWIDTHDeclaration: Alias ENT_LINEWIDTH &H0108Argumentes: One number (floating-point) representing the line widthAccessibility: Query/ChangePurpose: This parameter allows you to determine or change the entity's line width.Unlike Sys(98), the Query result is in real-world units (i.e. the same value you wouldsee in the Info Box).Query Usage:Query Ent_LineWidth, elwidthwhere elwidth is a numeric variableChange Usage:Change Ent_LineWidth, elwidthwhere elwidth is a numeric variable or expressionCompatibility: Version 14 and higherExample:Include "dcadalias.d3i" ' this should be placed at the very top of the macroEntity 1 ' load the first entity's dataQuery Ent_LineWidth, elinewidth ' find out the entity's linetype scaleIf elinewidth 0.25 ThenChange Ent_LineWidth, 0.25End IfUpdate 'ALWAYS Update the entity when done with ChangeEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 628 von 743ENT_LINEFILL Parameter Query and Change ParametersENT_LINEFILLDeclaration: Alias ENT_LINEFILL &H0109Arguments: One number (integer [0, 1]) indicating if the line is filled or notValues: 0 = unfilled, 1 = filledAccessibility: Query/ChangePurpose: This parameter allows you to read or change the entity's linefill setting.Query Usage:Query Ent_LineFill, elfilledwhere elfilled is a numeric variableChange Usage:Change Ent_LineFill, elfilledwhere elfilled is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 629 von 743ENT_LINEWEIGHT Parameter Query and Change ParametersENT_LINEWEIGHTDeclaration: Alias ENT_LINEWEIGHT &H010AArguments: One number (floating-point) representing the fixed line width in hundredthsof a millimeterAccessibility: Query/ChangePurpose: This parameter allows you to read or set the entity's fixed line width (a fixedline width remains constant regardless of zoom factor or print scale). The Queryresult is the line weight in millimeters multiplied by 100, the same as Sys(539).Similarly, to change a line weight, multiply the desired width in millimeters by 100.Query Usage:Query Ent_LineWeight, elweightwhere elweight is a numeric variableChange UsageChange Ent_LineWeight, elweightwhere elweight is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 630 von 743ENT_FIXEDWIDTH Parameter Query and Change ParametersENT_FIXEDWIDTHDeclaration: Alias ENT_FIXEDWIDTH &H010BArguments: One number (integer [0, 1]) indicating if the entity uses a fixed weight ornot.Values: 0 = standard width, 1 = fixed width (doesn't scale whenzooming/printing)Accessibility: Query/ChangePurpose: This parameter allows you to determine and change whether the entity usesa fixed line width or not. The Query result is the same value as Sys(538).Query Usage:Query Ent_FixedWidth, elfixedwhere elfixed is a numeric variableChange Usage:Change Ent_FixedWidth, elfixedwhere elfixed is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 631 von 743ENT_SELECTED Parameter Query and Change ParametersENT_SELECTEDAlias ENT_SELECTED &H010CArguments: One number (integer [0,1]) indicating if the entity is selected or not.Values: 0 = not selected, 1 = selectedAccessibility: Query/ChangePurpose: This parameter allows you to determine and change whether the entity isselected or not. The Query result is the same as Sys(96).Query Usage:Query Ent_Selected, eselectedwhere eselected is a numeric variableChange Usage:Change Ent_Selected, eselectedwhere eselected is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 632 von 743ENT_NPTS ParameterQuery and Change ParametersENT_NPTSDeclaration: Alias ENT_NPTS &H010DArguments: One number (integer) indicating how many points are in the entityAccessibility: Query onlyPurpose: This parameter allows you to query how many points are in the entity. TheQuery result is the same as Sys(99)Query Usage:Query Ent_Npts, epointswhere epoints is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 633 von 743ENT_POINT ParameterQuery and Change ParametersENT_POINTDeclaration: Alias ENT_POINT &H010EArguments: One number (integer) representing which point to examine, and threenumbers (floating-point) representing the point's x, y, and z coordinate values.Accessibility: Query/ChangePurpose: This parameter allows you to examine and change the location of a singlepoint in the entity. The results of a Query are the same as the results of a matchingPointval statement. After one or more points have edited using the Changestatement, the entity should be updated using the Update statement. This will beespecially important if you plan to examine the Ent_MinBound and Ent_MaxBoundparameters (below) after changing the points.Query Usage:Query Ent_Point, i, ptX, ptY, ptZwhere i is a numeric variable or expression, and ptX, ptY, and ptZ are numericvariables.Change Usage:Change Ent_Point, i, ptX, ptY, ptZwhere i, ptX, ptY, and ptZ are all numeric variables or expressions.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 634 von 743ENT_MINBOUND Parameter Query and Change ParametersENT_MINBOUNDDeclaration: Alias ENT_MINBOUND &H010FArguments: Three numbers (floating-point) representing the minimum XYX coordinateof the entity's bounding boxAccessibility: Query onlyPurpose: This parameter allows you to find out the minimum X, Y, and Z values of theentity's bounding box.Query Usage:Query Ent_MinBound, minX, minY, minZwhere minX, minY, and minZ are numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 635 von 743ENT_MAXBOUND Parameter Query and Change ParametersENT_MAXBOUNDDeclaration: Alias ENT_MAXBOUND &H0110Arguments: Three numbers (floating-point) representing the maximum XYX coordinateof the entity's bounding boxAccessibility: Query onlyPurpose: This parameter allows you to find out the maximum X, Y, and Z values of theentity's bounding box.Query Usage:Query Ent_MaxBound, maxX, maxY, maxZwhere maxX, maxY, and maxZ are numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 636 von 743ENT_MATERIAL Parameter Query and Change ParametersENT_MATERIALDeclaration: Alias ENT_MATERIAL &H0111Arguments: One number (integer) representing the material's index in the materialtableAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's material property.Query Usage:Query Ent_Material, ematwhere emat is a numeric variableChange Usage:Change Ent_Material, ematwhere emat is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 637 von 743ENT_MATERIALNAME Parameter Query and Change ParametersENT_MATERIALNAMEDeclaration: Alias ENT_MATERIALNAME &H0112Arguments: One string containing the name of the entity's material.Accessibilty: Query/ChangePurpose: This parameter allows you to query or change the entity's material by name.Query Usage:Query Ent_MaterialName, ematname$where ematname$ is a string variableChange Usage:Change Ent_MaterialName, ematname$where ematname$ is a string variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 638 von 743ENT_NHANDLES Parameter Query and Change ParametersENT_NHANDLESDeclaration: Alias ENT_NHANDLES &H0113Arguments: One number (integer) indicating how many "sticky" handles areassociated with the entity.Accessibility: Query/ChangePurpose: This parameter allows you to determine how many handles are set for theentity.Query Usage:Query Ent_Nhandles, ehandleswhere ehandles is a numeric variableChange Usage:Change Ent_Nhandles, ehandleswhere ehandles is a numeric expression or variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 639 von 743ENT_HANDLE Parameter Query and Change ParametersENT_HANDLEDeclaration: Alias ENT_HANDLE &H0114Arguments: one number (integer) for the index of the handle of interest, and threenumbers (floating-point) for the handle's x, y, z coordinate.Accessibility: Query/ChangePurpose: This parameter allows you to query and change the location of a specifichandle on the entity.Note: Modifying an object's points with the Change command (such as moving acircle's center) will not automatically move the handles to match; the handlesmust be explicitly updated using Change Ent_Handle.Query Usage:Query Ent_Handle, hindex, hx, hy, hzwhere hindex is a numeric variable or expression, and hx, hy, and hz arenumeric variables.Change Usage:Change Ent_Handle, hindex, hx, hy, hzwhere hindex, hx, hy, and hz are all numeric variables or expressions.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 640 von 743ENT_GROUPINDEX Parameter Query and Change ParametersENT_GROUPINDEXDeclaration: Alias ENT_GROUPINDEX &H0115Arguments: One number (integer) for the entity's group indexAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's group association.Query Usage:Query Ent_GroupIndex, egroupwhere egroup is a numeric variableChange Usage:Change Ent_GroupIndex, egroupwhere egroup is a numeric expression or variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 641 von 743ENT_SOLIDINDEX Parameter Query and Change ParametersENT_SOLIDINDEXDeclaration: Alias ENT_SOLIDINDEX &H0116Arguments: One number (integer) for the entity's solid indexAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's solid association.Query Usage:Query Ent_SolidIndex, esolidwhere esolid is a numeric variableChange Usage:Change Ent_SolidIndex, esolidwhere esolid is a numeric expression or variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 642 von 743ENT_COLORBYLAYER Parameter Query and Change ParametersENT_COLORBYLAYERDeclaration: Alias ENT_COLORBYLAYER &H0117Arguments: One number (integer) to indicate if the entity takes the color of its hostlayerAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's color association.A value of 1 indicates that the entity is colored depending on its layer; a value of 0indicates that the entity's color is independent of its host layer.Query Usage:Query Ent_ColorByLayer, ecbylayerwhere ecbylayer is a numeric variableChange Usage:Change Ent_ColorByLayer, ecbylayerwhere ecbylayer is a numeric expression or variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 643 von 743ENT_LINESTYLEBYLAYER ParameterQuery and ChangeParametersENT_LINESTYLEBYLAYERDeclaration: Alias ENT_LINESTYLEBYLAYER &H0118Arguments: One number (integer) to indicate if the entity takes the linestyle of its hostlayerAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's linestyleassociation. A value of 1 indicates that the entity's linestyle is set by its layer; avalue of 0 indicates that the entity's linestyle is independent of its host layer.Query Usage:Query Ent_LineStyleByLayer, elsbylayerwhere elsbylayer is a numeric variableChange Usage:Change Ent_LineStyleByLayer, elsbylayerwhere elsbylayer is a numeric expression or variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 644 von 743DL_TRIM ParameterQuery and Change ParametersDL_TRIMDeclaration: Alias DL_TRIM &H0201Arguments: One number (integer [0, 1]) representing the doubleline entity's trim settingValues: 0 = untrimmed, 1 = trimmedAccessibility: Query/ChangePurpose: Allows you to Query or Change the entity's doubleline trim setting.Query Usage:Query DL_TRIM, edltrimwhere edltrim is a numeric variable to hold the trim setting for the entity.Change Usage:Change DL_TRIM, edltrimwhere edltrim is a numeric variable or expression that evaluates to 0 or 1Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 645 von 743DL_WIDTH ParameterQuery and Change ParametersDL_WIDTHDeclaration: Alias DL_WIDTH &H0202Arguments: One number (floating-point) representing the doubleline entity's width.Accessibility: Query/ChangePurpose: This parameter allows you to examine or change the width of a doublelineentity.Query Usage:Query DL_WIDTH, edlwidthwhere edlwidth is a numeric variable to hold the entity's current widthChange Usage:Change DL_WIDTH, edlwidthwhere edlwidth is a numeric variable or expression that specifies the desirednew width.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 646 von 743DL_CAPS ParameterQuery and Change ParametersDL_CAPSDeclaration: Alias DL_CAPS &H0203Arguments: One number (integer [0, 3]) which represents the doubleline entity's capstyle.Values: 0=no endcaps, 1=cap starting end, 2=cap trailing end, 3=cap both endsAccessibility: Query/ChangePurpose: To examine or change the endcap style of the doubleline entity.Query Usage:Query DL_CAPS, edlcapstylewhere edlcapstyle is a numeric variableChange Usage:Change DL_CAPS, edlcapstylewhere edlcapstyle is a numeric variable or expression that evaluates to 0, 1, 2,or 3Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 647 von 743DL_FILL ParameterQuery and Change ParametersDL_FILLDeclaration: Alias DL_FILL &H0204Arguments: One number (integer [0, 1]) which represents the doubleline entity's fillflag.Values: 0 = unfilled, 1 = filled.Accessibility: Query/ChangePurpose: To examine or change the doubleline entity's fill setting.Query Usage:Query DL_FILL, edlfillwhere edlfill is a numeric variableChange Usage:Change DL_FILL, edlfillwhere edlfill is a numeric variable or expression that evaluates to 0 or 1Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 648 von 743DL_ALIGN ParameterQuery and Change ParametersDL_ALIGNDeclaration: Alias DL_ALIGN &H0205Arguments: One numer (integer [0, 1, 2]) that represents the doubleline entity'salignmentValues: 0 = centered, 1 = left, 2 = rightAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's alignment.Query Usage:Query DL_ALIGN, edlalignwhere edlalign is a numeric variableChange Usage:Change DL_ALIGN, edlalignwhere edlalign is a numeric variable or expression that evaluates to 1, 2, or 3Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 649 von 743DL_HATCH ParameterQuery and Change ParametersDL_HATCHDeclaration: Alias DL_HATCH &H0206Arguments: One number (integer) that repesents the index of the fill pattern used bythe entity.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the hatch pattern index usedto fill the double line entity.Query Usage:Query DL_HATCH, edlhatchindexwhere edlhatchindex is a numeric variableChange Usage:Change DL_HATCH, edlhatchindexwhere edlhatchindex is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 650 von 743DL_HATCHNAME Parameter Query and Change ParametersDL_HATCHNAMEDeclaration: Alias DL_HATCHNAME &H0207Arguments: One string that represents the name of the fill pattern used by thedouble-line entity.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the fill pattern name for thedoubleline entity.Query Usage:Query DL_HATCHNAME, edlhatchname$where edlhatchname$ is a string variableChange Usage:Change DL_HATCHNAME, edlhatchname$where edlhatchname$ is a string expression or variable.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 651 von 743DL_HATCHSCALE Parameter Query and Change ParametersDL_HATCHSCALEDeclaration: Alias DL_HATCHSCALE &H0208Arguments: One number (floating-point) representing the hatch pattern scale used bythe entity's fill patternAccessibility: Query/ChangePurpose: This parameter allows you to query or change the scale used by thedoubleline entity's fill pattern.Query Usage:Query DL_HATCHSCALE, edlhatchscalewhere edlhatchscale is a numeric variableChange Usage:Change DL_HATCHSCALE, edlhatchscalewhere edlhatchscale is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 652 von 743DL_HATCHANGLE Parameter Query and Change ParametersDL_HATCHANGLEDeclaration: Alias DL_HATCHANGLE &H0209Arguments: One number (floating-point) representing the angle used by the entity'sfill patternAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's fill pattern angle.Query Usage:Query DL_HATCHANGLE, edlhatchanglewhere edlhatchangle is a numeric variableChange UsageChange DL_HATCHANGLE, edlhatchanglewhere edlhatchangle is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 653 von 743CA_CENTER ParameterQuery and Change ParametersCA_CENTERDeclaration: Alias CA_CENTER &H0301Arguments: Three numbers (floating-point) for the center coordinateAccessibility: Query/ChangePurpose: This parameter allows you to query or change the arc's center coordinate.Changing the center does not affect the radius, or starting or ending angles, or spanangle.Query Usage:Query CA_CENTER, cx, cy, czwhere cx, cy, and cz are all numeric variablesQuery Usage:Change CA_CENTER, cx, cy, czwhere cx, cy, and cz are all numeric variables or expressionsCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 654 von 743CA_RADIUS ParameterQuery and Change ParametersCA_RADIUSDeclaration: Alias CA_RADIUS &H0302Arguments: One floating-point number for the circle/arc's radiusAccessibility: Query/ChangePurpose: This parameter allows you to query or change the circle/arc's radius.Changing the radius does not affect the center location, the starting or endingangles, or the span angle.Query Usage:Query CA_RADIUS, crwhere cr is a numeric variableQuery Usage:Change CA_Radius, crwhere cr is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 655 von 743CA_STARTANGLE Parameter Query and Change ParametersCA_STARTANGLEDeclaration: Alias CA_STARTANGLE &H0303Arguments: One floating-point number for the circle/arc's starting angleAccessibility: Query/ChangePurpose: This parameter allows you to query or change the circle/arc's starting angle.Changing the starting angle does not affect the the span angle, but does affect theending angle.Query Usage:Query CA_StartAngle, csawhere csa is a numeric variableQuery Usage:Change CA_ StartAngle, crwhere csa is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 656 von 743CA_ENDANGLE Parameter Query and Change ParametersCA_ENDANGLEDeclaration: Alias CA_ENDANGLE &H0304Arguments: One floating-point number for the circle/arc's ending angleAccessibility: Query onlyPurpose: This parameter allows you to query the circle's ending angle. The endingangle cannot be modified directly, but it is automatically changed if you modify thestart angle or the span angle.Query Usage:Query CA_EndAngle, ceawhere cea is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 657 von 743CA_SPANANGLE Parameter Query and Change ParametersCA_SPANANGLEDeclaration: Alias CA_SPANANGLE &H0303Arguments: One floating-point number for the circle/arc's span angleAccessibility: Query/ChangePurpose: This parameter allows you to query or change the circle/arc's span angle.Changing the span angle does not affect the the starting angle, but does affect theending angle. Setting the span angle to 0 is treated as setting the span angle to360. If the absolute value of the span angle exceeds 360, the angle's size isreduced by 360 degree increments until it is less than 360. Negative span anglesare allowed.Query Usage:Query CA_SpanAngle, cspanwhere cspan is a numeric variableQuery Usage:Change CA_ SpanAngle, cspanwhere cspan is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 658 von 743CA_DIRECTION Parameter Query and Change ParametersCA_DIRECTIONDeclaration: Alias CA_DIRECTION &H0306Arguments: One number (integer [-1, 1]) for the arc's directionValues: -1 = clockwise, 1 = counterclockwise.Accessibility: Query onlyPurpose: This parameter allows you to query the direction of an arc.Query Usage:Query CA_Direction, cdirwhere cdir is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 659 von 743CA_STARTPOINT Parameter Query and Change ParametersCA_STARTPOINTDeclaration: Alias CA_STARTPOINT &H0307Arguments: Three floating-point numbers for the coordinate of the starting point of thearc or circle.Accessibility: Query onlyPurpose: This parameter allows you to determine the starting coordinate of the circleor arc. The distance from the center to the starting point is the same as the circle'sradius, and the angle of the segment from the center to the starting pointdetermines the arc's start angle.Query Usage:Query CA_StartPoint, sx, sy, szwhere sx, sy, and sz are numeric variablesCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 660 von 743CA_ENDPOINT Parameter Query and Change ParametersCA_ENDPOINTDeclaration: Alias CA_ENDPOINT &H0308Arguments: Three floating-point numbers for the coordinate of the endpoint of the arcor circle.Accessibility: Query onlyPurpose: This parameter allows you to determine the ending point of the circle or arc.Unlike the startpoint, the endpoint's distance from the centerpoint is not guaranteedto be the same as the circle's radius; however, the angle of the line from the centerto the endpoint is the same as the circle's end angle.Query Usage:Query CA_EndPoint, ex, ey, ezwhere ex, ey, and ez are numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 661 von 743EA_CENTER ParameterQuery and Change ParametersEA_CENTERDeclaration: Alias EA_CENTER &H0401Arguments: Three floating-point numbers for the coordinate of the ellipse's centerAccessibility: Query/ChangePurpose: This parameter allows you to query or change the center location of anellipse or elliptical arc. Changing the center will move the entire ellipse - the spanangle, start angle, end angle, and radii remain the same.Query Usage:Query EA_Center, cx, cy, czwhere cx, cy, and cz are numeric variablesChange Usage:Change EA_Center, cx, cy, czwhere cx, cy, and cz are numeric variables or expressionsCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 662 von 743EA_RADIUS1 ParameterQuery and Change ParametersEA_RADIUS1Declaration: Alias EA_RADIUS1 &H0402Arguments: One floating-point number representing the first radius of the ellipse orelliptical arc (this is not necessarily the longest radius).Accessibility: Query/ChangePurpose: This parameter allows you to query and change the first radius of the ellipticalarc. Changes to the first radius will not change the second radius, but may affectthe location of the starting and ending points of the ellipse or elliptical arc, and theendpoint of the first axis.Query Usage:Query EA_Radius1, r1where r1 is a numeric variableChange Usage:Change EA_Radius1, r1where r1 is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 663 von 743EA_RADIUS2 ParameterQuery and Change ParametersEA_RADIUS2Declaration: Alias EA_RADIUS2 &H0403Arguments: One floating-point number representing the second radius of the ellipse orelliptical arc (this is not necessarily the longest radius).Accessibility: Query/ChangePurpose: This parameter allows you to query or change the second radius of theelliptical arc. Changes to the second radius will not change the first radius, but maychange the location of the starting and ending points of an elliptical arc, and theendpoint of the second axis.Query Usage:Query EA_Radius2, r2where r2 is a numeric variableChange Usage:Change EA_Radius2, r2where r2 is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 664 von 743EA_STARTANGLE Parameter Query and Change ParametersEA_STARTANGLEDeclaration: Alias EA_STARTANGLE &H0404Arguments: One floating-point number representing the starting angle of the ellipse orelliptical arc, relative to the first axis.Accessibility: Query/ChangePurpose: This parameter allows you to query and change the starting angle of theelliptical arc. Changing this value will shift the End Angle by an equal amount, butwill not affect the Span Angle.Query Usage:Query EA_StartAngle, estartwhere estart is a numeric variableChange Usage:Change EA_StartAngle, estartwhere estart can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 665 von 743EA_ENDANGLE Parameter Query and Change ParametersEA_ENDANGLEDeclaration: Alias EA_ENDANGLE &H0405Arguments: One floating-point number representing the ending angle of the ellipse orelliptical arc, relative to the first axis.Accessibility: Query onlyPurpose: This parameter allows you to determine the ending angle of the elliptical arc.The End Angle cannot be modified directly, but will be changed if you change theStart Angle or Span AngleQuery Usage:Query EA_EndAngle, eendwhere eend is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 666 von 743EA_SPANANGLE Parameter Query and Change ParametersEA_SPANANGLEDeclaration: Alias EA_SPANANGLE &H0406Arguments: One floating-point number representing the span angle of the ellipse orelliptical arc.Accessibility: Query/ChangePurpose: This parameter allows you to determine the ending angle of the elliptical arc.Changing this value will also change the ending angle. Setting the span angle to 0is treated as setting the span angle to 360. If the absolute value of the span angleexceeds 360, the angle's size is reduced by 360 degree increments until it is lessthan 360. Negative span angles are allowed.Query Usage:Query EA_SpanAngle, espanwhere espan is a numeric variableChange Usage:Change EA_SpanAngle, espanwhere espan can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 667 von 743EA_STARTPOINT Parameter Query and Change ParametersEA_STARTPOINTDeclaration: Alias EA_STARTPOINT &H0407Arguments: Three floating-point numbers representing the coordinate of the beginningof the elliptical arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of theelliptical arc. This point cannot be changed directly.Query Usage:Query EA_StartPoint, xs, ys, zswhere xs, ys, and zs are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 668 von 743EA_ENDPOINT Parameter Query and Change ParametersEA_ENDPOINTDeclaration: Alias EA_ENDPOINT &H0408Arguments: Three floating-point numbers representing the coordinate of the end of theelliptical arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the ending point of the elliptical arc.Unlike the startpoint, the endpoint is not guaranteed to lie exactly on the ellipticalarc's perimeter; however, the angle of the line from the center to the endpoint is thesame as the arc's end angle. This point cannot be changed directly.Query Usage:Query EA_EndPoint, xe, ye, zewhere xe, ye, and ze are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 669 von 743EA_AXIS1 ParameterQuery and Change ParametersEA_AXIS1Declaration: Alias EA_AXIS1 &H0409Arguments: Three floating-point numbers representing the coordinate of the end of thefirst axis (not necessarily the longest axis).Accessibility: Query onlyPurpose: This parameter allows you to determine the endpoint of the first axis of theelliptical arc (the axis from which the starting angle is measured). To change thisvalue, you must change the first radius using EA_RADIUS1.Query Usage:Query EA_Axis1, x1, y1, z1where x1, y1, and z1 are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 670 von 743EA_AXIS2 ParameterQuery and Change ParametersEA_AXIS2Declaration: Alias EA_AXIS1 &H040AArguments: Three floating-point numbers representing the coordinate of the end of thesecond axis (not necessarily the shortest axis).Accessibility: Query onlyPurpose: This parameter allows you to determine the endpoint of the second axis ofthe elliptical arc. To change this value, you must change the second radius withEA_RADIUS2.Query Usage:Query EA_Axis2, x2, y2, z2where x2, y2, and z2 are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 671 von 743T_INSERTIONPOINT Parameter Query and Change ParametersT_INSERTIONPOINTDeclaration: Alias T_INSERTIONPOINT &H0501Arguments: Three floating-point numbers representing the insertion point of the text.Accessibility: Query/ChangePurpose: This parameter allows you to determine where the text is located in thedrawing. For 3D Text, 2D Text, Attributes, or an Attribute Definitions, the insertionpoint will be the justification basepoint -- i.e. lower left corner for left-justified, lowermidpoint for center-justified, and lower right corner for right-justified. For Text Arcs,the insertion point is the center point of the arc.Query Usage:Query T_INSERTIONPOINT, xi, yi, ziwhere xi, yi, and zi are numeric variables.Change Usage:Change T_INSERTIONPOINT, xi, yi, ziwhere xi, yi, and zi are numeric variables or expressions.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 672 von 743T_SIZE ParameterQuery and Change ParametersT_SIZEDeclaration: Alias T_SIZE &H0502Arguments: One floating-point number representing the height of the text in drawingunits.Accessibility: Query/ChangePurpose: This parameter allows you to easily determine and change the text entity'stext size. When changing the text size, the text is re-scaled around the insertionpoint.Query Usage:Query T_SIZE, tsizeWhere tsize is a numeric variableChange Usage:Change T_Size, tsizeWhere tsize can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 673 von 743T_JUSTIFICATION Parameter Query and Change ParametersT_JUSTIFICATIONDeclaration: Alias T_JUSTIFICATION &H0503Arguments: One number (integer [0, 1, 2]) representing the text justificationValues: 0 = left justification, 1 = center justification, 2 = right justification.Accessibility: Query/ChangePurpose: This parameter allows you to determine and change the justification of a textentity. When changing the justification, the text shifts position around the insertionpoint, which does not move.Query Usage:Query T_Justification, tjustwhere tjust is a numeric variableChange Usage:Change T_Justification, tjustwhere tjust can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 674 von 743T_BOLD ParameterQuery and Change ParametersT_BOLDDeclaration: Alias T_BOLD &H0504Arguments: One number (integer [0, 1]) representing whether the text is bold ornormal.Values: 0=normal, 1=boldAccessibility: Query/ChangePurpose: This parameter allows you to determine if a text entity is bold or not. (Boldonly applies to TrueType fonts, not Vector fonts)Query Usage:Query T_Bold, tboldwhere tbold is a numeric variable.Change Usage:Change T_Bold, tboldwhere tbold can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 675 von 743T_ITALIC ParameterQuery and Change ParametersT_ITALICDeclaration: Alias T_ITALIC &H0505Arguments: One number (integer [0, 1]) representing whether the text is italicized.Values: 0 = normal, 1 = italicizedAccessibility: Query/ChangePurpose: This parameter allows you to query and change a text entity's italic state.(Italics can only be applied to TrueType fonts, not Vector fonts).Query Usage:Query T_Italic, titalwhere tital is a numeric variableChange Usage:Change T_Italic, titalwhere tital can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 676 von 743T_ANGLE ParameterQuery and Change ParametersT_ANGLEDeclaration: Alias T_ANGLE &H0506Arguments: One floating-point number representing the text angleAccessibility: Query/ChangePurpose: This parameter allows you to query and change the text angle of the textentity. When you change the angle, the tilt is centered on the insertion point.Query Usage:Query T_Angle, tanglewhere tangle is a numeric variableChange Usage:Change T_Angle, tanglewhere tangle can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 677 von 743T_FONTTYPE Parameter Query and Change ParametersT_FONTTYPEDeclaration: Alias T_FONTTYPE &H0507Arguments: One number (integer [0, 1]) representing the type of font used for this textentity.Values: 0 = TrueType, 1 = VectorAccessibility: Query OnlyPurpose: This parameter allows you to determine the type of font used to display thetext.Query Usage:Query T_FontType, tftypewhere tftype is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 678 von 743T_FONT ParameterQuery and Change ParametersT_FONTDeclaration: Alias T_FONT &H0508Arguments: A string representing the name of the font in use.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the font used to display thetext.Query Usage:Query T_Font, tfont$where tfont$ is a string variableChange Usage:Change T_Font, tfont$where tfont$ can be a string variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 679 von 743T_2DTEXT ParameterQuery and Change ParametersT_2DTEXTDeclaration: Alias T_2DTEXT &H0509Arguments: One number (integer [0, 1]) representing the entity's status as 2D text.Values: 0 = 3D text, 1 = 2D textAccessibility: Query onlyPurpose: This parameter allows you to query if the text entity is displayed in 2D or 3Dformat.Query Usage:Query T_2DText, t2dmodewhere t2dmode is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 680 von 743T_TEXT ParameterQuery and Change ParametersT_TEXTDeclaration: Alias T_TEXT &H050AArguments: One string representing the text displayed by the text entity.Accessibility: Query/ChangePurpose: This parameter allows you to access the text contents of the text entity.Note: you cannot Change the displayed text of an Attribute Definition entity usingthe T_Text parameter. You must use the A_Tag or A_Value parameter to changeits text properties.Query Usage:Query T_Text, ttext$where ttext$ is a string variableChange Usage:Change T_Text, ttext$where ttext$ can be a string variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 681 von 743A_VISIBLE ParameterQuery and Change ParametersA_VISIBLEDeclaration: Alias A_VISIBLE &H0601Arguments: one numeric value (integer [0,1]), indicating whether the attribute definitionis visible or not. This setting will only take effect when the attribute definition is partof a block-- standalone attribute definitions are always visible..Values: 0=invisible, 1 = visibleAccessibility: Query/ChangePurpose: This parameter allows you to query and change an attribute's visibilitysetting. Note that this parameter has the opposite sense of the "Invisible" checkboxin the Info Box. A value of 1 here (visible) would result in the Info Box "Invisible" boxbeing unchecked.Query Usage:Query A_VISIBLE, aviswhere avis is a numeric variableChange Usage:Change A_VISIBLE, aviswhere avis is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 682 von 743A_TAG ParameterQuery and Change ParametersA_TAGDeclaration: Alias A_TAG &H0602Arguments: A string representing the attribute definition's tag or nameAccessibility: Query/ChangePurpose: This parameter allows you to query and change an attribute definition's tag(the text that is visible when it's not part of a block).Query Usage:Query A_Tag, atag$where atag$ is a string variableChange Usage:Change A_Tag, atag$where atag$ can be a string variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 683 von 743A_PROMPT ParameterQuery and Change ParametersA_PROMPTDeclaration: Alias A_PROMPT &H0603Arguments: A string representing the user prompt when a new block containing thisattribute definition is inserted into the drawing.Accessibility: Query/ChangePurpose: This parameter allows you to query and change the prompt string for anattribute definition that is not part of a block.Note: If you try to change the prompt string on a constant attribute definition, thechange will have no effect on the attribute definition. In such a case, you mustfirst remove the Constant parameter, update the entity, and then change theprompt string as desired.Query Usage:Query A_Prompt, aprompt$where aprompt$ is a string variableChange Usage:Change A_Prompt, aprompt$where aprompt$ is a string variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 684 von 743A_CONSTANT Parameter Query and Change ParametersA_CONSTANTDeclaration: Alias A_CONSTANT &H0604Arguments: One number (integer, [0, 1]) representing whether or not the attributedefinition's text contents are fixed.Values: 0=changeable, 1 = constantAccessibility: Query/ChangePurpose: This parameter allows you to query or change the status of the text contentsof an attribute definition (one that is not part of a block).Query Usage:Query A_Constant, aconstwhere aconst is a numeric variableChange Usage:Change A_Constant, aconstwhere aconst can be a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 685 von 743A_VALUE ParameterQuery and Change ParametersA_VALUEDeclaration: Alias A_VALUE &H0605Arguments: One string representing the text contents of the attribute definition -- this isthe text displayed when the attribute definition is part of an inserted block.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the text contents of astand-alone attribute definition (one that is not part of a block).Query Usage:Query A_Value, aval$where aval$ is a string variableChange Usage:Change A_Value, aval$where aval$ can be a string variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 686 von 743A_HORIZONTAL Parameter (new in 15)Query and ChangeParametersA_HORIZONTALDeclaration: Alias A_HORIZONTAL &H0606Arguments: One integer indicating whether the attribute should always be displayed ashorizontal text. If the value is set to one, the T_ANGLE parameter for the currententity will be set to zero.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the text contents of astand-alone attribute definition (one that is not part of a block).Query Usage:Query A_Value, aval$where aval$ is a string variableChange Usage:Change A_Value, aval$where aval$ can be a string variable or expressionCompatibility: Version 15 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 687 von 743TA_CENTER ParameterQuery and Change ParametersTA_CENTERDeclaration: Alias TA_CENTER &H0701Arguments: Three floating-point numbers for the coordinate of the text arc's centerAccessibility: Query/ChangePurpose: This parameter allows you to query or change the center location of a textarc. Changing the center will move the entire text arc - the span angle, start angle,end angle, and radii remain the same.Query Usage:Query TA_Center, cx, cy, czwhere cx, cy, and cz are numeric variablesChange Usage:Change TA_Center, cx, cy, czwhere cx, cy, and cz are numeric variables or expressionsCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 688 von 743TA_RADIUS ParameterQuery and Change ParametersTA_RADIUSDeclaration: Alias TA_RADIUS &H0702Arguments: One floating-point number for the radius of the text arc (the distance fromcenter to inside arc enclosing the text).Accessibility: Query onlyPurpose: This parameter reveals the radius of a text arc.Query Usage:Query TA_Radius, trwhere tr is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 689 von 743TA_STARTANGLE Parameter Query and Change ParametersTA_STARTANGLEDeclaration: Alias TA_STARTANGLE &H0703Arguments: One floating-point number for the starting angle of the text arc.Accessibility: Query onlyPurpose: This parameter reveals the beginning angle of a text arc.Query Usage:Query TA_Radius, tsawhere tsa is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 690 von 743TA_ENDANGLE Parameter Query and Change ParametersTA_ENDANGLEDeclaration: Alias TA_ENDANGLE &H0704Arguments: One floating-point number for the ending angle of the text arc.Accessibility: Query onlyPurpose: This parameter reveals the ending angle of a text arc.Query Usage:Query TA_Radius, teawhere tea is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 691 von 743TA_SPANANGLE Parameter Query and Change ParametersTA_SPANANGLEDeclaration: Alias TA_SPANANGLE &H0705Arguments: One floating-point number for the span angle of the text arc.Accessibility: Query onlyPurpose: This parameter reveals the span angle of a text arc. If you wish to change thespan angle of the text arc, you must increase or decrease the TA_ENDANGLEparameter.Query Usage:Query TA_Radius, tspanwhere tspan is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 692 von 743TA_STARTPOINT Parameter Query and Change ParametersTA_STARTPOINTDeclaration: Alias TA_STARTPOINT &H0706Arguments: Three floating-point numbers representing the coordinate of the beginningof the text arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of the textarc.Query Usage:Query TA_StartPoint, xs, ys, zswhere xs, ys, and zs are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 693 von 743TA_ENDPOINT Parameter Query and Change ParametersTA_ENDPOINTDeclaration: Alias TA_ENDPOINT &H0707Arguments: Three floating-point numbers representing the coordinate of the end of thetext arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of the textarc. This point cannot be changed directly.Query Usage:Query TA_EndPoint, xe, ye, zewhere xe, ye, and ze are all numeric variables.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 694 von 743TA_VSCALE ParameterQuery and Change ParametersTA_VSCALEDeclaration: Alias TA_VSCALE &H0708Arguments: One floating-point number representing the vertical scale factor for thetext.Accessibility: Query only (Query/Change 14.0.004+)Purpose: This parameter allows you to determine the relative height of the text in thetext arc.Query Usage:Query TA_VScale, tvswhere tvs is a numeric variable.Change Usage: (Version 14.0.004+)Change TA_VScale, tvswhere tvs is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 695 von 743TA_DIRECTION Parameter Query and Change ParametersTA_DIRECTIONDeclaration: Alias TA_DIRECTION &H0709Arguments: One number (integer [-1, 1]) representing the direction of the text along thearc.Values: -1 = counterclockwise, 1 = clockwiseAccessibility: Query onlyPurpose: This parameter allows you to determine whether the text is "inside" or"outside" the arc. Clockwise text is on the outside of the arc, while counterclockwisetext is on the inside of the arc.Query Usage:Query TA_Direction, tadirwhere tadir is a numeric variable.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 696 von 743H_PATTERN ParameterQuery and Change ParametersH_PATTERNDeclaration: Alias H_PATTERN &H0801Arguments: One integer value representing the hatch pattern index.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the hatch pattern used by ahatch entity.Query Usage:Query H_Pattern, hpatwhere hpat is a numeric variable.Change Usage:Change H_Pattern, hpatwhere hpat is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 697 von 743H_PATTERNNAME Parameter Query and Change ParametersH_PATTERNNAMEDeclaration: Alias H_PATTERNNAME &H0802Arguments: A string representing the name of the hatch pattern used.Accessibility: Query/ChangePurpose: This parameter allows you to query or change a hatch entity's hatch patternby name.Query Usage:Query H_PatternName, hpat$where hpat$ is a string variable.Change Usage:Change H_PatternName, hpat$where hpat$ is a string variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 698 von 743H_SCALE ParameterQuery and Change ParametersH_SCALEDeclaration: Alias H_SCALE &H0803Arguments: A floating-point number representing the hatch pattern scale.Accessibility: Query/ChangePurpose: This parameter allows you to query and change a hatch entity's scale factor.Query Usage:Query H_Scale, hscalewhere hscale is a numeric variable.Change Usage:Change H_Scale, hscalewhere hscale can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 699 von 743H_ANGLE ParameterQuery and Change ParametersH_ANGLEDeclaration: Alias H_ANGLE &H0804Arguments: A floating-point number representing the angle of the hatch pattern.Accessibility: Query/ChangePurpose: This parameter allows you to determine and/or set a hatch entity's hatchpattern angle.Query Usage:Query H_Angle, hangwhere hang is a numeric variable.Change Usage:Change H_Angle, hangwhere hang is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 700 von 743H_TYPE ParameterQuery and Change ParametersH_TYPEDeclaration: Alias H_TYPE &H0805Arguments: An numeric value (integer [0,1]) indicating whether the hatch pattern is avector fill or a raster fill.Values: 0 = native (vector), 1 = windows (raster).Accessibility: Query OnlyPurpose: This parameter is used to indicate whether the current entity's hatch patternis a vector pattern or a raster pattern. Raster patterns cannot be scaled.Query Usage:Query H_Type, htypewhere htype is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 701 von 743AW_TYPE ParameterQuery and Change ParametersAW_TYPEDeclaration: Alias AW_TYPE &H0901Arguments: A numeric value (integer [0 - 13]) indicating the arrowhead type.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change an arrowentity's arrowhead type.Query Usage:Query AW_Type, artypewhere artype is a numeric variable.Change Usage:Change AW_Type, artypewhere artype can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 702 von 743AW_SCALE ParameterQuery and Change ParametersAW_SCALEDeclaration: Alias AW_SCALE &H0902Arguments: One floating-point value representing the arrowhead scale relative tocurrent text size.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change how large thearrowhead is relative to the current text size. This parameter mirrors the valueshown in the "Size" field in the Info Box.Query Usage:Query AW_Scale, ascalewhere ascale is a numeric variable.Change Usage:Change AW_Scale, ascalewhere ascale can be a numeric variable or expression.Compatibility: Version 14 and higherExample:Include "Dcadalias.d3i"If Sys(80) < 1 Then EndGetSelect 1, jEntity jQuery ENT_Type etypeIf etype 24 ThenMessage "Select an arrow first!"EndEnd IfQuery AW_Type, atypeQuery AW_Scale, ascaleQuery AW_Size, asizeQuery AW_Double, adoublefmt$ = "Type: %d Scale: %0.3f Size: %0.3f Double: %d"Format msg$, fmt$, atype, ascale, asize, adoubleMessage msg$Change AW_Scale, ascale*0.75UpdateRegenEnd


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 703 von 743AW_SIZE ParameterQuery and Change ParametersAW_SIZEDeclaration: Alias AW_SIZE &H0903Arguments: One floating-point value representing the actual arrowhead size.Accessibility: Query/ChangePurpose: This parameter allows you to determine or change the size of the arrowhead.Query Usage:Query AW_Size, asizewhere asize is a numeric variable.Change Usage:Change AW_Size, asizewhere asize can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 704 von 743AW_DOUBLE Parameter Query and Change ParametersAW_DOUBLEDeclaration: Alias AW_DOUBLE &H0904Arguments: One numeric value (integer [0, 1]) indicating whether the arrow isdouble-headed or not.Values: 0 = single-headed, 1 = double-headedAccessibility: Query/ChangePurpose: This parameter can be used to determine or change whether the arrow hasone arrowhead or two.Query Usage:Query AW_Double, adoublewhere adouble is a numeric variable.Change Usage:Change AW_Double, adoublewhere adouble can be a numeric variable or expression.


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 705 von 743D_ARROWTYPE Parameter Query and Change ParametersD_ARROWTYPEDeclaration: Alias D_ARROWTYPE &H0A01Arguments: A numeric value (integer [0 - 13]) indicating the dimension arrowhead type.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change a dimensionentity's arrowhead type.Query Usage:Query D_ArrowType, artypewhere artype is a numeric variable.Change Usage:Change D_ArrowType, artypewhere artype can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 706 von 743D_ARROWSCALE Parameter Query and Change ParametersD_ARROWSCALEDeclaration: Alias D_ARROWSCALE &H0A02Arguments: One floating-point value representing the dimension's arrowhead scalerelative to the dimension text size.Accessibility: Query/ChangePurpose: This parameter is used to determine how large the arrowhead is relative tothe dimension text size. This parameter mirrors the value shown in the "Arrow Size"field in the Info Box.Query Usage:Query D_ArrowScale, ascalewhere ascale is a numeric variable.Change Usage:Change D_ArrowScale, ascalewhere ascale can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 707 von 743D_ARROWSIZE Parameter Query and Change ParametersD_ARROWSIZEDeclaration: Alias D_ARROWSIZE &H0A03Arguments: One floating-point value representing the actual arrowhead size.Accessibility: Query/ChangePurpose: This parameter can be used to determine or change the size of thedimension arrowhead.Query Usage:Query D_ArrowSize, asizewhere asize is a numeric variable.Change Usage:Change D_ArrowSize, asizewhere asize can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 708 von 743D_TEXTSIZE ParameterQuery and Change ParametersD_TEXTSIZEDeclaration: Alias D_TEXTSIZE &H0A04Arguments: One floating-point value representing the text size.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change the size ofthe dimension text.Query Usage:Query D_TextSize, tsizewhere tsize is a numeric variable.Change Usage:Change D_ArrowSize, tsizewhere tsize can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 709 von 743D_FONTTYPE Parameter Query and Change ParametersD_FONTTYPEDeclaration: Alias D_FONTTYPE &H0A05 'R - i (0:true type, 1:vector)Arguments: One number (integer [0, 1]) representing the type of font used for thisdimension entity.Values: 0 = TrueType, 1 = VectorAccessibility: Query OnlyPurpose: This parameter allows you to query the type of font used to display thedimension.Query Usage:Query D_FontType, ftypewhere ftype is a numeric variable.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 710 von 743D_FONT ParameterQuery and Change ParametersD_FONTDeclaration: Alias D_FONT &H0A06Arguments: A string representing the name of the font used by this dimension.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the font used to display thedimension. Changing the font name may also change the D_FontType parameter, if forexample you switch from a TrueType font to a vector font. To specify a vector font, besure to use the font's filename (i.e. use "Simplex2_Win.vfn", not "Simplex 2 forWindows").Query Usage:Query D_Font, dont$where dfont$ is a string variable.Change Usage:Change D_Font, dfont$where dfont$ can be a string variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 711 von 743D_PRECISION Parameter Query and Change ParametersD_PRECISIONDeclaration: Alias D_PRECISION &H0A07Arguments: A number (integer [-7 to 15]) representing the number of digits to bedisplayed to the right of the decimal. Negative values round to increasing powers of10 – for example -3 would round the value off to the nearest thousand. In the caseof fractional formats, the number represents the smallest fractional power of twothat will be measured – for example, 4 will round fractions to the nearest 16th, 5 tothe nearest 32nd, etc.Accessibility: Query/ChangePurpose: This parameter allows you to determine, or specify, how precisely adimension displays the measured distance.Query Usage:Query D_Precision, dprecwhere dprec is a numeric variable.Change Usage:Change D_Precision, dprecwhere dprec can be a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 712 von 743D_FIXEDTEXT Parameter Query and Change ParametersD_FIXEDTEXTDeclaration: Alias D_FIXEDTEXT &H0A09Arguments: A number (integer [0, 1]) indicating whether the dimension displays a fixedstring or the actual measurement.Values: 0 = actual measurement, 1 = fixed textAccessibility: Query OnlyPurpose: This parameter allows you to determine if a dimension is using a fixed stringof text instead of the actual measured value.Query Usage:Query D_FixedText, dfixedwhere dfixed is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 713 von 743D_TRUNCATEZEROS Parameter Query and Change ParametersD_TRUNCATEZEROSDeclaration: Alias D_TRUNCATEZEROS &H0A0AArguments: A number (integer [0, 1]) indicating whether the dimension truncatestrailing zeros from the displayed value.Values: 0 = false (no truncation occurs), 1 = true (trailing zeros removed)Accessibility: Query/ChangePurpose: This parameter allows you to determine or specifiy whether a dimensiondisplays trailing zeros or not.Query Usage:Query D_TruncateZeros, dtruncwhere dtrunc is a numeric variableChange Usage:Change D_TruncateZeros, dtruncwhere dtrunc is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 714 von 743D_TEXTBOLD Parameter Query and Change ParametersD_TEXTBOLDDeclaration: Alias D_TEXTBOLD &H0A0BArguments: A number (integer [0, 1]) indicating whether the dimension text is normal orbold.Values: 0 = normal, 1 = boldAccessibility: Query/ChangePurpose: This parameter allows you to determine or specifiy whether a dimensiondisplays its text in bold style.Query Usage:Query D_TextBold, dboldwhere dbold is a numeric variableChange Usage:Change D_ TextBold, dboldwhere dbold is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 715 von 743D_TEXTITALIC Parameter Query and Change ParametersD_TEXTITALICDeclaration: Alias D_TEXTITALIC &H0A0CArguments: A number (integer [0, 1]) indicating whether the dimension text is italicized.Values: 0 = normal, 1 = italicAccessibility: Query/ChangePurpose: This parameter allows you to determine or specifiy whether a dimensiondisplays its text in italic style.Query Usage:Query D_TextItalic, ditalwhere dital is a numeric variableChange Usage:Change D_ TextItalic, ditalwhere dital is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 716 von 743D_TEXTFORMAT Parameter Query and Change ParametersD_TEXTFORMATDeclaration: Alias D_TEXTFORMAT &H0A13Arguments: One number (integer [0, 1, 2, 3]) representing the numeric format of thedisplayed text.Values: 0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet andfractional inches.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the format used to display thedimension text.Query Usage:Query D_TextFormat, tformatwhere tformat is a numeric variable.Change Usage:Change D_TextFormat, tformatwhere tformat is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 717 von 743D_TEXTLOCATION Parameter Query and Change ParametersD_TEXTLOCATIONDeclaration: Alias D_TEXTLOCATION &H0A14Arguments: One number (integer [0 - 8]) representing the location of the displayed textrelative to the arrows.Values: 0 = centered, 1 = above, 2 = below, 3 = right, 4 = upper right, 5 = lowerright, 6 = left, 7 = upper left, 8 = lower left.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the position of the dimensiontext.Query Usage:Query D_TextPosition, tposwhere tpos is a numeric variable.Change Usage:Change D_ TextPosition, tposwhere tpos is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 718 von 743CL_RAY ParameterQuery and Change ParametersCL_RAYDeclaration: Alias CL_RAY &H0B01Arguments: A number (integer [0, 1]) indicating whether the construction line extendsin one direction or both from the starting point..Values: 0 = bidirectional (line), 1 = unidirectional (ray)Accessibility: Query/ChangePurpose: This parameter allows you to determine or specifiy whether a constructionline extends in one direction or in both.Query Usage:Query CL_RAY, cdirwhere cdir is a numeric variableChange Usage:Change CL_RAY, cdirwhere cdir is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 719 von 743CL_INSERTIONPOINT Parameter Query and Change ParametersCL_INSERTIONPOINTDeclaration: Alias CL_INSERTIONPOINT &H0B02Arguments: Three floating-point numbers for the coordinate of the construction line'sinsertion pointAccessibility: Query/ChangePurpose: This parameter allows you to query or change the starting location of aconstruction line. Changing the insertion point will move the entire construction line- the direction remains the same.Query Usage:Query CL_InsertionPoint, cx, cy, czwhere cx, cy, and cz are numeric variablesChange Usage:Change CL_InsertionPoint, cx, cy, czwhere cx, cy, and cz are numeric variables or expressionsCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 720 von 743CL_DIRECTION Parameter Query and Change ParametersCL_DIRECTIONDeclaration: Alias CL_DIRECTION &H0B03Arguments: Three floating-point numbers for the direction of the construction linerelative to the insertion point. The values of the arguments are relative offsets fromthe insertion point.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the direction of a constructionline.Query Usage:Query CL_Direction, dx, dy, dzwhere dx, dy, and dz are numeric variablesChange Usage:Change CL_InsertionPoint, dx, dy, dzwhere dx, dy, and dz are numeric variables or expressionsCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 721 von 743PM_TYPE ParameterQuery and Change ParametersPM_TYPEDeclaration: Alias PM_TYPE &H0C01Arguments: A number (integer [0, 1, 2, 3, 4]) representing the format of the pointmarkentity.Values: 0 = cross, 1 = cross+circle, 2 = cross+square, 3 = cross+square+circle,4 = filled dotAccessibility: Query/ChangePurpose: This parameter allows you to query or change the shape of a pointmarkentity.Query Usage:Query PM_Type, pmtypewhere pmtype is a numeric variableChange Usage:Change PM_Type, pmtypewhere pmtype is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 722 von 743PM_SIZE ParameterQuery and Change ParametersPM_SIZEDeclaration: Alias PM_SIZE &H0C02Arguments: One floating-point number representing the diameter of the pointmarkAccessibility: Query/ChangePurpose: This parameter allows the programmer to determine or set a pointmark'ssize.Query Usage:Query PM_Size, pmsizewhere pmsize is a numeric variableChange Usage:Change PM_Size, pmsizewhere pmsize is a numeric variable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 723 von 743PM_CENTER ParameterQuery and Change ParametersPM_CENTERDeclaration: Alias PM_CENTER &H0C03Arguments: Three floating point numbers for the x, y, and z components of thepointmark's center location.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine and/or change thecenter location of the pointmark entity.Query Usage:Query PM_Center, pmx, pmy, pmzwhere pmx, pmy, and pmz are numeric variables.Change Usage:Change PM_Center, pmx, pmy, ,pmzwhere pmx, pmy, and pmz are numeric variables or expressions.Compatibility: Version 14 and higherExample:' assumes a point mark has already been drawn and selected.Include "*\dcadalias.d3i"Getselect 1, iEntity iQuery PM_Type, pmtypeQuery PM_Size, pmsizeQuery PM_Center, pmx, pmy, pmzfmt$ = "Type: %d size: %f Center: %f, %f, %f"Format msg$, fmt$, pmtype, pmsize, pmx, pmy, pmzMessage msg$Change PM_Type, (pmtype + 1 mod 5)Change PM_Size, (pmsize/2)Change PM_Center, pmx+1, pmy-5, pmzUpdateRegenQuery PM_Type, pmtypeQuery PM_Size, pmsizeQuery PM_Center, pmx, pmy, pmzfmt$ = "Type: %d size: %f Center: %f, %f, %f"Format msg$, fmt$, pmtype, pmsize, pmx, pmy, pmzMessage msg$End


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 724 von 743BM_INSERTIONPOINT Parameter Query and Change ParametersBM_INSERTIONPOINTDeclaration: Alias BM_INSERTIONPOINT &H0D01Arguments: Three floating-point numbers for the x, y, and z component of the lower leftcorner of the bitmap.Accessibility: Query/ChangePurpose: Ths parameter allows the programmer to locate or move the insertion point ofthe bitmap entity.Query Usage:Query BM_InsertionPoint, bmx, bmy, bmzwhere bmx, bmy, and bmz are numeric variables.Change Usage:Change BM_InsertionPoint, bmx, bmy, bmzwhere bmx, bmy, and bmz are numeric variables or expressions.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 725 von 743BM_NAME ParameterQuery and Change ParametersBM_NAMEDeclaration: Alias BM_NAME &H0D02Arguments: A string containing the original filename of the inserted image (path notincluded).Accessibility: Query OnlyPurpose: This paramer retrieves the original filename used as a source for the bitmapentity.Query Usage:Query BM_Name, bmname$where bmname$ is a string variable.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 726 von 743BM_TYPE ParameterQuery and Change ParametersBM_TYPEDeclaration: Alias BM_TYPE &H0D03Arguments: A number (integer [0, 1]) representing the bitmap type.Values: 0 = external reference, 1 = embedded imageAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine if the image isembedded into the drawing file or if it is an external reference. External referencesmust be sent along with the drawing file if the drawing is to be shared with otherusers.Query Usage:Query BM_Type, bmtypewhere bmtype is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 727 von 743BM_WIDTH ParameterQuery and Change ParametersBM_WIDTHDeclaration: Alias BM_WIDTH &H0D04Arguments: A number representing the width, in pixels, of the original bitmap.Accessibility: Query OnlyPurpose: This parameter allows the programmer to determine the image width.Query Usage:Query BM_Width, bmwidthwhere bmwidth is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 728 von 743BM_HEIGHT ParameterQuery and Change ParametersBM_HEIGHTDeclaration: Alias BM_HEIGHT &H0D05Arguments: A number representing the height, in pixels, of the original bitmap.Accessibility: Query OnlyPurpose: This parameter allows the programmer to determine the image height.Query Usage:Query BM_Height, bmheightwhere bmheight is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 729 von 743BM_ANGLE ParameterQuery and Change ParametersBM_ANGLEDeclaration: Alias BM_ANGLE &H0D06Arguments: A floating-point number representing the rotation angle of the image.Accessibility: Query OnlyPurpose: This parameter allows the programmer to determine the image's rotationangle in the viewing plane.Query Usage:Query BM_Angle, bmanglewhere bmangle is a numeric variableCompatibility: Version 14 and higherExample:' assumes a bitmap has already been loaded and selectedInclude "*\dcadalias.d3i"GetSelect 1, iEntity iQuery BM_Name, bmname$Query BM_InsertionPoint, bmx, bmy, bmzQuery BM_Type, bmtypeQuery BM_Width, bmwidthQuery BM_Height, bmheightQuery BM_Angle, bmanglefmt$ = "Name: %s; Type: %d; Width: %f; height: %f; angle: %f"Format msg$, fmt$, bmname$, bmtype, bmwidth, bmheight, bmangleMessage msg$End


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 730 von 743SY_INSERTIONPOINT Parameter Query and Change ParametersSY_INSERTIONPOINTDeclaration: Alias SY_INSERTIONPOINT &H0E01Arguments: Three floating-point numbers for the x, y, and z component of the lower leftcorner of the bitmap.Accessibility: Query/ChangePurpose: Ths parameter allows the programmer to locate or move the insertion point ofthe symbol or block entity.Query Usage:Query SY_InsertionPoint, sx, sy, szwhere sx, sy, and sz are numeric variables.Change Usage:Change SY_InsertionPoint, sx, sy, szwhere sx, sy, and sz are numeric variables or expressions.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 731 von 743SY_NAME ParameterQuery and Change ParametersSY_NAMEDeclaration: Alias SY_NAME &H0E02Arguments: A string containing the original filename of the symbol (path not included).Accessibility: Query OnlyPurpose: This paramer retrieves the original filename used as a source for the symbolor block entity.Query Usage:Query SY_Name, sname$where sname$ is a string variable.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 732 von 743SY_TYPE ParameterQuery and Change ParametersSY_TYPEDeclaration: Alias SY_TYPE &H0E03Arguments: A number (integer [0, 1]) representing the bitmap type.Values: 0 = external reference, 1 = embedded symbol, 2 = blockAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine if the enitty is anembedded symbol, a reference to an external symbol, or a block. Externalreferences must be sent along with the drawing file if the drawing is to be sharedwith other users.Query Usage:Query BM_Type, stypewhere stype is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 733 von 743SY_XSCALE ParameterQuery and Change ParametersSY_XSCALEDeclaration: Alias SY_XSCALE &H0E04Arguments: A floating-point number representing the symbol's scale factor (or theblock's scale factor along its x axis).Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the scale factor of thesymbol (or x-scale factor of the block). Only blocks can be scaled independentlyalong x, y, and z. Symbols are scaled globally along all three axes.Query Usage:Query SY_XScale, scalexwhere scalex is a numeric variableChange Usage:Change SY_XScale, scalexwhere scalex is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 734 von 743SY_YSCALE ParameterQuery and Change ParametersSY_YSCALEDeclaration: Alias SY_YSCALE &H0E05Arguments: A floating-point number representing the block's scale factor along its yaxis.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the y-scale factor of theblock. Only blocks can be scaled independently along x, y, and z. Symbols arescaled globally along all three axes and only use the SY_XScale parameter.Query Usage:Query SY_YScale, scaleywhere scaley is a numeric variableChange Usage:Change SY_YScale, scaleywhere scaley is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 735 von 743SY_ZSCALE ParameterQuery and Change ParametersSY_ZSCALEDeclaration: Alias SY_ZSCALE &H0E06Arguments: A floating-point number representing the block's scale factor along its zaxis.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the z-scale factor of theblock. Only blocks can be scaled independently along x, y, and z. Symbols arescaled globally along all three axes and only use the SY_XScale parameter.Query Usage:Query SY_ZScale, scalezwhere scalez is a numeric variableChange Usage:Change SY_ZScale, scalezwhere scalez is a numeric variable or expression.Compatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 736 von 743SY_ATTDEFCOUNT Parameter Query and Change ParametersSY_ATTDEFCOUNTDeclaration: Alias SY_ATTDEFCOUNT &H0E07Arguments: An integer representing the number of Attribute Definition entities that arecontained inside the current block entity.Accessibility: Query onlyPurpose: This parameter allows the programmer to determine how many AttributeDefinition entities are inside the block. Using the parameters listed below, it ispossible to iterate through all attribute definitions in a block and retrieve all theattribute definition data.Query Usage:Query SY_AttDefCount, adcountwhere adcount is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 737 von 743SY_ATTDEFTAG Parameter Query and Change ParametersSY_ATTDEFTAGDeclaration: Alias SY_ATTDEFTAG &H0E08Arguments: An integer for the index of the desired Attribute Definition in this block, anda string to hold the Tag value of the indexed Attribute Definition.Accessibility: Query onlyPurpose: This parameter allows the programmer to extract the Tag string from aspecific Attribute Definition in a block.Query Usage:Query SY_AttDefTag, adindex, adtag$where adindex is a numeric variable and adtag$ is a string variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 738 von 743SY_ATTDEFPROMPT Parameter Query and Change ParametersSY_ATTDEFPROMPTDeclaration: Alias SY_ATTDEFPROMPT &H0E09Arguments: An integer for the index of the desired Attribute Definition in this block, anda string to hold the Prompt string of the indexed Attribute Definition.Accessibility: Query onlyPurpose: This parameter allows the programmer to extract the Prompt string from aspecific Attribute Definition in a block.Query Usage:Query SY_AttDefPrompt, adindex, adprompt$where adindex is a numeric variable and adprompt$ is a string variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 739 von 743SY_ATTDEFVALUE Parameter Query and Change ParametersSY_ATTDEFVALUEDeclaration: Alias SY_ATTDEFVALUE &H0E0AArguments: An integer for the index of the desired Attribute Definition in this block, anda string to hold the Value string of the indexed Attribute Definition.Accessibility: Query/ChangePurpose: This parameter allows the programmer to extract the Value text contentsfrom a specific Attribute Definition in a block.Query Usage:Query SY_AttDefValue, adindex, advalue$where adindex is a numeric variable and advalue$ is a string variableChange Usage:Change SY_AttDefValue, adindex, advalue$where adindex is a numeric variable or expression and advalue$ is a stringvariable or expressionCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 740 von 743SY_ATTDEFCONSTANT Parameter Query and Change ParametersSY_ATTDEFCONSTANTDeclaration: Alias SY_ATTDEFCONSTANT &H0E0BArguments: Two integers. The first is the index of the desired Attribute Definition in theblock, and the second (integer [0, 1]) indicates whether the Attribute Definition has aconstant or changeable Value string.Values: 0 = changeable, 1 = constantAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine whether the Value stringof the specified Attribute Definition can be changed..Query Usage:Query SY_AttDefConstant, adconstwhere adconst is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 741 von 743SY_ATTRIBUTECOUNT Parameter Query and Change ParametersSY_ATTRIBUTECOUNTDeclaration: Alias SY_ATTRIBUTECOUNT &H0E0CArguments: An integer representing the number of Attribute entities that are containedinside the current block entity.Accessibility: Query onlyPurpose: This parameter allows the programmer to determine how many Attributeentities are inside the block. Using the parameter listed below, it is possible toiterate through all attribute entities in a block and retrieve all the attribute data.Query Usage:Query SY_AttributeCount, atcountwhere atcount is a numeric variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 742 von 743SY_ATTRIBUTE Parameter Query and Change ParametersSY_ATTRIBUTEDeclaration: Alias SY_ATTRIBUTE &H0E0DArguments: An integer for the index of the desired Attribute entity in this block orsymbol, and a string to hold the text of the indexed Attribute.Accessibility: Query onlyPurpose: This parameter allows the programmer to extract the text contents from aspecific Attribute in a block.Query Usage:Query SY_Attribute, atindex, attext$where atindex is a numeric variable and attext$ is a string variableCompatibility: Version 14 and higher


BasicCAD/<strong>Macro</strong>s DesignCAD BasicCAD <strong>Macro</strong> <strong>Language</strong> Reference Seite 743 von 743SY_ATTDEFVISIBLE Parameter Query and Change ParametersSY_ATTDEFVISIBLEDeclaration: Alias SY_ATTDEFVISIBLE &H0E0EArguments: Two integers. The first is the index of the desired Attribute Definition in theblock, and the second (integer [0, 1]) indicates whether the Attribute Definition valuetext is hidden or visible.Values: 0 = hidden, 1 = visibleAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine whether the Value stringof the specified Attribute Definition is visible or hidden.Query Usage:Query SY_AttDefVisible, adviswhere advis is a numeric variableCompatibility: Version 14 and higher

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!