BasicCAD V17 Reference Manual
A reference manual for creating BasicCAD scripts forDesignCAD™ and DesignCAD™ 3D Max 17
By Kevan Chapman
ContentsWhat's New...........................................................................................................................15
Command Line Invocation of Macros and Executables.........................................................19Usage Note............................................................................................................................20Line Break Character.............................................................................................................21Built-In Constants...................................................................................................................22Hexadecimal Notation............................................................................................................23Macros and Preset Point Mode..............................................................................................24New and Enhanced Sys Functions........................................................................................25New Sys$ Functions..............................................................................................................31
Chapter 1: Macro Language - Statements...............................................................................32BasicCAD Essentials.............................................................................................................34A Note On Filenames.............................................................................................................37BasicCAD Statements...........................................................................................................38ALIAS Statement...................................................................................................................39ANYKEY Statement...............................................................................................................41Assignment Statement...........................................................................................................42BREAK-> Statement..............................................................................................................43CALL Statement.....................................................................................................................45CHAIN Statement..................................................................................................................46CHANGE Statement..............................................................................................................47CLEAR Statement..................................................................................................................48CLEARSTORAGE Statement................................................................................................49CLEARSTORAGE$ Statement..............................................................................................50CLOSE Statement.................................................................................................................51CLS Statement.......................................................................................................................52CMDLINE Statement.............................................................................................................53COLOR Statement.................................................................................................................54DIM Statement.......................................................................................................................55DO WHILE and LOOP Statements........................................................................................56END Statement......................................................................................................................58ENTITY Statement.................................................................................................................59EXIT DO Statement...............................................................................................................60EXIT FOR Statement.............................................................................................................61FOR and NEXT Statements...................................................................................................62FORMAT Statement..............................................................................................................64GET Statement......................................................................................................................67GETATTR Statement.............................................................................................................68GETLAYERPROPS Statement..............................................................................................70GETSELECT Statement........................................................................................................72GETXY Statement.................................................................................................................73GOSUB and RETURN Statements........................................................................................74GOTO Statement...................................................................................................................75IF Statement (single line).......................................................................................................76IF Statement (Group IF).........................................................................................................77
INCLUDE Statement..............................................................................................................78INPUT Statement...................................................................................................................80INPUT # Statement................................................................................................................82LABELS.................................................................................................................................83LAYER Statement..................................................................................................................84LOCATE Statement...............................................................................................................85MESSAGE Statement............................................................................................................86ON ERROR Statement..........................................................................................................87OPEN Statement...................................................................................................................88PARSE Statement.................................................................................................................89POINTVAL Statement............................................................................................................91POPPOINT Statement...........................................................................................................92PRECISION Statement..........................................................................................................93PRINT Statement...................................................................................................................95PRINT # Statement................................................................................................................96PUSHPOINT Statement.........................................................................................................97PUT Statement......................................................................................................................98PUTATTR Statement.............................................................................................................99QUERY Statement...............................................................................................................101REGEN Statement...............................................................................................................103RESUME Statement............................................................................................................104RUN Statement....................................................................................................................105SETLAYERPROPS Statement............................................................................................107SETPOINT Statement..........................................................................................................109SETSELECTEDPOINTS Statement....................................................................................110STOP Statement..................................................................................................................112TAB Statement.....................................................................................................................113UPDATE Statement.............................................................................................................114UPDATELAYER Statement.................................................................................................115WCLOSE Statement............................................................................................................116WINDOW Statement............................................................................................................117
Chapter 2: Macro Language - Functions...............................................................................119Numerical Functions............................................................................................................120System Functions................................................................................................................121String Functions...................................................................................................................122SYS Functions.....................................................................................................................124SYS$ Function.....................................................................................................................144Macro Limitations.................................................................................................................148Macro Language Key Words...............................................................................................149Macro Error Codes...............................................................................................................150SysEx Function....................................................................................................................152SysEx$ Function..................................................................................................................153
Chapter 3: Macro LanguageDesignCAD Commands and Parameters...............................155Parameters to set points:....................................................................................................155
DesignCAD Macro Commands............................................................................................1622...........................................................................................................................................1623...........................................................................................................................................162A...........................................................................................................................................162B...........................................................................................................................................162
C..........................................................................................................................................162D..........................................................................................................................................162E...........................................................................................................................................162F...........................................................................................................................................162G..........................................................................................................................................162H..........................................................................................................................................162I............................................................................................................................................162J...........................................................................................................................................162L...........................................................................................................................................162M..........................................................................................................................................162N..........................................................................................................................................162O..........................................................................................................................................162P...........................................................................................................................................162Q..........................................................................................................................................162R..........................................................................................................................................162S...........................................................................................................................................162T...........................................................................................................................................162U..........................................................................................................................................162V...........................................................................................................................................162W..........................................................................................................................................162X...........................................................................................................................................162Z...........................................................................................................................................162Macro Commands..............................................................................................................1662DBox.................................................................................................................................1802DDraftingMode.................................................................................................................1802DMode..............................................................................................................................1812DSelectMode....................................................................................................................1813DSelectMode....................................................................................................................181AboutDesignCAD...............................................................................................................181Acquire...............................................................................................................................182AddLayerToGroup..............................................................................................................182AlignObjects.......................................................................................................................182AngleDistance....................................................................................................................183ApplyArrowSize..................................................................................................................184ApplyColor..........................................................................................................................184ApplyDoubleLineStyle........................................................................................................184ApplyFixedText...................................................................................................................185ApplyLayer..........................................................................................................................186ApplyLineFill.......................................................................................................................186ApplyLineStyle....................................................................................................................186ApplyLineWidth...................................................................................................................187ApplyMaterial......................................................................................................................187ApplyTextSize.....................................................................................................................187Arc......................................................................................................................................188Arc2....................................................................................................................................188Arc3....................................................................................................................................189Arc4....................................................................................................................................190Arc5....................................................................................................................................191Arc6....................................................................................................................................191Area....................................................................................................................................192ArrangeIcons......................................................................................................................193
Array...................................................................................................................................193Arrow..................................................................................................................................195AttribDef..............................................................................................................................196AttribNormalDisplay............................................................................................................197Attribute..............................................................................................................................197AutoDimension...................................................................................................................198Balloon................................................................................................................................199BatchConvert......................................................................................................................200BatchPrint...........................................................................................................................200BezierCurve........................................................................................................................200BlockDefine........................................................................................................................201BlockInsert..........................................................................................................................202Box......................................................................................................................................203BreakLine...........................................................................................................................203Calculator...........................................................................................................................204CascadeWindows...............................................................................................................205CenterOfGravity..................................................................................................................205Chamfer..............................................................................................................................205ChangeCodePage..............................................................................................................206ChangePSTemplateProperties...........................................................................................207Circle...................................................................................................................................208Circle2................................................................................................................................208Circle3................................................................................................................................209Circle4................................................................................................................................209CircleTan2Lines..................................................................................................................210CircleTan3Lines..................................................................................................................211CircleTanLine.....................................................................................................................212CircularArray.......................................................................................................................212ClearDrawingHandle..........................................................................................................213Close...................................................................................................................................213CloseAll..............................................................................................................................215ColorToolBox......................................................................................................................215Combine.............................................................................................................................216ComplementArc..................................................................................................................216Cone...................................................................................................................................216ConstructionLine.................................................................................................................217ContourLine........................................................................................................................218ConvertText........................................................................................................................219ConvertToMultiLine............................................................................................................219CoordinateBar....................................................................................................................219Copy...................................................................................................................................219CopyBitmap........................................................................................................................220CreateLayerGroup..............................................................................................................221Crosshair............................................................................................................................221CrossSection......................................................................................................................221CursorOptions....................................................................................................................222Curve..................................................................................................................................222CurveToLine.......................................................................................................................223CustomColor.......................................................................................................................223Cut......................................................................................................................................224CutCorner...........................................................................................................................224
CutEdge..............................................................................................................................225CutLine...............................................................................................................................226Cutoff..................................................................................................................................226CutoffDel.............................................................................................................................227CutPlane.............................................................................................................................227Cylinder..............................................................................................................................228DCADTile............................................................................................................................229DecVDis..............................................................................................................................229DeleteCurrentLayout..........................................................................................................229DeleteLayerFromGroup......................................................................................................229DeleteWorkplane................................................................................................................230DeSelect.............................................................................................................................230DimAngle............................................................................................................................230DimArc................................................................................................................................232DimBase.............................................................................................................................234DimCenterPoint..................................................................................................................236DimChamfer.......................................................................................................................237DimCoordinate....................................................................................................................239DimDiameter.......................................................................................................................241Dimension...........................................................................................................................243DimensionDistanceOnly.....................................................................................................245DimExtend..........................................................................................................................247DimProgress.......................................................................................................................249DimRadius..........................................................................................................................251DimRadProgress................................................................................................................253DoEntitySelection...............................................................................................................255Door....................................................................................................................................256DoubleLineBar....................................................................................................................257DoubleLineConvert.............................................................................................................258DoubleLineMode................................................................................................................259DoubleLineToPlane............................................................................................................259DoubleLineToWideLine......................................................................................................260DragCopy...........................................................................................................................260DragMove...........................................................................................................................261DragMoveSelectedPoints...................................................................................................262DragSelect..........................................................................................................................263DrawingHandle...................................................................................................................264DrawingInfo........................................................................................................................264DrawSymbolAsBox.............................................................................................................264Duplicate.............................................................................................................................265DuplicateToLayer...............................................................................................................266DwgIn.................................................................................................................................266DwgOut...............................................................................................................................267DxfIn...................................................................................................................................268DxfOut................................................................................................................................269Ellipse.................................................................................................................................270Ellipsoid..............................................................................................................................270EllipticalArc.........................................................................................................................271EllipticalArc2.......................................................................................................................271EntitySelect.........................................................................................................................272Erase..................................................................................................................................272
EraseLast...........................................................................................................................273ErasePresetPoint................................................................................................................273Exit......................................................................................................................................273Explode...............................................................................................................................274ExportPlotFile.....................................................................................................................274Extend................................................................................................................................274ExtendByDistance..............................................................................................................275Extrude...............................................................................................................................275ExtrudeAlongCurve............................................................................................................277FileBackup..........................................................................................................................278Fillet....................................................................................................................................278FilletCorner.........................................................................................................................279FilletEdge............................................................................................................................280FillWideLine........................................................................................................................280FitToAllWindow...................................................................................................................281FitToWindow.......................................................................................................................281GetEntity.............................................................................................................................281Gravity................................................................................................................................283GridOptions........................................................................................................................283GroupDefine.......................................................................................................................283GroupExplode.....................................................................................................................283Hammer..............................................................................................................................284Hatch..................................................................................................................................285HatchFill..............................................................................................................................286HatchLine...........................................................................................................................287HatchOptions......................................................................................................................288HatchPosition.....................................................................................................................288HelpIndex...........................................................................................................................288HelpUsing...........................................................................................................................289Hemisphere........................................................................................................................289HiddenEdge........................................................................................................................290HiddenEdgeBySection........................................................................................................291Hide....................................................................................................................................292HideCommand....................................................................................................................293HideRestoreToolbars..........................................................................................................293HideSec..............................................................................................................................293HpglIn.................................................................................................................................294IgesIn..................................................................................................................................294IgesOut...............................................................................................................................295IncVDis...............................................................................................................................295InfoBox...............................................................................................................................295Interfere..............................................................................................................................296Intersect-1...........................................................................................................................296Intersect-2...........................................................................................................................296Join.....................................................................................................................................297LayerCopy..........................................................................................................................298LayerOptions......................................................................................................................298LayerSave..........................................................................................................................299Light....................................................................................................................................299Line.....................................................................................................................................300LineAngle............................................................................................................................300
LineDistance.......................................................................................................................301LinePlane............................................................................................................................302LineSnap............................................................................................................................302LineStyleToolBox................................................................................................................302LineToCurve.......................................................................................................................302LoadBMP............................................................................................................................303LoadCustomKeys...............................................................................................................303LoadCustomMenu..............................................................................................................304LoadPSTemplate................................................................................................................304LoadToolbox.......................................................................................................................305LoadWorkplane..................................................................................................................305LockX..................................................................................................................................305LockY..................................................................................................................................306LockZ..................................................................................................................................308MainToolBox.......................................................................................................................310MakePlane..........................................................................................................................310MaterialEdit.........................................................................................................................310MaterialList.........................................................................................................................311MaterialToolBox..................................................................................................................311Merge.................................................................................................................................311Midpoint..............................................................................................................................312Midpoint2............................................................................................................................312Mirror..................................................................................................................................313Move...................................................................................................................................313MoveCursor........................................................................................................................315MoveDown..........................................................................................................................315MoveLeft.............................................................................................................................315MoveRight..........................................................................................................................316MoveToBack.......................................................................................................................316MoveToBackOf...................................................................................................................316MoveToFront......................................................................................................................316MoveToFrontOf..................................................................................................................317MoveUp..............................................................................................................................317MultilineMode.....................................................................................................................317MultiLineStyleEditor............................................................................................................317New.....................................................................................................................................318NewWindow........................................................................................................................318ObjectRepeat......................................................................................................................318OffScreenBitmap................................................................................................................318Open...................................................................................................................................319Options...............................................................................................................................319Origin..................................................................................................................................319OriginalSize........................................................................................................................320Ortho...................................................................................................................................320OrthoLine............................................................................................................................320OrthoMode..........................................................................................................................320Pan.....................................................................................................................................321PaperSpaceConfiguration..................................................................................................321PaperSpaceMode...............................................................................................................321Parallel................................................................................................................................321ParallelByDistance.............................................................................................................322
Parallelogram.....................................................................................................................323PasswordProtectionManager.............................................................................................323Paste..................................................................................................................................323Patch..................................................................................................................................324Perimeter............................................................................................................................325PerpendicularFrom.............................................................................................................326PerpendicularPlane............................................................................................................326PerpendicularTo.................................................................................................................327Plane..................................................................................................................................328Planesnap...........................................................................................................................328PlaneSubtract.....................................................................................................................328PlotSort...............................................................................................................................329PointMark...........................................................................................................................330PointMove...........................................................................................................................330PointSelect.........................................................................................................................331PointSelectMode................................................................................................................331PointXYZ............................................................................................................................331PolygonAdd........................................................................................................................332PolygonCenter....................................................................................................................332PolygonEdge......................................................................................................................333PolygonIntersect.................................................................................................................334PolygonSelection................................................................................................................334PolygonSubtract.................................................................................................................335PolygonXOr........................................................................................................................335PresetPoint.........................................................................................................................336PresetPointMode................................................................................................................337Print....................................................................................................................................338PrintCurrentView................................................................................................................338PrintNow.............................................................................................................................338PSViewerBox......................................................................................................................338Pullout.................................................................................................................................339PurgeBlocks.......................................................................................................................339Pyramid..............................................................................................................................340QShade..............................................................................................................................340QShadeSec........................................................................................................................341QuarterCircle......................................................................................................................342Quit.....................................................................................................................................342RecursiveGroupExplode.....................................................................................................343Redo...................................................................................................................................343Redraw...............................................................................................................................343RedrawAll...........................................................................................................................343Regenerate.........................................................................................................................344RegenerateAll.....................................................................................................................344RemoveDrawingHandles....................................................................................................344RemoveToolbox.................................................................................................................344ResizingNodes...................................................................................................................345RestoreDCADTile...............................................................................................................345RestoreDefaultMenu...........................................................................................................345ReversePoints....................................................................................................................345RoundBox...........................................................................................................................346RoundCylinder....................................................................................................................346
Rotate.................................................................................................................................347Ruler...................................................................................................................................348RunX...................................................................................................................................348Save....................................................................................................................................348SaveAs...............................................................................................................................348SaveAsSymbol...................................................................................................................350SaveBMP............................................................................................................................351SaveCopy...........................................................................................................................351SaveCurrentView................................................................................................................352SaveCustomKeys...............................................................................................................353SaveCustomMenu..............................................................................................................353SavePSTemplate................................................................................................................353SaveSelected.....................................................................................................................354ScrollBar.............................................................................................................................354SectionCopy.......................................................................................................................354SectionCut..........................................................................................................................355SectionCutByLine...............................................................................................................355SectionDeleteCutoff............................................................................................................356SectionTrim........................................................................................................................356Segment.............................................................................................................................357SelectAddPoint...................................................................................................................357SelectAll..............................................................................................................................359SelectDelete.......................................................................................................................360SelectDuplicate...................................................................................................................360SelectDuplicateToLayer.....................................................................................................360SelectEverything.................................................................................................................360SelectImageSource............................................................................................................361SelectionFilter.....................................................................................................................361SelectLayer.........................................................................................................................361SelectMirror........................................................................................................................362SelectMode.........................................................................................................................362SelectModeChange............................................................................................................362SelectMove.........................................................................................................................363SelectOrtho.........................................................................................................................363SelectPrevious....................................................................................................................363SelectScale.........................................................................................................................363SelectScaleOrtho................................................................................................................364SelectSlant.........................................................................................................................364SemiCircle..........................................................................................................................365SendAllFiles........................................................................................................................366SendCurrentFile.................................................................................................................366SetColor..............................................................................................................................366SetDCADTile......................................................................................................................366SetDimensionOptions.........................................................................................................367SetDrawingHandle..............................................................................................................368SetGridCenter.....................................................................................................................368SetHandle...........................................................................................................................369SetPoints............................................................................................................................370>SetPoints..........................................................................................................................370}...........................................................................................................................................370SetPrintOptions..................................................................................................................371
SetShadeStyle....................................................................................................................371SetStartPoint......................................................................................................................372SetView..............................................................................................................................372SetViewerPoints.................................................................................................................373ShadeCommand.................................................................................................................373ShadeSection.....................................................................................................................373ShadeView.........................................................................................................................374ShowAttributes...................................................................................................................374ShowConstructionLines......................................................................................................375ShowDrawingHandles........................................................................................................375ShowGrid............................................................................................................................375ShowHide...........................................................................................................................375ShowSymbolHandles.........................................................................................................376ShowToolbox......................................................................................................................376Sketch.................................................................................................................................376Slice....................................................................................................................................376SliceBySurface...................................................................................................................377SmoothLine........................................................................................................................378SmoothLine2......................................................................................................................379SmoothOff..........................................................................................................................379SmoothOn..........................................................................................................................379SmoothSetting....................................................................................................................379SnapGrid............................................................................................................................379SnapPreviewMode.............................................................................................................380SnapSize............................................................................................................................380SnapToolBox......................................................................................................................380SolidAdd.............................................................................................................................381SolidDefine.........................................................................................................................381SolidExplode.......................................................................................................................382SolidIntersect......................................................................................................................382SolidSegregate...................................................................................................................382SolidSubtract......................................................................................................................383SolidXOr.............................................................................................................................384Sphere................................................................................................................................384Split.....................................................................................................................................385Split2...................................................................................................................................385StatusBar............................................................................................................................386Stretch................................................................................................................................386SurfaceArea........................................................................................................................387SurfaceConnect..................................................................................................................387SurfaceIntersection.............................................................................................................388Sweep.................................................................................................................................389SymbolExplode...................................................................................................................390SymbolLoad........................................................................................................................390TangentBetween................................................................................................................391TangentFrom......................................................................................................................391TangentTo..........................................................................................................................392Text.....................................................................................................................................392Text2D................................................................................................................................393Text3D................................................................................................................................394TextArc...............................................................................................................................395
TextBlock............................................................................................................................396TextOutlineFill.....................................................................................................................397TickMark.............................................................................................................................397TileH...................................................................................................................................398TileV....................................................................................................................................398ToolBar...............................................................................................................................399Torus...................................................................................................................................399Trim1...................................................................................................................................399Trim2...................................................................................................................................400Trim3...................................................................................................................................401TrimDouble.........................................................................................................................402TrimMultiLines....................................................................................................................403TruncatedCone...................................................................................................................403Tube....................................................................................................................................404Undo...................................................................................................................................405Units....................................................................................................................................405UnitsOfMeasurement..........................................................................................................406UnWorkplane......................................................................................................................407UserDefinedViewsEditor.....................................................................................................407VectorConvert.....................................................................................................................407ViewChange.......................................................................................................................407ViewerLeft...........................................................................................................................408ViewerRight........................................................................................................................408ViewRead...........................................................................................................................409ViewRedo...........................................................................................................................409ViewSave............................................................................................................................409ViewToolBox.......................................................................................................................409Volume...............................................................................................................................410VPlane................................................................................................................................410VrmlOut..............................................................................................................................410Wall.....................................................................................................................................411Weld....................................................................................................................................411Window...............................................................................................................................412WmfIn.................................................................................................................................413WmfOut..............................................................................................................................413XyzIn...................................................................................................................................415Zoom...................................................................................................................................416ZoomIn...............................................................................................................................416ZoomOut.............................................................................................................................416ZoomPrevious....................................................................................................................417ZoomWindow......................................................................................................................417
QUERY and CHANGE Parameters.....................................................................................419Common Entity Parameters...............................................................................................419Double Line Entity Parameters...........................................................................................419Circle/Arc Entity Parameters..............................................................................................420Ellipse/Elliptical Arc Entity Parameters...............................................................................420Text Entity Parameters.......................................................................................................421Attribute Definition Entity Parameters.................................................................................421Text Arc Entity Parameters.................................................................................................422Hatch Entity Parameters.....................................................................................................422Arrow Entity Parameters.....................................................................................................422
Dimension Entity Parameters.............................................................................................423Construction Line Entity Parameters..................................................................................423Point Mark Entity Parameters.............................................................................................423Bitmap Entity Parameters...................................................................................................424Symbol Entity Parameters..................................................................................................424ENT_TYPE Parameter.......................................................................................................425ENT_LAYER Parameter.....................................................................................................425ENT_LAYERNAME Parameter..........................................................................................426ENT_COLOR Parameter....................................................................................................426ENT_LINETYPE Parameter...............................................................................................427ENT_LINETYPENAME Parameter.....................................................................................428ENT_LINETYPESCALE Parameter...................................................................................429ENT_LINEWIDTH Parameter.............................................................................................429ENT_LINEFILL Parameter.................................................................................................429ENT_LINEWEIGHT Parameter..........................................................................................430ENT_FIXEDWIDTH Parameter..........................................................................................430ENT_SELECTED Parameter..............................................................................................431ENT_NPTS Parameter.......................................................................................................431ENT_POINT Parameter......................................................................................................432ENT_MINBOUND Parameter.............................................................................................432ENT_MAXBOUND Parameter............................................................................................432ENT_MATERIAL Parameter...............................................................................................433ENT_MATERIALNAME Parameter....................................................................................433ENT_NHANDLES Parameter.............................................................................................434ENT_HANDLE Parameter..................................................................................................434ENT_GROUPINDEX Parameter........................................................................................435ENT_SOLIDINDEX Parameter...........................................................................................435ENT_COLORBYLAYER Parameter...................................................................................435ENT_LINESTYLEBYLAYER Parameter.............................................................................436DL_TRIM Parameter..........................................................................................................436DL_WIDTH Parameter.......................................................................................................437DL_CAPS Parameter.........................................................................................................437DL_FILL Parameter............................................................................................................438DL_ALIGN Parameter........................................................................................................438DL_HATCH Parameter.......................................................................................................438DL_HATCHNAME Parameter............................................................................................439DL_HATCHSCALE Parameter...........................................................................................439DL_HATCHANGLE Parameter...........................................................................................440CA_CENTER Parameter....................................................................................................440CA_RADIUS Parameter.....................................................................................................441CA_STARTANGLE Parameter...........................................................................................441CA_ENDANGLE Parameter...............................................................................................441CA_SPANANGLE Parameter.............................................................................................442CA_DIRECTION Parameter...............................................................................................442CA_STARTPOINT Parameter............................................................................................443CA_ENDPOINT Parameter................................................................................................443EA_CENTER Parameter....................................................................................................443EA_RADIUS1 Parameter...................................................................................................444EA_RADIUS2 Parameter...................................................................................................444EA_STARTANGLE Parameter...........................................................................................445EA_ENDANGLE Parameter...............................................................................................445
EA_SPANANGLE Parameter.............................................................................................446EA_STARTPOINT Parameter............................................................................................446EA_ENDPOINT Parameter................................................................................................447EA_AXIS1 Parameter.........................................................................................................447EA_AXIS2 Parameter.........................................................................................................447T_INSERTIONPOINT Parameter.......................................................................................448T_SIZE Parameter..............................................................................................................448T_JUSTIFICATION Parameter...........................................................................................449T_BOLD Parameter............................................................................................................449T_ITALIC Parameter..........................................................................................................450T_ANGLE Parameter.........................................................................................................450T_FONTTYPE Parameter..................................................................................................450T_FONT Parameter............................................................................................................451T_2DTEXT Parameter........................................................................................................451T_TEXT Parameter............................................................................................................452A_VISIBLE Parameter........................................................................................................452A_TAG Parameter..............................................................................................................453A_PROMPT Parameter......................................................................................................453A_CONSTANT Parameter..................................................................................................454A_VALUE Parameter..........................................................................................................454A_HORIZONTAL Parameter (new in version 15)...............................................................454TA_CENTER Parameter....................................................................................................455TA_RADIUS Parameter......................................................................................................455TA_STARTANGLE Parameter...........................................................................................456TA_ENDANGLE Parameter...............................................................................................456TA_SPANANGLE Parameter.............................................................................................456TA_STARTPOINT Parameter............................................................................................457TA_ENDPOINT Parameter.................................................................................................457TA_VSCALE Parameter.....................................................................................................457TA_DIRECTION Parameter...............................................................................................458H_PATTERN Parameter....................................................................................................458H_PATTERNNAME Parameter..........................................................................................459H_SCALE Parameter.........................................................................................................459H_ANGLE Parameter.........................................................................................................459H_TYPE Parameter............................................................................................................460AW_TYPE Parameter.........................................................................................................460AW_SCALE Parameter......................................................................................................461AW_SIZE Parameter..........................................................................................................462AW_DOUBLE Parameter...................................................................................................462D_ARROWTYPE Parameter..............................................................................................462D_ARROWSCALE Parameter............................................................................................463D_ARROWSIZE Parameter...............................................................................................463D_TEXTSIZE Parameter....................................................................................................464D_FONTTYPE Parameter..................................................................................................464D_FONT Parameter...........................................................................................................464D_PRECISION Parameter.................................................................................................465D_FIXEDTEXT Parameter.................................................................................................465D_TRUNCATEZEROS Parameter.....................................................................................466D_TEXTBOLD Parameter..................................................................................................466D_TEXTITALIC Parameter.................................................................................................467D_TEXTFORMAT Parameter.............................................................................................467
D_TEXTLOCATION Parameter..........................................................................................468CL_RAY Parameter............................................................................................................468CL_INSERTIONPOINT Parameter.....................................................................................469CL_DIRECTION Parameter...............................................................................................469PM_TYPE Parameter.........................................................................................................470PM_SIZE Parameter..........................................................................................................470PM_CENTER Parameter....................................................................................................470BM_INSERTIONPOINT Parameter....................................................................................471BM_NAME Parameter........................................................................................................472BM_TYPE Parameter.........................................................................................................472BM_WIDTH Parameter.......................................................................................................473BM_HEIGHT Parameter.....................................................................................................473BM_ANGLE Parameter......................................................................................................473SY_INSERTIONPOINT Parameter....................................................................................474SY_NAME Parameter.........................................................................................................474SY_TYPE Parameter..........................................................................................................475SY_XSCALE Parameter.....................................................................................................475SY_YSCALE Parameter.....................................................................................................475SY_ZSCALE Parameter.....................................................................................................476SY_ATTDEFCOUNT Parameter........................................................................................476SY_ATTDEFTAG Parameter..............................................................................................477SY_ATTDEFPROMPT Parameter......................................................................................477SY_ATTDEFVALUE Parameter.........................................................................................478SY_ATTDEFCONSTANT Parameter.................................................................................478SY_ATTRIBUTECOUNT Parameter..................................................................................478SY_ATTRIBUTE Parameter...............................................................................................479SY_ATTDEFVISIBLE Parameter.......................................................................................479
What's New
Several new commands and features were added to the macro language in versions 14 through17. Here are the highlights:
New command line invocation of macros and programs (new in Version 14)
New Hexadecimal notation (new in Version 14)
New and Changed Macro Language Statements:BREAK-> New in 15CALL New in 14CHANGE New in 14CLEARSTORAGE New in 14CLEARSTORAGE$ New in 14CMDLINE New in 14FORMAT New in 14GETLAYERPROPS New in 14INPUTMESSAGEPARSE New in 14
POPPOINT New in 14PUSHPOINT New in 14QUERY New in 14SETLAYERPROPS New in 14SETPOINTUPDATE New in 14UPDATELAYER New in 14
New Sys FunctionsNew Sys$ FunctionsSysEx() Functions New in 14SysEx$() Functions New in 14
New Macro Parameters
New and Changed Macro CommandsMacro Commands Added or Changed in Version 14:
Array Changed
AttribNormalDisplay New
ChangePSTemplateProperties New
CloseAll New
DeSelect New
Door New
DoubleLineBar New
FileBackup New
FillWideLine New
GetEntity New
LockX New
LockY New
LockZ New
Midpoint2 New
PlotSort New
PolygonSelection New
PresetPointMode New
PrintCurrentView New
ResizingNodes New
RestoreDCADTile New
RestoreDefaultMenu New
Rotate Changed
RunX New
SaveAs Changed
SaveCopy New
SaveCustomKeys New
Segment Changed
SelectDuplicateToLayer New
SetShadeStyle New
Split New
Split2 New
TruncatedCone New
Window New
Macro Commands Added or Changed in Version 15:Arc4 Changed
Attribute Changed
Dimension Changed
Ellipsoid New
Extrude Changed
ExtrudeAlongCurve New
HatchPosition New
HideRestoreToolbars New
RemoveDrawingHandles New
RoundCylinder New
SaveAsSymbol New
SelectSlant New
SendAllFiles New
SendCurrentFile New
SetHandle Changed
ShowDrawingHandles New
ShowSymbolHandles New
TrimDouble Changed
UnitsOfMeasurement New
Macro Commands Added or Changed in Version 16:ConvertToMultiline New
DoEntitySelection New
HatchFill Changed
MultilineMode New
MultiLineStyleEditor New
SelectAddPoint New
Macro Commands Added or Changed in Version 17:AddLayerToGroup New
CircleTanLine New
CreateLayerGroup New
DeleteLayerFromGroup New
Perimeter New
RecursiveGroupExplode New
SectionTrim New
UserDefinedViewsEditor New
Command Line Invocation of Macros and Executables
All new for version 14.
You can now run macros and executables from the command line, optionally with command-lineparameters, and you don't have to use the "Run" command to do it. You can even 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 looks fora matching macro filename, checking first for file extension BSX, then BSC, then D3M, in that order. If it finds no such macro, it looks for an EXE file. You may of course specify the proper 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 to parse 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 and the program can optionally parse the results.
Paths: If no path or extension is specified, DesignCAD will first search for a macro in DesignCAD's default macro directory, then in DesignCAD's home directory; if no macro is found, it will then look for an exe in DesignCAD's default exe directory, then DesignCAD's homedirectory, then the Windows directory. Of course, you can specify the full path to the macro or program to bypass this search.
Usage Note
A note on usage in this section:
Statement Refers to a DesignCAD macro language statement. See Macro Language Statements for a description of the statements you can use inyour macros.
Function Refers to a DesignCAD macro language function, such as SIN(x) or SYS(32). See Macro Language Functions for a description of the available functions.
Macro Command Refers to a DesignCAD drawing command, such as Line or Hatch. The DesignCAD macro language commands are listed in Macro Language - DesignCAD Commands and Parameters.
Macro Parameter Refers to an argument necessary for a DesignCAD drawing command. Parameters may be numerical values or strings and variables can be substituted for constants. The DesignCAD macro parameters are listed for each macro command in Macro Language - DesignCAD Commands and Parameters.
Line Break Character
You may break up long lines of code using the underscore character '_'. When the underscore is the last character on a line and is preceded by at least one space, it indicates to DesignCAD that the line of code is continued on the following line. If the underscore character is inside a quoted string, it will be ignored.
The overall length of the combined lines may not exceed 255 characters; however, any white space 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"
Built-In Constants
DesignCAD 13.0 and later 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.
Hexadecimal Notation
DesignCAD 14.0 and later allows you to use hexadecimal values in your macros. The hexadecimal value must be preceded by an ampersand and a capital H (&H)
Examples:Hex1 = &H0001Hex16 = &H0010If v >= &H0100 Then v = &H00FF
Hexadecimal values are numbers that are in base 16, instead of base 10. The Hexadecimal digits are 0-9 and A-F, where A = decimal 10 and F = decimal 15. Just as each digit in decimal number represents a multiple of a power of 10, a digit in a hexadecimal number represents a multiple of a power of 16.
Thus, the decimal number 123 means:3*10^0 + 2*10^1 + 1*10^2, or 3 + 20 + 100.
The hexadecimal number &H123 means:3*16^0 + 2*16^1 + 1*16^2, or 3 + 32 + 256, which in decimal notation is 291.
The hex number &H2FC means:12*16^0 + 15*16^1 + 2*16^2, or 12 + 240 + 512, or decimal 764.
Macros and Preset Point Mode
For a long time in DesignCAD for Windows, there was no way to access points set from Preset Point Mode in a macro. Starting with version 13, if you run a macro from Preset Point Mode, anycurrently available preset points are stored in the macro's point buffer, just as if you had run the SetPoint statement or Entity statement inside the macro. These points can be assigned to 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 to rely on the user to set them. The PresetPoint macro command allows you to add points to the point buffer using the standard macro parameters – <PointXYZ, PointRel, etc.
Points may be removed from the point buffer using the ErasePresetPoint macro command. Thiserases the last point from the buffer.
You may force a drawing command to use the points from the point buffer with the macro parameter UsePresetPoints. This avoids the necessity of using PointVal to assign the buffer points to variables and then assign each point inside the drawing command with a For/Next loop.
Note that using the preset points in a drawing command does NOT clear the points from the point buffer. The point buffer must be cleared by setting Sys(1) to zero. If you are in Preset PointMode, any points that have not been cleared before the macro ends will be available to the next drawing command as if you had set them manually.
New and Enhanced Sys Functions
10 – Current units of measurement for printing *New values added for feet, km and miles in Version 15; see also Sys(1114)
[1 = inches, 25.4 = mm, 2.54 = cm, 0.0254 = m, 0.0000254 = km, 0.08333333 = feet, 0.0000157828282828282 = mi]
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. If disabled, no border is plotted.
19 – Sets the minor Display Grid spacing along X (or Angular spacing for Polar grid) *New in 16
20 – Sets the minor Display Grid spacing along Y(or Radial spacing for Polar grid) *New in 16
51 – Display Arcs as Vectors *New in 14[0 = Disable, 1 = Enable]
If this is set to zero, arcs are drawn using Windows API functions exclusively. The default setting is 1, whereby arcs are displayed as vector approximations in 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 in 16
53 – Sets the major Display Grid divisions along Y (or Radial spacing for Polar grid) *New in 16
54 – 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 the point buffer. If Sys(81) is set to 1, you can run multiple SetPoint statements to accumulate more and more points.
100 – Line Fill Spacing for HPGL Export *New in 15Controls the spacing between line fill pen strokes, distance is 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. Default value of 1, which only shows a tab for the target path and any folders immediately beneath it that contain drawing files. Higher values will show tabs for increasingly deeper folder levels. Once this value is changed, if you have already opened the Symbol Library command you may have to manually browse to a different folder and then back again in order 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. This option affects whether or not segments beyond the selected segment are also trimmed away.
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 as youzoom out. If it is set to 0, the grid will become invisible if you zoom out too far to display every grid division.
269 – Number of Arc Segments *New in 16This function sets how many segments to create when an arc, ellipse, or circle is created asa plane or line. Note 1: this only affects initial creation – it does not affect conversion to plane or vector after the entity is created.Note 2: This represents the total number of segments for the new entity – 20-degree arcs and full circles will have the SAME NUMBER OF SEGMENTS. For example, if it is set to 20, a circle drawn with the "create as line" option will have 20 segments, as will a 20-degreearc created with the "Save as line" option.
270 – Display Entities by Layer Order [0 disables, 1 enables] *New in 16
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 16
274 – Number of Layer Groups in the current document (Read-only) *New in 16
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.
280 – Current Layer Group Number *New in 17 [0 = off, 1 = on]If MultiLine Mode Status is on all new lines will be drawn as multilines.
280 – Current Layer Group Status *New in 17 [0 = invisible, not editable, 2 = visible, not editable, 4 = visible and editable]
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 16
376 – 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]
530 – Layer uses specific color [0 = off, 1 = on] *New in 14Don't set this unless you've already set Sys(531), Sys(532) and Sys(533).
531 – Layer red [0-255, default = 0] *New in 14
532 – Layer green [0-255, default = 0] *New in 14
533 – Layer blue [0-255, default = 0] *New in 14
534 – Layer uses specific linestyle [0 = off, 1 = on] *New in 14
535 – Linetype (default 0) *New in 14
536 – Linescale (default 2) *New in 14
537 – Unit-based linewidth (default 0) *New in 14
538 – Layer uses fixed linewidth [0 = off, 1 = on] *New in 14If 0, use the width specified by Sys(537);if 1, use the linewidth specified by Sys(539).
539 – Fixed linewidth in hundredths of mm (ex. 50 = .5 mm). *New in 14If the width specified does not match one of the preset values, the actual width will change to the next lowest preset width value (0.00, 0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 would revert to 9, for 0.09mm.
540 – Layer uses filled lines *New in 14
541 – Enforce layer color settings on all new entities *New in 14
542 – Enforce layer linestyle settings on all new entities *New in 14
550 – Default Fixed Lineweight (in 1/100ths of a millimeter) *New in 14[1 = visible, 2 = hidden]This function indicates the current default linewidth if fixed lineweight is active (and no layer settings override the default setting).
551 – Fill fixed-weight lines (applies to on-screen display only) *New in 14[0 = no, 1 = yes]This function indicates whether fixed-weight lines will be filled on-screen.
552 – Display Fixed-weight lines onscreen *New in 14[0 = no, 1 = yes]This function indicates whether fixed-weight lines will be displayed at their fixed width on-screen.
553 – Print Fixed-weight lines *New in 14[0 = no, 1 = yes]This function indicates whether fixed-weight lines will be printed at their set fixed width. If both Sys(553) and a print-option pen weight are specified, then the print-option width will bethe minimum lineweight printed.
554 – Scale factor for fixed-weight lines (per-session only, not stored in the drawing) *New in 14This function allows you to scale the fixed-weight lines, if desired, when printing to different sizes than usual. For example, if you normally print a D-size plot and need to do a letter-sized test print, you can scale the fixed-weight lines down to avoid losing details due to the fixed line width.
555 – 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 is exploded.
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 into oneor more new grids; by turning this flag off all facets of a cut grid will be converted to planes.
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) through Sys(1130) are all new to Version 15
1100 – 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) – Sys(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]
This reflects the current status of the Show All Toolbars command.
1111 – 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]
1114 – 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 Ortho command 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]
New Sys$ Functions
0 – Commandline parameters. *New in 14This function returns any extra information that was on the command line after the macro name, or was passed by the CMDLINE statement to a RUN or CALL statement. For example, if you run mymacro.d3m by typing "mymacro.d3m 1, 10, 100" at the commandline, when the macro checks Sys$(0) it will find the string "1, 10, 100".
43 – Symbol Library Path. *New in 15This function returns the default Symbol Library Path.
300 – Entity Name. *New in 16This function returns the name of the ENTITY statement.
301 – Layer Group Name. *New in 17This function returns the name of the current layer group.
Chapter 1: Macro Language - Statements
In this chapter we list the BASIC-like statements that make the DesignCAD Macro Language so versatile. The statements are listed alphabetically along with a description and some sample code fragments.
BasicCAD EssentialsA Note On FilenamesALIAS StatementANYKEY StatementAssignment StatementBREAK-> StatementCALL StatementCHAIN StatementCHANGE StatementCLEAR StatementCLEARSTORAGE StatementCLEARSTORAGE$ StatementCLOSE StatementCLS StatementCMDLINE StatementCOLOR StatementDIM StatementDO WHILE and LOOP StatementsEND StatementENTITY StatementEXIT DO StatementEXIT FOR StatementFOR and NEXT StatementsFORMAT StatementGET StatementGETATTR StatementGETLAYERPROPS StatementGETSELECT StatementGETXY StatementGOSUB and RETURN StatementsGOTO 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 StatementRUN StatementSETLAYERPROPS StatementSETPOINT StatementSETSELECTEDPOINTS StatementSTOP StatementTAB StatementUPDATE StatementUPDATELAYER StatementWCLOSE StatementWINDOW Statement
BasicCAD Essentials
The DesignCAD macro language is not case sensitive; using the variable name ThisVariable or THISVARIABLE is the same.
Line numbers are not used in BasicCAD.
A label can be used as the object of a GOTO or GOSUB 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 " _ " before continuing a command on the next line of text. However, these lines still may not exceed 255 characters in overall length. The white space between the beginning of a continued line and the 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) ) Then gosub SomeRoutine:End If
BasicCAD recognizes only two data types: Numeric and String. The Numeric data type is actually a 64-bit real or floating-point type (identified in some programming languages as a double). The String data type contains a sequence of up to 255 characters or bytes.
Macro variable names and labels can be up to twenty characters in length. (DesignCAD 3000 and 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 must always begin with a non-numeric character. String variables must end with a dollar sign ($). Anyof the following are valid macro variable names:
JTestValname$BaselineLengthvar_with_underscore
There are several words which BasicCAD reserves for its own use. These words should not be used as variable names; accidentally using a keyword as a variable name can cause unexpected behavior. All BasicCAD keywords are listed in the Macro Language Keywords topic.
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 ^.
+ 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/4 evaluates to 2.25.
\ The backslash operator performs integer division; that is, if the result of the division is not an integer value, it is truncated to the next-lowest integer value. For example, 9\4 evaluates to 2.
MOD The MOD operator performs modular arithmetic – it finds the remainder of a division operation. For example, 9 MOD 4 evaluates to 1.
^ The caret operator performs exponentiation – that is, x^y is x raised to the power y. For example, 2^3 evaluates to 8. Note: the number (e.g. x) being raised to a power must be not be a negative number, or the operation will result in an error.
Parentheses are also allowed. Expressions are generally evaluated left to right but some operations take a higher precedence than others and expressions inside parentheses are evaluated before any surrounding operators are applied. The following are valid numeric expressions:
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 subtraction
String 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 in DO and IF statements. Valid logical expressions can include relational operators (<, >, <>, =,
<=, >=) and logical operators (AND, OR, NOT). As with most programming languages, the operator precedence is:
1. <, >, <>, =, <=, >=2. NOT3. AND4. OR
'<' is "Less than"'>' is "Greater than'<>' is "Not Equal"'=' is "Equal"'<=' is "Less than or equal to"'>=' is "Greater than or equal to"
Parentheses can be used in logical expressions. Let us assume we have a variable B that has the 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 OR B > 5 AND B = 5 'false; AND has precedence 'over OR(B <= 5 OR B > 5) AND B = 5 'true
It is a very good idea to put comments in your macro programs. Comments are placed after an apostrophe (') 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 or parameters:
>PolygonEdge 'YOU MAY PUT COMMENTS HERE{
<Color 255,0,0 'AND HERE' A comment-only line is acceptable anywhere<PointXYZ 10, 10, 0<PointXYZ 15, 15, 0
}
DesignCAD macro commands and parameters are easily distinguished from macro language statements. All DesignCAD macro commands have a ">" at the beginning of the line, while all macro parameters have a "<" at the beginning of the line.
A Note On Filenames
Many of the statements and commands in the BasicCAD language use a filename as one of their arguments. BasicCAD has introduced a shortcut mechanism to refer to the DesignCAD root installation directory, making it much easier for developers to load files from a generic DesignCAD 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 where DesignCAD itself is located. So, for example, we can have our macro use:Run "*\Macros By Jack\Macro997.d3m"instead of:Run "C:\Program Files\IMSI\DesignCAD 3D Max 17\Macros By Jack\Macro997.d3m"
The immediate advantage is that all a developer has to do is install his macros in a standard directory beneath DesignCAD's own root directory. If the user installed DesignCAD into:E:\IMSI Software\Dcad17the first run statement above will still work (assuming the macros are in the appropriate "Macros By Jack" directory). The second form clearly would not work in all cases. Of course, there are ways around this, by using Sys$(36) and checking a lot of other stuff before the macro starts it's proper tasks, but we recommend using "*\" as a general-purpose shortcut.
The same shortcut style can be used for macro commands that take a <filename parameter such as:
>ImportXYZ{<Filename "*\XYZFiles\Test1.XYZ"}
Note for the future: It is now far less common for Windows users to have read and write access to the Program Files directory; future versions of DesignCAD will have to accommodate the likelihood that symbols, user drawings and macros may have some other default location.
BasicCAD Statements
ALIAS Statement
PURPOSE: To replace one string of text in the macro program with another string.
SYNTAX: ALIAS name text-being-aliased
EXPLANATION: The ALIAS statement allows the programmer to create shortcuts for longer or less readable pieces of text in the macro. This useful statement allows you to create new names for Sys() functions, Sys$() functions, frequently used strings of text, or any other short piece of code.
The alias name can be up to twenty characters long, just as normal variable names can be. The text-being-replaced must be short enough that the entire ALIAS statement line does not exceed 255 characters. However, you should always remain aware that the length of a line of code that uses aliases is calculated as if the replacement text were actually there.
When the macro is read into memory, DesignCAD replaces all aliases with the actual text they represent before running the macro. This means that replacing long lines of text with short alias names may get you into trouble if you aren't careful.
Note: Do NOT use a comma to separate name and text-being-aliased, or the comma 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 to t$ = "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 that uses the alias. Aliases may be loaded from INCLUDEd files, so long as the INCLUDE statement precedes the first use of the alias.
An aliased identifier cannot be used inside double quotes as part of a string, but it can be appended to the contents of a string using the normal rules for string concatenation.
Aliases are only replaced once, when the macro is first loaded. This means that you cannot redefine aliased strings dynamically while the macro is running.
COMPATIBILITY: Version 13 and later.
EXAMPLES:
Alias now Sys$(7) ' current timecurrentTime$ = now
Alias wmfSize Sys(45)wmfSize = 2.5 'set up wmf export to ouput 2.5 inch wmf files
Alias myHero "Albert Einstein "t$ = myHero, "was a mathematician"
ANYKEY Statement
PURPOSE: To wait for a single key press.
SYNTAX: ANYKEY {variable}
EXPLANATION: The ANYKEY statement waits for and reads keystrokes from the keyboard. This statement can be used with or without a variable. If a variable is used, then the value of the key pressed is assigned to that variable. String variables or numeric variables can be used. If a numeric variable is used, the ASCII code of the keystroke is assigned to the variable. Pressing a mouse button will act as a keystroke, but will assignno value to the variable in the ANYKEY statement.
This statement is useful if you want to pause for a key press after printing to the bottom of the screen or to a text window.
COMPATIBILITY: All versions
EXAMPLES:
AnykeyAnykey A$ ' Read a keystroke into A$Anykey KEY ' Read a keystroke into KEY
Assignment Statement
PURPOSE: To assign a value to a numeric variable.
SYNTAX: variable = expressionstringvar = expressionlist
EXPLANATION: Variable can be any numeric variable name. Expression can be any valid numeric expression.
Stringvar is any valid string variable name. Expressionlist is one or morestring or numeric expressions separated by commas. Numeric expressions can be assigned to a string – they are evaluated and converted to ASCII format. Using more than one expression allows you to concatenate strings.
COMPATIBILITY: All versions
EXAMPLES:
x=123.456d$=x 'd$ is "123.456"
x = 18y = 3z = x + y 'z = 21
x = sin(t) + 3 * j ^ 2
xpos = xpos + 1
z = Sqr(var(2))
xp(j) = xp(k) * 2
a$ = "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.
BREAK-> Statement
PURPOSE: To assist in debugging macros by temporarily stopping the execution of a DesignCAD macro and displaying the values of one or more variables.
SYNTAX: BREAK-> formatstring$, variable1 [, variable2, variable3…]
EXPLANATION: This statement is used to pause the execution of a macro and optionallydisplay the value of one or more variables at that point in time.
The BREAK-> statement is only executed when the macro is in debug mode (e.g. 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, the macro will pause at the break point and display the following prompt in theDebug window:
-> BREAK -> F5: Continue, F8: Next Statement, F9: Remove Breakpoint, Esc: Stop Program
The macro can then be stepped through using F5 and F8, or the break point can be removed (but only from the copy of the macro that is stored in memory – the original source file is not affected).
The BREAK-> statement can also be used to display the value of one ormore variables using a format string. The string can consist of any text, including placeholders for variables to be displayed. After the format string come the names of the variables to be displayed, in the order 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$, entcount
See Also: FORMAT
COMPATIBILITY: Version 15 and later.
EXAMPLE:
Sys(800) = 1Precision 0Break->For i = 1 To 10 b$ = "I had", i, "eggs for breakfast" Break-> "i = %d, b$ = %s", i, b$
Next iSys(800) = 0End
CALL Statement
PURPOSE: To temporarily transfer control to another DesignCAD macro.
SYNTAX: CALL macroname
EXPLANATION: This statement is used to run another DesignCAD macro then resume the current macro on the next line after the CALL statement.
The CALL statement causes the new macro (macroname) be loaded into a separate memory space. The new macro has its own memory for variables, so it has no interaction with the variables that have been defined in the original macro. When the new macro ends, execution returns to the original macro on the next line following the CALL statement.
Differences between CALL and CHAIN:A macro that was started by the CHAIN statement always begins at the first line in the new macro. This makes it impossible to return directly to the next line by CHAINing back to the original macro.
A macro started by the CHAIN statement has access to the same variables as the macro that was CHAINed from. A macro begun by the CALL statement has a separate memory stack for variables.Variable data can only be transferred between the CALLed macro and the CALLing macro through the use of the SysEx() functions and the SysStr() functions.
Note: You should always specify the macro name complete with its extension.
See Also: RUN, CHAIN
COMPATIBILITY: Version 14 and later.
EXAMPLES:
Call MACNAME$Call "TEST1.D3M"
CHAIN Statement
PURPOSE: To transfer control to another DesignCAD macro.
SYNTAX: CHAIN macroname
EXPLANATION: This statement is used to run another DesignCAD macro, leaving all the variables from the current macro intact when the other macro is executed. A string variable or constant can be used for the macro name.
The CHAIN statement causes the new macro (macroname) to replace thecurrent macro in memory. To return to the original macro, you must execute another CHAIN or RUN statement from the new macro. The execution of a macro called by the CHAIN statement always begins at thefirst line in the called macro.
The RUN statement is similar to the CHAIN statement, but the RUN statement clears all variables before executing the new macro.
Note: You should always specify the macro name complete with its extension.
See Also: RUN , CALL
COMPATIBILITY: All versions
EXAMPLES:
Chain MACNAME$Chain "TEST1.D3M"
CHANGE Statement
PURPOSE: To change specific parameters of an entity that has been loaded using the ENTITY statement.
SYNTAX: CHANGE parameter, value [,value, value,…]
EXPLANATION: This statement is used to change a specific parameter of an entity to a new value. Available parameters and corresponding values are listed in DCADALIAS.d3i and also in QUERY and CHANGE Parameters.
Note: Immediately after you have finished changing all the desired parameters to an entity, run the Update statement to refresh the entity.
See Also: QUERY, UPDATE, QUERY and CHANGE Parameters
COMPATIBILITY: Version 14 and later.
EXAMPLE:
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
CLEAR Statement
PURPOSE: To erase all variables in the macro.
SYNTAX: CLEAR
EXPLANATION: This statement is used to erase and de-allocate all variables in the macro. It can be used to free memory or to re-initialize variables.
COMPATIBILITY: All versions
EXAMPLE:
Clear
CLEARSTORAGE Statement
PURPOSE: To erase some or all SYSVAL_ ini files.
SYNTAX: CLEARSTORAGE CLEARSTORAGE nCLEARSTORAGE m {, }n
EXPLANATION: This statement is used to erase one or more of the SysVal ini files that store 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 be erased.
If CLEARSTORAGE is followed by a pair of numbers or expressions m and n, separated by a comma or a space, all SysVal ini files in the rangefrom m to n will be erased.
If three or more arguments are presented to the CLEARSTORAGE statement, the macro will report a syntax error.
COMPATIBILITY: Version 14 and later.
EXAMPLE:
' 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
CLEARSTORAGE$ Statement
PURPOSE: To erase some or all SYSSTR_ ini files.
SYNTAX: CLEARSTORAGE$ CLEARSTORAGE$ nCLEARSTORAGE$ m {, }n
EXPLANATION: This statement is used to erase one or more of the SYSSTR ini files thatstore 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, thenthe single SysStr ini file whose numeric suffix matches n will be erased.
If CLEARSTORAGE$ is followed by a pair of numbers or expressions m and n, separated by a comma or a space, all SysStr ini files in the range from m to n will be erased. If n <= m, no files will be erased.
If three or more arguments are presented to the CLEARSTORAGE$ statement, the macro will report a syntax error.
COMPATIBILITY: Version 14 and later.
EXAMPLE:
' Delete all SYSSTR_xxx.ini filesClearStorage$
' Delete SYSSTR_010.ini onlyClearStorage$ 10
' Delete a range of SysStr ini files from 5 to 14x = 5ClearStorage$ x, x+9' orClearStorage$ 5 14
CLOSE Statement
PURPOSE: To close a disk file.
SYNTAX: CLOSE {filenumber}
EXPLANATION: This statement is used to close a file that has been opened using the OPEN statement. If a disk file has been opened for input or output, it should be closed after being used.
Filenumber is the number of the file to be closed. If it is omitted, all open files will be closed.
Any input/output files left open when the macro ends are automatically closed. However, the CLOSE statement must be used to close an open file before that file number can be opened again in the same macro.
See Also: OPEN
COMPATIBILITY: All versions
EXAMPLE:
Close 1
CLS Statement
PURPOSE: Clear a text window.
SYNTAX: CLS
EXPLANATION: The CLS statement clears all the text inside the text window. If a text window is not open, this statement has no effect. See the WINDOW statement 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 match the current text background color.
COMPATIBILITY: All versions
EXAMPLE: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
CMDLINE Statement
PURPOSE: Set the commandline parameters for an upcoming CALL, CHAIN, or RUN statement.
SYNTAX: CMDLINE commandstring$
EXPLANATION: The CMDLINE statement sets up a commandline string which can then be queried by a macro that is subsequently run using the CALL, CHAIN, or RUN statements. The new macro may determine the value of the passed commandline by reading the contents of Sys$(0) as soon as it starts.
See Also: CALL, CHAIN, RUN
COMPATIBILITY: Version 14 and later.
EXAMPLE:
Cmdline "1, 10, 100"Call "*\ThreeNums.d3m"' The contents of Sys$(0) will be "1, 10, 100" when ThreeNums starts.
COLOR Statement
PURPOSE: Set the text color in a text window.
SYNTAX: COLOR foreground {, background}
EXPLANATION: 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 the background color. The colors can range from zero to 19. These numbers correspond to the standard Windows palette, not to DesignCAD's palette.
The COLOR statement affects only the text displayed with PRINT statements after the COLOR statement is executed. The text color remains set at the specified color until the next COLOR statement is executed. COLOR will also affect the background color of the entire window if you follow it with a CLS statement.
COMPATIBILITY: All versions
EXAMPLE:
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
DIM Statement
PURPOSE: To specify the size of one or more arrays.
SYNTAX: DIM variable(expression) {, variable(expression)...}
EXPLANATION: The DIM statement is used to allocate storage for arrays. An array is a single variable with several elements, addressed with a subscript in parentheses such as: A(20).
An array must be dimensioned before it is used. Any numeric expression can be used for the array size. String arrays are allowed. All arrays are one-dimensional – that is, an array can have only one subscript.
An array cannot be re-dimensioned. A DIM statement must be executedonly once for a particular variable.
COMPATIBILITY: All versions
EXAMPLES:
Dim a(10)
Dim jx(200), jy(200)
Dim a$(20)
n = 15Dim point(n)
DO WHILE and LOOP Statements
PURPOSE: To execute a series of instructions in a loop.
SYNTAX: DO WHILE logicalExpression...LOOP
EXPLANATION: The DO WHILE statement is used to start a loop that will be executed as long as the logical expression "logicalExpression" is true. When the LOOP statement is encountered, macro execution is transferred back to the DO WHILE statement and the logical expression is checked again. When the expression is false, execution continues at the first line after the LOOP statement.
The logical expression consists of one or more relational expressions separated by AND or OR. A logical expression can also be preceded by NOT.
A relational expression consists of two numeric or string expressions separated by one of the following relational operators: <, <=, =, >=, >, <>.
When using a DO loop, be sure the logical expression will eventually change to false, or the loop will never end.
DO loops can be nested, that is, one DO loop can be placed inside another. DO loops can be nested up to 20 levels deep.
See Also: EXIT DO
COMPATIBILITY: All versions
EXAMPLE:
j = 1Window 5,8Do While j < 20 Print j j = j * 2 LoopPrint "done"Anykey
'opens a text window'prints: 1.000' 2.000' 4.000' 8.000' 16.000
' done
END Statement
PURPOSE: To terminate the macro and return to DesignCAD.
SYNTAX: END
EXPLANATION: The END statement can be placed anywhere in the macro. When the End statement is executed, the macro terminates. This statement is the same as the STOP statement.
COMPATIBILITY: All versions
EXAMPLES:
If i >= max Then EndElse Print "I less than max"End IfEnd
ENTITY Statement
PURPOSE: To access an entity in the drawing by entity number.
SYNTAX: ENTITY expression
EXPLANATION: The ENTITY statement is used to read an entity's information into the SYS function variables 90-99, 290-299 and 390-399. It also places all the points of the entity into the points buffer so they can be accessed using the POINTVAL statement. The entity is accessed by its index number – the arbitrary order in which the entity was placed in the drawing. This makes it possible to process all entities in the drawing.
After running the ENTITY statement, the entity can also be accessed through the QUERY and CHANGE statements
COMPATIBILITY: All versions
EXAMPLE:
' 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 Then n = n + 1 End IfNext jMessage "Number of lines: ", n
EXIT DO Statement
PURPOSE: To exit a DO WHILE loop prematurely.
SYNTAX: EXIT DO
EXPLANATION: The EXIT DO statement can be used to exit a DO loop from anywhere within the loop. This makes it easy to exit a DO loop without using a label and a GOTO statement.
See Also: DO WHILE and LOOP
COMPATIBILITY: All versions
EXAMPLE:
Do While i < 1000 Anykey keycode If keycode = 27 Then Exit Do 27 is the ASCII value for Esc . .Loop
EXIT FOR Statement
PURPOSE: To exit a FOR loop prematurely.
SYNTAX: EXIT FOR
EXPLANATION: The EXIT FOR statement can be used to exit a FOR loop from anywhere within the loop. This makes it easy to exit a FOR loop without using a label and a GOTO statement. When executed from a nested FOR loop, the EXIT FOR statement will branch out into the next-higher level of the FOR loop.
See Also: FOR and NEXT
COMPATIBILITY: All versions
EXAMPLE:
For j = 1 To 100 Anykey keycode 'check for the ESC key If keycode = 27 Then Exit For . .next
FOR and NEXT Statements
PURPOSE: To execute a section of the macro a certain number of times.
SYNTAX: FOR variable = expression1 TO expression2 {STEP expression3}...NEXT variable
EXPLANATION: "Variable" is used as the counter. "Expression1" is the initial value of thecounter variable. "Expression2" is the test or final value of the counter. The optional STEP "expression3" can be used to specify the amount that the counter is incremented (or decremented) each pass. The default increment is 1.
The macro statements after the FOR statement and before the NEXT statement are called the loop. Each time the loop is executed, the counter is incremented (or decremented, if expression3 is a negative value). If it is greater than the test value, the loop is exited and the macro branches to the line following the NEXT statement. (If "expression3" is negative, then the loop is exited when the counter is less than the test value.)
FOR loops can be nested, that is, one FOR loop can be placed inside another; FOR loops can be nested up to 20 levels deep.
See Also: EXIT FOR
COMPATIBILITY: All versions
EXAMPLES:For j = 1 To 4 'output: 1.00 Print j '2.00Next j '3.00
'4.00
For j = 4 To 1 Step -1 'output: 4.00 Print j '3.00Next j '2.00
'1.00
For j = 1 To 2 'output: 1.000 1.000 For k = 1 To 3 '1.000 2.000 Print j, k '1.000 3.000 Next k 'loop 1 Print "loop ", i '2.000 1.000Next j '2.000 2.000
'2.000 3.000'loop 2
For j = 2 To 1
Print "this will not be printed"Next j
FORMAT Statement
PURPOSE: To generate a text string according to a specified pattern using variablesfor portions of the string.
SYNTAX: FORMAT out$, fmt$ [,var1, var2, var3, …]
EXPLANATION: This statement is used to format a text string according to a specified pattern which uses placeholders for numeric and string variables. Out$ is the string variable that is to hold the generated string. Fmt$ is the string that specifies the pattern. Var1, var2, etc. are string and numeric variables. They must appear in the same order as the format specifiers in the format string. If more format specifiers are used than variables, the unmatched format specifiers are ignored and converted as plain text.
You may purposely display a format specifier verbatim by preceding it with a % mark – ex. %%10d will be converted to "%10d" in the output string.
If you are familiar with the sprintf() function of C, you should immediatelygrasp how to use this command.
Format specifiers:%[-][n]s formats a string variable. If the optional length specifier n is present, the resulting field will contain at least n characters. If the string variable is shorter than n characters, the string will be right-justified and the remaining characters will be padded with spaces to the left of the string. If the string is longer than n characters, the entire string will be included and no padding will occur. Ifthe optional minus sign is present along with the length specifier n, the field will be left-justified with added spaces on 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 will contain 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 filled in withspaces to the left of the number. If the optional 0 is present, the remaining digits will be filled in with leading zeros instead of spaces. If the optional minus sign is present, the number will be left-justified (and the optional 0 will be ignored if present).
%[-][0][n]u formats an unsigned integer variable. (Negative integers will be converted to their twos-complement form and presented as positive integers)If the optional length specifier n is present, the resulting field will contain 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 filled in with
spaces to the left of the number. If the optional 0 is present, the remaining digits will be filled in with leading zeros instead of spaces. If the optional minus sign is present, the number will be left-justified and any remaining digits will be padded with spaces on the right instead of on the left.
%[-][0][n]o formats an integer variable into octal form.If the optional length specifier n is present, the resulting field will contain at least n octal digits. If the integer is shorter than n digits, the remainingdigits will be filled in with spaces to the left of the number. If the optional 0 is present, the remaining digits will be filled in with leading zeros instead of spaces. If the optional minus sign is present, the number will be padded with spaces on the right instead of on the left.
%[-][0][n]x formats an integer variable into hexadecimal form.If the optional length specifier n is present, the resulting field will contain at least n hexadecimal digits. If the integer is shorter than n digits, the remaining digits will be filled in with spaces to the left of the number. If the optional 0 is present, the remaining digits will be filled in with leadingzeros instead of spaces. If the optional minus sign is present, the number will be padded with spaces on the right instead of on the left.
%[-][x.y]f formats a floating-point variable.The default format displays six digits after the decimal character. If the optional width x.y is specified, the number will be formatted with y digits after the decimal point and a width of at least x digits (including the decimal character). If the optional minus sign is included, the number will be padded to the left. Regardless of the width specifier x, the complete integer portion of the number will always be displayed. If the fractional width specifier y is absent, the default number of fractional digits is 6.
See Also: PARSE
COMPATIBILITY: All versions
EXAMPLES:
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: ", 3If Sys(1) < 3 Then Goto Get3
For i = 1 to 3 PointVal X(i), Y(i), Z(i), iNext i
xyz$ = "Point %d:" + Chr$(13) + "x: %-20.5f" + Chr$(13) + _"y: %-20.5f" + Chr$(13) + "z: %-20.5f"For i = 1 To 3 Format point$, xyz$, i, x(i), y(i), z(i) Message point$Next i
GET Statement
PURPOSE: To read a record from a random access file.
SYNTAX: GET file, recordNumber, stringVariable
EXPLANATION: This statement is used to read a record from a random access file. The record length is specified in the OPEN statement.
When the GET statement is executed, the designated record (recordNumber) of the file will be read into the string variable (stringVariable). The MKS$ and the CVS functions can be used to convert numeric values to and from eight-byte strings for file input and output.
See Also: PUT, INPUT #, OPEN, CLOSE
COMPATIBILITY: All versions
EXAMPLE:
Open "r," 1, "test.dat," 80For j = 1 To 10 Input "Enter record number: ", recno Get 1, recno, a$ ' get record recno Print right$(a$, 20) ' print the last 20 bytesNext j
GETATTR Statement
PURPOSE: To get entity type, group status and layer of an entity.
SYNTAX: GETATTR entity, type {,select, layerNumber, groupIDNumber, red, green, blue, solidIDNumber}
EXPLANATION: This statement is used to get the entity type, group status and layer number of an entity. Entity is the entity number – one for the first entity in the drawing, two for the second, etc. Type is the entity type: Possible values are:
1 = Line 2 = Ellipse 3 = 3-D Text 4 = Curve 7 = Elliptical Arc11 = Bezier Curve (4-point)12 = Bezier Curve (Continuous)13 = 2-D Text15 = Attribute16 = Circle, Circular Arc17 = Hatch22 = Text Arc24 = Arrow26 = Symbol31 = Plane32 = Grid Header33 = Grid Line68 = 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 Ellipse
Select is zero if the entity is not selected or one if the entity is currently selected; layerNumber is the layer number of the entity; groupIDNumber
is the group ID 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; SolidIDNumber is the solid ID number of the entity, or zero if the entity isnot part of a solid.
Type, select, layerNumber, groupIDNumber, red, green, blue and groupIDNumber must be variables, not expressions, since they will be assigned values.Do NOT use "entity" or "layer" as variable names! Both are reserved words.
Note: symbols and blocks indicate the same entity type (26). To determine a symbol's entity type more explicitly you must access the symbol entity's data using the Entity statement then check the value of Sys(296).
See Also: PUTATTR, Entity
COMPATIBILITY: All versions
EXAMPLE:
' 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 entities Getattr j, type If type = 1 Then leng = leng + Length(j)Next jMessage "The length is ", leng
GETLAYERPROPS Statement
PURPOSE: To get a layer's default color and linestyle settings, if any.
SYNTAX: GETLAYERPROPS layerIndexNumber
EXPLANATION: This statement is used to determine the default settings for a layer. The layer's settings are loaded into the functions Sys(530) through Sys(542):
530 – Layer uses specific color? (0 = no, 1 = yes)531 – Layer red [0-255, default = 0]532 – Layer green [0-255, default = 0]533 – Layer blue [0-255, 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 width specified does not match one of the preset values, the actual width will change to the next lowest preset width value (0.00, 0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 would revertto 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)
layerIndexNumber is the layer number of the layer whose properties arebeing loaded.
See Also: SETLAYERPROPS, UPDATELAYER
COMPATIBILITY: Version 14 and later.
EXAMPLE:
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)Print "Sys(540) – filled lines?: ", sys(540)Print "Sys(541) – force layer color?: ", sys(541)Print "Sys(542) – force layer linestyle?: ", sys(542)AnykeyWClose
GETSELECT Statement
PURPOSE: To get the entity number of one of the currently selected entities.
SYNTAX: GETSELECT expression, variable
EXPLANATION: This statement can be used to retrieve entity numbers of selected items so these items can be investigated with the ENTITY statement, if desired. Information about the entities can also be retrieved with GETATTR and changed with PUTATTR. "Expression" is a number, variable, or mathematical expression evaluating to an integer which determines which of the selected entities you want the entity number for;"variable" is the name of the variable you want to store the entity number in.
GETSELECT will ignore any selection status changes made by the PUTATTR statement. Entities must have been selected by the DesignCAD Select command, either earlier in the macro or before you ran the macro.
See Also: , , PUTATTR
COMPATIBILITY: Version 9 (DesignCAD 97) and later.
EXAMPLE:
' 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 maxsel Getselect j, ent(j) 'get info for selected items Print "Picked item ",j, " is entity ", ent(j)Next j 'go to the next itemAnykey
GETXY Statement
PURPOSE: To get the X, Y, Z coordinates of the current cursor position
SYNTAX: GETXY Xvariable, Yvariable, Zvariable
EXPLANATION: This statement can be used to assign the X, Y, and Z coordinates of the current cursor position to three variables. It is frequently used to provide a reference location for the rest of the macro.
Note: This statement was previously documented without commas separating the variables. It often works either way, but we recommend using the commas for consistency with other statements. In some cases, the commas may be required for proper operation.
COMPATIBILITY: All versions
EXAMPLE:
Getxy x1, y1, z1>Line{For j = 0 To 360 Step 45 x = x1 + Cos(j) * 10 y = y1 - Sin(j) * 10 <Pointxyz [x, y, z1]Next j}
GOSUB and RETURN Statements
PURPOSE: To call a subroutine.
SYNTAX: GOSUB labelRETURN
EXPLANATION: The GOSUB statement is used to transfer macro execution to another statement out of the normal sequence of execution - it calls a subroutine. The macro resumes execution on the line following the GOSUB statement when a RETURN statement is encountered. "Label" can be any valid DesignCAD macro label. A RETURN statement must be used toreturn from a subroutine called by a GOSUB statement. Also, don't forgetto put an END statement at the end of your main routine and before your first subroutine.
See Also: GOTO
COMPATIBILITY: All versions
EXAMPLE:
x = 20y = 20theta = 30GetXY gx1, gy1, gz1 ' get cursor locationGosub rotate>Line{ <Pointxyz [gx1, gy1, gz1] <Pointxyz [x1, y1, gz1]}...' Important! Main loop must END before any' subroutines beginEnd
rotate:x1 = gx1 + x * sin(theta) + y * cos(theta)y1 = gy1 - x * cos(theta) + y * sin(theta)Return
GOTO Statement
PURPOSE: To branch to another statement.
SYNTAX: GOTO label
EXPLANATION: This statement is used to transfer macro execution to another statementout of the normal sequence of execution. "Label" can be any valid DesignCAD macro label. GOTO can skip forward or backward in the macro.
See Also: GOSUB
COMPATIBILITY: All versions
EXAMPLE:
retry:Input "enter a number less than 20: ", xIf x >= 20 Then Goto retry ' loops until x < 20
IF Statement (single line)
PURPOSE: To execute a single macro statement under certain conditions.
SYNTAX: IF logicalExpression THEN statement
EXPLANATION: "logicalExpression" is a logical expression that can be answered True orFalse; "statement" is any valid macro language statement. If logicalExpression is true, then statement is executed; otherwise, it is not. The single line IF must have the conditionally executed statement following the word "THEN" on the same line.
The logical expression consists of one or more relational expressions separated by AND or OR. A logical expression can also be preceded by NOT.
A relational expression consists of two numeric or string expressions separated by one of the following relational operators: <, <=, =, >=, >, <>.
COMPATIBILITY: All versions
EXAMPLES:
If Eof(1) <> 0 Then End
retry:Input "Enter a number less than 20: ", xIf x >= 20 Then Goto retry
If a$ = "y" Then Goto affirm
If y < 5 Or z > 2 Then x = x + 1
IF Statement (Group IF)
PURPOSE: To execute a set of macro statements under certain conditions.
SYNTAX: IF logicalExpression THENstatements..
{ ELSEstatements.. }
END IF
EXPLANATION: "logicalExpression" 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 statements between ELSE andEND IF are executed. The ELSE section is optional but the END IF is required.
The logical expression consists of one or more relational expressions separated by AND or OR. A logical expression can also be preceded by NOT.
A relational expression consists of two numeric or string expressions separated by one of the following relational operators: <, <=, =, >=, >, <>.
With the Group IF statement, the IF statement line must end with the word "THEN" (except for comments); in contrast, the single line IF must have the conditionally executed statement following the word "THEN" onthe same line.
COMPATIBILITY: All versions
EXAMPLES:
If Eof(1) <> 0 Then Print "end-of-file was encountered." End ' stop the macroEnd If
If j > 90 Then ' sanity check for large values of j Print "j is too large: ", jElse x = sin(j) * l y = y + 1End If
INCLUDE Statement
PURPOSE: To incorporate variables and/or subroutines from other files into the current macro.
SYNTAX: INCLUDE filename
EXPLANATION: The INCLUDE statement can be used to load variables, subroutines, or aliases stored in external files into the current macro.
You can add an INCLUDE statement anywhere, but its location does matter; please consider the points below:
DesignCAD macros are read in a top-down fashion and all names are global after they have been first assigned or used. The effect of an INCLUDE statement is the same as if you had manually copied the text of the included file into your current macro at the point where the INCLUDE statement is located.
INCLUDE files that contain aliases or global variable definitions should be included before they are used by your code; we recommend placing them at the beginning of your macro. For example, if you have a file thatdefines physical and numeric constants such as Pi, the Golden Mean and the speed of light, you should include that file at the beginning of your macro.
INCLUDE files containing subroutines should be placed after the END statement for your main routine. Again, recall that macros are read top-down. Your main program code should be at the beginning of the macro. Subroutines, whether added manually or using Include, should go after your main program's END statement.
You may INCLUDE files that have any valid Windows filename; however, we recommend using a .d3i extension.
See Also: GOSUB, ALIAS
COMPATIBILITY: Version 13 and later.
EXAMPLES:
' 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 2
Print "Phi / ", i, " ", phi/i
Gosub phi_funcNext iEnd'Include "*\subs.d3i"' The subroutine phi_sub is now available,' just as if it had been added directly to the ' bottom of this macro
INPUT Statement
PURPOSE: To read a value from the keyboard and assign it to a variable.
SYNTAX: INPUT "promptstring", variableList
INPUT [prompt$], variableList
INPUT variableList
EXPLANATION: The INPUT statement is used to ask the user for input and assign the entered value to a variable. "PromptString" is an optional message to bedisplayed for the user. It can be a quoted string, like "Enter x and y", or it can be a string variable enclosed in square brackets, like [prompt$]. Note: The ability to use a string variable for the prompt was introduced in DesignCAD 13 and is not backward compatible with older versions.
"variableList" is one or more variables, separated by commas, to which the input values are to be assigned. If the user is required to enter multiple values they can be separated by spaces or commas.
If a single string variable is used in the variable list, the entire string input from the keyboard is assigned to the variable.
If numeric variables are used, the numbers input from the keyboard are assigned to the corresponding variables.
If more than one variable is used with the INPUT statement, any strings input by the user should be enclosed in quotes ("") - otherwise, any spaces or commas in the string will be misinterpreted as separators between input variables.
Values read with the INPUT statement can be any valid DesignCAD macro language expressions – they do not have to be simple numbers. For example, the user can enter SQRT(2) or 45/2 when a number is requested. However, if the expression contains any spaces, the user should enclose the entire statement in parentheses, such as:
(SQRT(2) - 1 + COS(45)).
By default, the INPUT window is centered on the screen. However, the window's upper left corner can be moved by setting system variable functions Sys(130) and Sys(131). The INPUT window's caption can 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 versions
EXAMPLES:
Input "Enter the initial value: ", init
prompt$ = "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
INPUT # Statement
PURPOSE: To read a line from a disk file and assign it to a variable.
SYNTAX: INPUT # fileNumber, variableList
EXPLANATION: This statement is used to read a line from a disk file and assign it to a numeric variable or to a string variable. The INPUT # statement reads an entire line from the disk file; fileNumber is the file number that was used in the OPEN statement; variableList is a set of one or more variables separated by commas. The variables can be string or numeric variables.
When this statement is executed, a line from the file is read and a value isassigned to each variable. If the line from the file has fewer values than there are variables the leftover variables are not modified.
String values in the file should be enclosed in quotes if there are multiple values on a line. If an entire line from the file is to be read into asingle 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 the INPUT # statement is executed. The macro function EOF(fileNumber) can be used to determine whether the end-of-file has been reached.
See Also: INPUT, OPEN, CLOSE
COMPATIBILITY: All versions
EXAMPLES:
For j = 1 To 20 Input #1, jx(j), jy(j)Next
Input #1, name$
Open "i", 2, "testfile"Do While Eof(1) = 0 Input #2, a$ Print a$Loop
LABELS
PURPOSE: To provide a reference to locations in the macro for GOTO, GOSUB, ON ERROR, or RESUME statements.
SYNTAX: label:
EXPLANATION: "label" can be up to twenty characters long, may consist of letters and numbers and must begin with a letter. A macro language statement can optionally follow a label on a line.
See Also: GOTO, GOSUB, ON ERROR, RESUME
COMPATIBILITY: All versions
EXAMPLE:
retry: ' this is a labelInput "Enter a number less than 20: ", xIf x >= 20 Then Goto retry
LAYER Statement
PURPOSE: To turn drawing layers on or off and to set the current layer.
SYNTAX: LAYER(expression1) = expression2
EXPLANATION: The LAYER statement can be used to set a layer to be visible/invisible or editable/uneditable. It can also be used to set the current layer. The following values can be used with the LAYER statement:
0 – Invisible and not editable2 – Visible but not editable6 – Visible and editable
14 – 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 be used to getthe current status of a layer. See the macro language function descriptions inthe next chapter.
The REGEN statement or the DesignCAD >Regenerate command should be used to regenerate the drawing if the visibility of layers has been changed. Otherwise, entities from invisible layers may remain on the screen, while entities from visible layers may not appear on the screen.
If you have used PUTATTR to change the layer of an item, you must use the LAYER statement to reset the current layer in order for the layerinfo in the coordinate bar to display correctly. You can use:
Layer(Sys(3)) = 14 ' This updates the layer information in the ' drawing.
COMPATIBILITY: All versions
EXAMPLES:
Layer(1) = 14 ' set the current layer to layer 1
For j = 0 To 1000 ' make all visible and editable Layer(j) = 6Next j
LOCATE Statement
PURPOSE: To position the cursor in a text window.
SYNTAX: LOCATE row, column
EXPLANATION: The LOCATE statement positions the cursor in the text window that was opened by the WINDOW statement. The next PRINT statement will begin at the specified row and column.
This statement has no effect if a text window is not open (it has no effecton PRINT # statements either).
See Also:
COMPATIBILITY: All versions.
EXAMPLE:
Window 7, 40Locate 3, 9Print "centered in the window"Anykey
MESSAGE Statement
PURPOSE: To output data to the screen.
SYNTAX: MESSAGE {listOfExpressions}
EXPLANATION: The MESSAGE statement is used to output numeric and/or string expressions to the DesignCAD screen. It is similar to the PRINT statement except that a dialog window is opened for each message statement. The macro pauses until the user presses one of the message box buttons. This command uses the Windows MessageBox function.
If more that one line is to be output Chr$(13) can be included in the output expressions to provide a carriage return.
As of version 13, you can now specify what the style of message box the MESSAGE statement displays: OK, Yes/No, OK/Cancel, Retry/Cancel, etc.Sys(1027) sets the MessageBox Style, while Sys(1028) holds the user's response.
See Also: WINDOW, INPUT
COMPATIBILITY: All versions
EXAMPLES:
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 window again?"If Sys(1028) = 6 Then Goto Again ' If user presses yes, show it againEnd IfSys(1027) = 0 'Simple OK MessageBox styleMessage "See you later!"End
ON ERROR Statement
PURPOSE: To set up an error handling routine.
SYNTAX: ON ERROR GOTO label
EXPLANATION: After the ON ERROR statement has been executed, any macro language error will cause the execution to be transferred to the specifiedlabel. Macro execution will continue from the label until a RESUME statement is encountered.
This statement is used to trap errors in a macro. The Err() function can be used to determine the error code. See the RESUME statement.
See Also: RESUME
COMPATIBILITY: All versions
EXAMPLE:
On Error Goto keepgoingGet 4, 30, nothing$ ' generates an error (no file open)Print "Still going strong!" ' second line printed
On Error Goto badfileOpen "i", 1, "------" ' error due to invalid filenamePrint "No Error" ' this won't be printed
finish:Print "Macro Done" ' fourth line printedEnd
badfile:Print "Error: ", Err(1) ' third line printedResume finish ' macro jumps to the finish label
keepgoing:Print "Error: ", Err(1) ' first line printedResume ' macro continues at the next line
OPEN Statement
PURPOSE: To open a file for input or output for the INPUT #, PRINT #, GET, or PUT statements.
SYNTAX: OPEN "A", fileNumber, fileNameOPEN "I", fileNumber, fileNameOPEN "O", fileNumber, fileNameOPEN "R", fileNumber, fileName, recordLength
EXPLANATION: 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" parameter before the file name. To open a file for sequential output, use "O" (this is the letter "o", not the number zero). You can use "A" to append data to a file – this is like "O", but if the file exists data will be output to the end of the file.
To open a file for random access (for GET or PUT) use "R"; if random access is specified the record length must also be specified. This valuerepresents the number of bytes that will be read or 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 twenty files can be opened at one time (the limit was four in version 12.0 and earlier). FileName can be any valid Windows file name, including the path.
See Also: INPUT #, PRINT #, GET, PUT
COMPATIBILITY: All versions. Note that the limit on the number of files increased from 4 to 20 in version 13.
EXAMPLES:Open "A", 1, "outputFile" ' you may use “A” or “a” – this parameter is not
' case-sensitiveOpen "o", 1, "outfile"
Input "Enter input file name: ", file$Open "i", 1, file$Open "r", k, file$, 80
PARSE Statement
PURPOSE: To extract values from a specially-formatted string and store them in variables.
SYNTAX: PARSE in$, fmt$, var1 [, var2, var3, …]
EXPLANATION: The PARSE statement allows the user to read data from specially-formatted strings into variables. This can be especially useful for retrieving values from a command line. in$ is the string to be parsed. It can be a string variable or an expression. fmt$ is a string specifying the number, types and ordering of the variables to be extracted from the input string. var1, var2, etc. are the names of the variables to be initialized from the input string.
By default, all values are assumed to be space-delimited, but the format-specifier can explicitly define the delimiters for a specific variable. A delimiter is necessary any time a string to be read contains spaces or other punctuation. Almost any character can be used for a string delimiter– the choice of the best character will depend on the situation.
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 %f
Sample format string:
fmt1$ = "%n %d ^%s^"
This string implies two numbers, each separated by spaces, followed by a string enclosed in carets. The following input string would match the 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 format string and attempting to parse it with str1$ would result in a syntax error. However a slightly changed format string will correctly parse str2$:
fmt2$ = "%n, %d, ^%s^"
See Also: FORMAT
COMPATIBILITY: Version 14 and later.
EXAMPLES:
Parse "24.5 12 37 <a delimited string>", "%f %d %n <%s>", 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$
POINTVAL Statement
PURPOSE: To assign the coordinates of one of the points that has been set (either by the user in response to a SETPOINT statement, or by the ENTITY statement) to three variables.
SYNTAX: POINTVAL Xvariable, Yvariable, Zvariable, expression
EXPLANATION: Xvariable, Yvariable and Zvariable 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 system function Sys(1). An error will occur if expression is greater than the number of points set in Sys(1).
Note: This statement was previously documented without commas separating the variables. It often works either way, but the commas are recommended for consistency with other statements and in some cases may be required.
See Also: ENTITY, SETPOINT, SetPoints
COMPATIBILITY: All versions
EXAMPLE:
' get all points into jx, jy, jzFor j = 1 To Sys(1) Pointval jx(j), jy(j), jz(j), jNext j
POPPOINT Statement
PURPOSE: Remove a point from the point buffer.
SYNTAX: POPPOINT expression
EXPLANATION: This statement removes the nth indexed point from the point buffer.
See Also: PUSHPOINT
COMPATIBILITY: Version 14 and later.
EXAMPLE:
SetPoint "Input up to 10 points: ", 10If Sys(1) > 3 Then For i = Sys(1) To 4 Step -1 PopPoint i 'remove all but first three points from buffer Next i ' compare points 2 and 3. Delete point 3 if to the left of or below 2. PointVal x2, y2, z2, 2 PointVal x3, y3, z3, 3 If (x3 < x2) Or (y3 < y2) Then PopPoint 3 PushPoint x2+1, y2+1, z3 End If >Line { <UsePresetPoints }End If
PRECISION Statement
PURPOSE: To set the precision for PRINT statements and for numeric-to-string conversions.
SYNTAX: PRECISION expression
EXPLANATION: The PRECISION statement determines the number of digits to the right of the decimal point to be used in PRINT statements and in numeric-to-string conversions.
For example, a precision of zero can be used to print or assign only whole numbers. A precision of four can be used to print numbers to the nearest .0001.
The PRECISION statement affects only the conversion of a numeric expression to a string – it does not affect the value of a numeric variable. It does not affect the numeric precision displayed in DesignCAD's coordinate bar, Info Box, or command dialogs.
The precision remains the same until it is changed again by the PRECISION statement or the macro ends.
Note that the PRECISION statement does not affect the way macro parameters interpret variables; see the last two examples below involving the Text command.
See Also: PRINT, PRINT #
COMPATIBILITY: All versions
EXAMPLE:
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 [x$]} ' Text drawn is "44.123" ' The string assignment was done using the current PRECISION.
>Text{
<Text [x]} ' Text drawn is "44.123456789" ' The numeric variable was converted to a string at full ' precision.
PRINT Statement
PURPOSE: To output data to the screen.
SYNTAX: PRINT {listOfExpressions}
EXPLANATION: The PRINT statement is used to output numeric and/or string expressions to the DesignCAD screen. It is identical to the PRINT # statement except the data is output to the screen rather than to disk.
The PRINT statement output is normally displayed in the DesignCAD Status 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 to the Status Bar, the PRINT statements can be separated by ANYKEY statements. This requires the user to press a key before the next line is displayed.
If a text window is open (see the WINDOW statement), the PRINT statement will be displayed in the window. The LOCATE and TAB statements can be used to position the output for the window.
The PRINT statement can be terminated with a semicolon (";") to leave the cursor at the end of the line of a text window. The next PRINT statement will begin at that location.
The MESSAGE statement is similar to the PRINT statement, but the MESSAGE statement opens a dialog window for the message. The usermust press the OK button to continue after the message is displayed.
See Also: WINDOW, PRECISION
COMPATIBILITY: All versions
EXAMPLES:
Print j, " is the current value."Print "x: ", x, " Press any key to continue"AnykeyPrint "y: ", y
Window 5, 20Print "abcd";Print "efgh" ' "abcdefgh" will be printed
PRINT # Statement
PURPOSE: To output data to a disk file.
SYNTAX: PRINT #fileNumber, {listOfExpressions}
EXPLANATION: The PRINT # statement is used to output numeric and/or string expressions to a disk file. It is identical to the PRINT statement except the data is output to disk rather than the screen. fileNumber is the file number that was used in the OPEN statement.
The file must have been opened using the OPEN statement before this statement is executed. Numeric expressions are output in ASCII format. If no expressions are used with a PRINT # statement, a blank line is output. (The previous sentence should be true, but it is currently not working that way. To output a blank line, you must currently use the following syntax:Print #1, ""This behavior appears to have been broken for several versions now; it is currently under review.)A carriage return and line feed are output after each PRINT # statement unless the statement ends with a semicolon, in which case the next PRINT # statement will begin at the end of the previous line.
The PRINT # statement can be used to output to a printer by opening the file "LPT1" with the OPEN statement; this may not be possible for all versions of Windows, however.
See Also: OPEN, PUT
COMPATIBILITY: All versions
EXAMPLE:
Open "o", 1, "filename"Open "o", 2, "filetwo"Print #1, j, " is the current value."Print #2, "x = ", xj = 2Print #j, x, y, zPrint #1,Print #1, "abcd";Print #1, "efgh"' "abcdefgh" will be printed to the file
PUSHPOINT Statement
PURPOSE: Appends a new point to the point buffer.
SYNTAX: PUSHPOINT x, y, z
EXPLANATION: This statement appends a new point to the end of the point buffer. The coordinate of the point is specified by the expressions x, y and z.
Points added to the buffer with PUSHPOINT cannot be deleted by the user via the Esc key. They can only be removed by setting Sys(1) to zero or by using the POPPOINT statement.
See Also: POPPOINT
COMPATIBILITY: Version 4 and later.
EXAMPLE:
' 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{ <UsePresetPoints}Sys(1) = 0' Re-use the last point as the beginning of the next line.PushPoint X(n), Y(n), Z(n)Goto GetTwo
PUT Statement
PURPOSE: To output a record to a random access file.
SYNTAX: PUT file, recordNumber, stringExpression
EXPLANATION: This statement is used to output a record to a random access file. The record length is specified in the OPEN statement.
When the PUT statement is executed, the string (stringExpression) will be written to the file at the designated record (recordNumber).
If the string to be output is less than the record length it will be padded with 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 numeric values to and from eight-byte strings for file input and output.
See Also: OPEN, GET, MKS$, CVS, PRINT #
COMPATIBILITY: All versions
EXAMPLE:
Open "r", 1, "test.dat", 80' read a name and address into the first and second 40 bytes of an 80 byte record ' 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
PUTATTR Statement
PURPOSE: To set the entity type, group status and layer of an entity.
SYNTAX: PUTATTR entity, type {,select, layerNumber, groupIDNumber, red, green, blue, solidIDNumber}
EXPLANATION: This statement is used to set the entity type, status, layer number, or group ID number of an entity; entity is the entity number – one for the first entity in the drawing, two for the second, etc. The specified entity will be assigned the specified attributes.
Type is the entity type. Possible values are:
1 = Line2 = Ellipse 3 = 3-D Text4 = Curve5 = Elliptical Arc11 = Bezier Curve (4-point)12 = Bezier Curve (Continuous)13 = 2-D Text15 = Attribute16 = Circle, Circular Arc17 = Hatch22 = Text Arc24 = Arrow26 = Symbol31 = Plane32 = Grid Header33 = Grid Line68 = 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 Ellipse
Select is zero if the entity is not to be selected and one if the entity is to be selected; layerNumber is the layer number to be assigned to the entity; groupIDNumber is the group ID number if the entity is to become part of that Group or zero if it is not to be part of a Group; red, green andblue define the color for the entity; solidIDNumber is the solid ID of the entity or zero if the entity is not part of a solid.
Note: Do NOT use "entity", "layer", "Entity" or "Layer" as variable names! These are reserved words.
See Also: ENTITY, GETATTR
COMPATIBILITY: All versions
EXAMPLE:
' Change all entities in layer 6 to layer 12.For j = 1 To Sys(9) ' Sys(9) is the number of entities in the drawing Getattr j, type, select, laynum, group, red, green, blue If laynum = 6 Then laynum = 12 Putattr j, type, select, laynum, group, red, green, blueNext j
QUERY Statement
PURPOSE: To get a specific bit of information from an entity that has been loaded with the Entity statement.
SYNTAX: QUERY parameter, variable [, variable, variable, …]
EXPLANATION: This statement is used to a specific bit of information about a loaded entity. 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 the entityENT_NPTS – obtains the number of points in the entityENT_POINT – obtains the XYZ values of a given point in the entityCA_RADIUS – the radius of the entity, if a circle or arcCA_CENTER – the center of the entity, if a circle or arcT_FONTTYPE – the type of font, if the entity contains a text stringT_FONT – the font of the text, if a text entityT_TEXT – the entity's text string, if a text entity
Available parameters and corresponding values are listed in DCADALIAS.d3i and described in QUERY and CHANGE Parameters
See Also: CHANGE, GETATTR, PUTATTR, ENTITY
COMPATIBILITY: Version 14 and later.
EXAMPLE:
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{
}
REGEN Statement
PURPOSE: To redraw the currently active view.
SYNTAX: REGEN
EXPLANATION: Some activities, when performed from a BasicCAD program, may not regenerate the screen immediately afterwards. The REGEN statement forces DesignCAD to redraw the drawing onto the screen. The REGEN statement may be necessary, for example, after changing layers, or after changing the background color.
COMPATIBILITY: All versions
EXAMPLE:
' 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
RESUME Statement
PURPOSE: To resume macro execution after an ON ERROR unit.
SYNTAX: RESUME {label}
EXPLANATION: The RESUME statement is used to continue macro execution after an ON ERROR unit has been activated by a macro language error.
Label can be used to specify the location at which macro execution will resume. If the label is omitted, the macro execution will resume at the statement following the one that caused the error.
See Also: ON ERROR
COMPATIBILITY: All versions
EXAMPLE:
On Error Goto handler Open "i", 1, "------" ' invalid file name Print "No error" ' this won't be printed
cont: Print "Macro done" ' second line printed End
handler: Print "Error: ", err(1) ' first line printed Resume cont
RUN Statement
PURPOSE: To transfer control to another macro or to a DOS or Windows program.
SYNTAX: RUN programName$ {, Status}
EXPLANATION: The Run statement can be used to run another DesignCAD macro or anexternal program from within your macro. The following status values can be used with the RUN statement:
0 – resume the macro immediately (default)
1 – halt the macro until the focus returns to DesignCAD. This will occur even if the other program is still running! All it takes is a clickon the DesignCAD window, or an Alt+Tab to switch focus to DesignCAD.
2 – halt the macro until the OLE Automation program issues a ResumeBasicCAD command. This option should only be used when specifying a DesignCAD-based OLE Automation program inthe RUN statement.
Running another DesignCAD macro with the RUN statement
When this statement is used to run another DesignCAD macro all the variables from the current macro are cleared when the other macro is executed. A string variable or constant can be used for the macro name.
The RUN statement causes the new macro (programName$) to replace the current macro in memory. To return to the original macro, you must execute another RUN or CHAIN statement from the new macro. The execution of a macro called by the RUN statement always begins at the first line in the called macro.
You should always specify the extension in the filename of the macro to be run. To use an encrypted BasicCAD program, specify the extension .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 CHAIN statement 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 still 10.125 at the start of macro2.d3m if you CHAIN from macro1 to macro2.
Running an EXE program with the RUN statement
To run an external program from within a macro, just specify the program name with the RUN statement. For example:
run "notepad.exe c:\test.dat", 1
This command will run the notepad editor and automatically load the file TEST.DAT if it exists. The macro will continue as soon as the focus is returned to DesignCAD (whether or not notepad is closed).
With the RUN statement, you can run both DOS and Windows applications.
Running a BAT file with the RUN statement
To run a DOS batch file from within a macro, you must run COMMAND.COM to interpret the batch file. It is usually best to use the/C command-line switch for command.com, which forces the DOS window to close when the batch file is done. For example:
run "cmd.exe /C myscript.bat"
Using the new CmdLine statement to pass command line parameters to a macro or program
You may also pass commandline parameters through the Commandline statement. Repeating the above:
Cmdline "/C myscript.bat"' Now open a command prompt and run the above commandsRun "cmd.exe"
See also: CHAIN, CALL, CMDLINE
COMPATIBILITY: All versions
EXAMPLE: 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 method Message "Back in the macro again"
CmdLine "1, 10, 0" ' set the commandline for the run statementRun "LineFromHere.d3m"
SETLAYERPROPS Statement
PURPOSE: To set a layer's default color and linestyle settings from preset values.
SYNTAX: SETLAYERPROPS layerIndex
EXPLANATION: This statement is used to override the default settings for a layer. The layer's settings are loaded from Sys functions Sys(530) through Sys(542):
530 – Layer uses specific color? (0 = no, 1 = yes)531 – Layer’s red color [0-255, default = 0]532 – Layer’s green color [0-255, default = 0]533 – Layer’s blue color [0-255, 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 width specified does not match one of the preset values, the actual width will change to the next lowest preset width value (0.00, 0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 would revertto 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 being loaded.To use this statement, set the desired layer properties by modifying the values in Sys(530-542), then run the SetLayerProps statement.Note: changing a layer's settings won't automatically update all entities that are already on that layer; to do that you must also run the UpdateLayer statement after running SetLayerProps.
See Also: GETLAYERPROPS, UPDATELAYER
COMPATIBILITY: Version 14 and later.
EXAMPLE:
Sys(530) = 1Sys(531) = 0Sys(532) = 128Sys(533) = 0Sys(534) = 1Sys(535) = 4Sys(536) = 1.5
Sys(537) = 0Sys(538) = 1Sys(539) = 20Sys(540) = 1Sys(541) = 1SetLayerProps 2Window 12, 50UpdateLayer 2
SETPOINT Statement
PURPOSE: To prompt the user to set a number of points.
SYNTAX: SETPOINT string, expression
EXPLANATION: This statement displays the message in "string," and allows the user to set a number of points. "expression" is the maximum number of points to be set. The user can press ENTER or ESC before all the points are set. 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 the variables. It often works either way, but the commas are recommended for consistency with other statements and in some cases may be required.
See Also: POINTVAL, SetPoints
COMPATIBILITY: All versions
EXAMPLE:
retry: Setpoint "Set 2 to 4 points.", 4 If Sys(1) < 2 Then Goto retry
SETSELECTEDPOINTS Statement
PURPOSE: To set highlighted points in PointSelect Mode into a point buffer for retrieval by POINTVAL.
SYNTAX: SETSELECTEDPOINTS
EXPLANATION: This statement stores the locations of all highlighted points in PointSelect Mode (points may be highlighted by selecting an entity in PointSelect Mode, then dragging a selection box around one or more of the points in the selected entity. The selected points turn solid blue.) The system function Sys(1) is the current number of points set – it can be checked to determine if any points were highlighted.
See Also: POINTVAL
COMPATIBILITY: Version 13 and later.
EXAMPLE:retry:
Message "Select an entity on the screen"Setpoint "Set a point on an entity... ", 1Pointval x y z 1>PointSelect{ <Pointxyz [x, y, z]}If Sys(80) < 1 Then Goto retry
If Not Sys(345) Then >PointSelectMode { }End IfMessage "Now select some points on the entity"
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 <Pointxyz [x, y, z] Pointval x y z 2 ' get the second point the user set <Pointxyz [x, y, z]}SETSELECTEDPOINTSIf Sys(1) < 1 Then Message "No points selected. Try again." Goto retry2End IfMessage "Moving the selected points..."Pointval x y z 1 'get the first selected point
>GroupPointsMove{ <Pointxyz [x, y, z] <PointRel 5, 5, 0}
STOP Statement
PURPOSE: To terminate the macro and return to DesignCAD.
SYNTAX: STOP
EXPLANATION: The STOP statement can be placed anywhere in the macro. When the macro executes the STOP statement, the macro terminates.
A STOP or END statement at the end of the macro is usually optional – your macro will stop running after it executes the last line of the macro file. However, it is not optional if you have subroutines following the main body of the macro (either directly or through an INCLUDE statement at the end of the file). In such a case, you must provide a STOP or END statement at the end of the main routine or the subroutines will be run after the main body of your macro should have ended.
The STOP statement behaves exactly the same as the END statement; either one will end your macro.
COMPATIBILITY: All versions
EXAMPLE:
If i > max Then Stop
TAB Statement
PURPOSE: To move the cursor in a text window to a certain column.
SYNTAX: TAB column
EXPLANATION: This statement moves the cursor to a specified column in the text window. The next PRINT statement will begin at that column.
If the new column is less than the current column, the cursor will move to the next line. The average character width of the current font is used to calculate character columns, since, in Windows, different characters may have different widths.
Note: The TAB statement is ignored by PRINT # statements.
See Also: PRINT, PRINT #
COMPATIBILITY: All versions
EXAMPLE:
Window 5, 30 ' open a window 5 x 30 chars.Print "left side"; ' ";" leaves on same lineTab 20 ' move to column 20Print "right side" ' print at column 20
UPDATE Statement
PURPOSE: To update the bounding box of an entity that has been changed using the CHANGE statement.
SYNTAX: UPDATE
EXPLANATION: This statement forces DesignCAD to recalculate the bounding box of an entity that has been modified using the CHANGE statement.
See Also: CHANGE
COMPATIBILITY: Version 14 and later.
EXAMPLE:
Entity 1Change ENT_POINT, 1, 0, 0, 0UpdateRegenerateAll{}
UPDATELAYER Statement
PURPOSE: To update all entities in a layer to match the layer's settings.
SYNTAX: UPDATELAYER [layerNumber]
EXPLANATION: This statement forces DesignCAD to all entities in a layer to match the layer's settings. If layerNumber is not specified all entities in the drawingare updated to match their host layer.
See Also: SETLAYERPROPS, GETLAYERPROPS
COMPATIBILITY: Version 14 and later.
EXAMPLE:
Entity 1Change ENT_POINT, 1, 0, 0, 0UpdateRegenerateAll{}
WCLOSE Statement
PURPOSE: To close the text window
SYNTAX: WCLOSE
EXPLANATION: This statement closes the text window. The drawing behind the text window will return.
A text window that is opened by the WINDOW statement remains on thescreen until it is closed or until the macro terminates.
See Also: WINDOW
COMPATIBILITY: All versions
EXAMPLE:
Window 5, 20 ' open a window 5 x 20 chars.Locate 3, 10Print "This is a test"AnykeyWclose ' close the text window
WINDOW Statement
PURPOSE: To open a text window to display the output from PRINT statements.
SYNTAX: WINDOW numberOfRows, numberOfColumns
EXPLANATION: This statement opens a text window or dialog on the screen; numberOfRows and numberOfColumns are the number of rows and columns for the text window – they determine the window size.
By default, the window is centered on the screen. However, the location of the window's upper left corner can be controlled by using system variable functions Sys(132) and Sys(133). The window's caption canbe changed by modifying system string function Sys$(42). A captionless window (no title bar) may be created by assigning an empty string "" to Sys$(42). Once these sys functions are set, they remain in effect for all subsequent windows until they are reset or until the macro ends.
As long as the text window is open all PRINT statements are displayed in the window. The text window remains open until a WCLOSE statement is executed or until the macro terminates.
The CLS, LOCATE and TAB statements can be used to clear the screenand position the cursor in the text window. The COLOR statement can be used to set the text color inside the window.
Only one text window can be open at a time.
See Also: WCLOSE, CLS, TAB, LOCATE, COLOR, PRINT
COMPATIBILITY: All versions
EXAMPLE:
Window 5, 20 ' open a window 5 x 20 chars.Locate 3, 10Print "This is a test"
Chapter 2: Macro Language - Functions
Macro language functions can be used in numeric expressions. The functions all have a single numeric argument, which can be any numeric expression. For example, ABS(J * 2) would be equal to the absolute value of J * 2.
The following functions are supported:
Numerical Functions
System Functions
String Functions
Two other functions that are supported are:
SYS(x) - System Variable FunctionThis function returns the value of a DesignCAD System Variable. The variable returned is determined 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 returned is determined by the value of the argument. See the SYS$ function.
Macro Error Codes
Macro Language Key Words
Macro Limitations
Numerical Functions
ABS(x) – Absolute value of x. – always returns a positive numberACOS(x) – Arc cosine of x (result is in degrees) [-1 <= x <= 1]ANGLE(dx, dy) – Get the angle of a line dx long and dy highASIN(x) – Arc sine of x (result is in degrees) [-1 <= x <= 1]ATAN(x) – Arc tangent of x (result is in degrees)COS(x) – Cosine of x (where x is in degrees, not radians)EXP(x) – Exponential - e^xHCOS(x) – Hyperbolic cosine of xHSIN(x) – Hyperbolic sine of xHTAN(x) – Hyperbolic tangent of xINT(x) – Truncates x to integer closest to zeroLN(x) – Natural logarithm of xLOG(x) – Logarithm (base 10) of xODD(x) – Returns one if x is odd, zero if x is evenROUND(x) – Round x to the nearest integerSGN(x) – Sign of x (-1 if x < 0; 0 if x = 0; 1 if x > 0)SIN(x) – Sine of x (where x is in degrees, not radians)SQR(x) – Square of x (x^2)SQRT(x) – Square root of x (x must be positive)TAN(x) – Tangent of x (where x is in degrees, not radians)TRUNC(x) – Truncate x to integer closest to zero (same as INT)
System Functions
AREA(x) – Area of the entity x; if x is a grid entity, AREA(x) finds the surface area.
EOF(x) – Returns 1 if file x is at end-of-file, 0 otherwise. Note that x is the number used to OPEN the file.
ERR(x) – Returns the error code of the error. This function returns zero until an ON ERROR has been activated. The error codes are listed in the Macro Error Codes topic. You can use any number or variable for x – it doesn't matter, as long as there is some expression inside the parentheses.
EXIST(a$) – Returns 1 if file a$ exists, 0 if not and -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 used elsewhere to start a path in the DesignCAD root directory.
LAYER(x) – Layer status of layer x. Returns one of these legal values: 0, 1, 2, 3, 6, 7, 14, 15.Assuming: 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.
String Functions
ASC(a$) – ASCII code for the first character of a$.a$ = "Test"y = ASC(a$)' y = 84
CVS(a$) – Convert the eight-character string a$ to a real number. This is the inverse of MKS$.
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 is returned if there are no occurrences.
a$ =" This is a test"b$ = "test"z = INSTR(a$,b$)' z = 11
LEN(a$) – Length of string a$.a$ = "This is a test"l = len(a$)' l = 14
VAL(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.6708
a$ = "45"
n = Val(a$)
' n = 45.0000
n may now be used for calculations.
Note: To convert a numeric value back into a text string, just use a normal Assignment statement, 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 = 8
b$ = 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 = 6b$ = 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 yanykey
RIGHT$(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)
SYS Functions
The SYS function represents many different DesignCAD system variables. SYS(1), for example,is the number of points set and SYS(3) is the current layer. A list of the available SYS 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 the current macro.
1 – Number of points currently in the point buffer after being set by SETPOINT, ENTITY or SETSELECTEDPOINTS statement. Mostly read-only, but you can clear the point buffer by setting it to 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 = special-3, 12 = special-4]Numbers above 12 can be used but will refer to custom line types which may vary from user to user or even drawing to drawing.
5 – Current line type scale [0<=x<=10e6]
6 – Current line width [0 <=x<=10e6]
7 – Current distance precision displayed in the coordinate bar and in dialogs. [-7<=x<=15]
8 – Current angular precision displayed in the coordinate bar and in dialogs. [-7<=x<=15]
9 – Number of entities in the drawing (Read-only)
10 – 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]
(The values for km, feet and miles are new as of version 15)
11 – Printing scale (drawing units per unit of paper) [0<=x<=10e6]Proper interpretation of this value will require that you know both the drawing's units of measurement and the print units of measurement. For example, if your drawing is in inches,but your paper is measured in centimeters, a print scale of 1.0 will have a different meaningthan if the paper was measured in inches.You may set this value to zero to force the print to fit to the page.
12 – Default text size [0<=x<=10e6]
13 – Default text angle [-36<=x<=360]
14 – 2-D Mode display grid type|[0 = grid, 1 = tickmarks, 2 = dots (Version 15 and earlier)]; [0 = Ortho, 1 = Isometric, 2 = Polar (Version 16 and later)]
15 – Display grid enable/disable [0 = off, 1 = on]
16 – Enable/Disable Use Plot Range Box [0 = Disable, 1 = Enable] If enabled, draws a rectangle around the plot boundary when exporting HPGL files. If disabled, no border is plotted. (Version 15)
17 – Snap grid on or off [0 = off, 1 = on]
18 – Plot point optimization [0 = unchanged, 1 = optimized (default)]This function determines whether the Export Plot File command rearranges points in adjacent entities to minimize pen movement. (Version 13)
19 – Minor Display Grid spacing along x (or angular spacing for polar grid; version 16 and later);Display grid size (distance between grid lines; version 15 and earlier)
20 – Minor Display Grid spacing along y (or radial spacing for polar grid) (Version 16 and later); 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 the visibility of attribute definitions use Sys(62).By default, attributes are assumed to be visible, so old macro code which used only the 0 and 1 values for this function will still behave much as before. That behavior will only change 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, while geographical 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 inch width or height (5 inches along longest side). Note that the 5-inch size does not include the border margin – that's just the output size of the drawing data. Given a default margin of 1/8inch, 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" check box 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, use a very short wave file – if you set points faster than the sound file can play some beeps will be skipped (but the points will stillbe 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 the pointing device (mouse or digitizer puck/pen) stops moving. Since in tracing mode the user normally is looking at the drawing he is digitizing rather than at the screen, this usually presents no problem.If Sys(28) is turned on, then the coordinate bar will continuously update as the pointing device is moved on the tablet. With some digitizers, the on-screen cursor is not able to keep up as the pointer is moved across the tablet, resulting a slow-motion replay on screenof the motion performed on the tablet. This also sometimes causes points to be dropped if the user sets points too quickly.
30 – Large cursor step size [0<=x<=10e6]
31 – Small cursor step size [0<=x<=10e6]
32 – Drawing unit size [0<=x<=10e6]
Note: Sys(32) is used internally by DesignCAD as scale factor for certain operations. Change it only with extreme caution. Careless use can destroy a drawing's data.
Especially avoid very small numbers (such as zero) and very large ones (such as one million).
33 – Font Type [0 = TrueType, 1 = Vector]34 – Selection flag (Read-only) [1 = entities selected, 0 = nothing selected]
35 – Default number of sides for polygons [3-100]
36 – Silent mode (0 = normal operation, 1 = silent mode, 2 = extra-silent mode)
In silent mode, the screen does not automatically show the points you set, or update the drawing screen as frequently. This mode is used for greater speed when your macro hascomplete control of the program and you are not expecting user input.Silent mode 2 completely suppresses view regeneration and drawing command dialogs when you draw entities.
Note: After performing any drawing operations in Silent Mode 2, you will need to manually regenerate the screen after setting Silent Mode back to zero. Note: You should always return silent mode to zero when your macro exits. Failure to doso 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] (3-D text only.)
If you mirror a piece of text with this setting turned on the mirrored text is drawn backwards.
39 – Point mark type [1 = cross, 2 = cross+square, 3 = cross+circle, 4 = cross+circle+square]
40 – Crosshair enable/disable [0 = off, 1 = on]
41 – Rubberband type
This sets the type of rubberband-line that is displayed as points are set by the program or during SetPoint:
0 = none1 = line2 = 2-D-Box3 = 3-D-Box4 = Curve5 = Bezier Curve6 = Circle(center-radius)7 = Circle(diameter points)8 = Circle(3-point)9 = Arc(center-start-end)10 = Arc(3-point)11 = Ellipse12 = Elliptical Arc13 = Plane14 = OrthoLine15 = Cylinder16 = Cone,17 = Truncated Cone18 = Sphere19 = Hemisphere20 = Torus
21 = Tube22 = RoundBox23 = Angled 2-D-Box24 = Elliptical Arc(center, axis1, axis2, start angle, end angle)25 = Arc(beginning, end, center)26 = Parallelogram
42 – Parallel-2 offset distance [0<=x<=10e6]
43 – Dimension text spacing [0<=x<=2]Default is 1.0; sets the gap between dimension text and arrows.
44 – Default Print Corner (for non-centered printing) [0 = Upper Left, 1 = Lower Left, 2 = Upper Right, 3 = Lower Right]
45 – Output WMF size (inches) along longest size (width or height). This Sys function overrides the current setting of Sys(25). Setting this value to zero restoresthe normal function of Sys(25).
46 – Margin for WMF output (inches). Default value is 1/8 inch.
47 – AutoRender in Paperspace ModeThis function controls whether ViewFrames with OpenGL shading are automatically rendered when you enter Paperspace mode. If set to 0, the viewframes are not autorendered 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 snap preview can sometimes slow down the mouse movement, so a means is provided to turn it off.
49 – Disable Cursor Movement [0 = off, 1 = on] When this flag is on it prevents the cursor from following the points which the macro sets in drawing commands. This can often speed up drawing operations. (Version 13)
50 – Cursor Lock behavior in 2-D mode [0 = new behavior – Shift forces Ortho Mode from the last point set, 1 = old behavior – Shift locks horizontal movement from the last cursor position and Ctrl locks vertical movement from the last cursor position.]
51 – Display Arcs as Vectors [0 = Disable, 1 = Enable] If this is set to zero, arcs are drawn using Windows API functions exclusively. The default setting is 1, whereby arcs are displayed as vector approximations in order to prevent display anomalies where an arc joins the end of a line. (Version 14)
52 – Sets the major Display Grid divisions along X (or Angular spacing for Polar grid) (Version 16)
53 – Sets the major Display Grid divisions along Y (or Radial spacing for Polar grid) (Version 16)
54 – Sets the Display Grid style [0 = lines, 1 = dots, 2 = crosses] (Version 16)
55 – Sets the Display Grid Angle (in degrees) for isometric display grids [0 – 360] (Version 16)
60 – Tick mark segments [0<=x<=10e6]
61 – Tick mark segment division [0<=x<=10e6]
62 – Attribute Definition display mode [0 = Don't display, 1 = Display only visible attribute definitions, 2 = Display all attribute definitions]This function applies only to attribute definition entities, not attribute entities. To control the visibility of attribute entities use Sys(21). (Version 13)
69 – Combine line segments after Fillet or Chamfer [0 = off, 1 = on (default)]Normally, when you fillet or chamfer two polylines, DesignCAD re-combines the segments on either side of the fillet. If Sys(69) is set to zero DesignCAD will leave the filleted/chamfered segments broken away from the other parts of the polylines. (Version 13)
70 – Old-style Fillet command behavior [0 = off (default), 1 = on]Normally, when you fillet two lines, DesignCAD changes their layer and linestyle properties,as well as that of the fillet arc, to match the first line clicked. If Sys(70) is set to 1 DesignCAD emulates the old-style behavior (which only matched the fillet arc to the first line); the second line retains its original style and layer. Note that this setting always defaults back to zero when DesignCAD starts. (Version 13)
71 – Currently active view number
72 – Graphics Acceleration Setting for Hidden Line Removal [0 = off (default), 1 = on] (Version 15)
80 – Number of entities currently selected [0-65000]If any grid entities are selected, this number does not include grid lines, only the grid headers. Not affected by PUTATTR. Sys(80) can be set to zero to clear the current selection set (nothing is selected). Zero is the ONLY value that can be written to this Sys() function.
81 – SetPoint behavior [0 = clear buffer (default), 1 = append points to buffer]Normally, when you run the SetPoint statement, it clears any previous points from the point buffer. If Sys(81) is set to 1, you can run multiple SetPoint statements to accumulate more and more points. (Version 14)
Functions 90 – 99 are properties of an entity just selected with the Entity statement. Theyare all read-only values.
90 – Entity type
91 – Entity line type
93 – Entity layer
94 – Group number
95 – Solid number
96 – Selection status of entity [0 = not selected, 1 = selected]
97 – Line type scale
98 – Line thickness
99 – Number of points in the entity (or number of grid lines for a grid header entity)
100 – Line Fill Spacing for HPGL Export Controls the spacing between line fill pen strokes. Distance in plotter units. (Version 15)
101 – Dimension text format [0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches] (same as Sys(424) – changing one changes the other)
102 – Static dimensioning enable/disable [0 = off, 1 = on]
Static dimensions are drawn as individual arrows, lines and text. However, when you first draw a static dimension, all the pieces still form a group, which will need to be exploded if you want to edit an individual piece.
104 – Dimension arrowhead style [1-12]
106 – Dimension precision [-7<=x<=15]
110 – Coordinate system [-1 = left-hand, 1 = right-hand]
111 – Symbol Explode Layer Control Flag [0 = default behavior, 1 = flatten symbol layers, 2 = nested layer 0, 3 = mostly flattened] (Version 13)This function allows the programmer to control the destination layer(s) for exploded symbols. This setting is NOT "sticky" and only applies to the document which was open when it was set. Possible values:0 – default behavior. A symbol's entities get exploded onto their original layers. Entities that were defined on layer 0 of the symbol (or on layer 0 of any symbols within the exploded symbol) move to the layer on which the symbol was placed.1 – flatten symbol layers. All of the symbol's entities get exploded to the layer on which the symbol was placed.2 – nested layer 0. As default behavior, except for entities that were on layer 0. Any entities that were on layer 0 of an included symbol move to the layer on which the included 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 in case2.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 on Layer 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 red line 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 green star 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 windowSets the number levels of nested folders under the symbol library search path. Default value of 1, which only shows a tab for the target path and any folders immediately beneath it that contain drawing files. Higher values will show tabs for increasingly deeperfolder levels. 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 in order to update the Symbol Library display. (Version15.1)
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 [0 = off, 1 = on]Version 17 offers a new option in the Trim commands: Trim Picked Segments Only. This option affects whether or not segments beyond the selected segment are also trimmed away. (Version 17)
140 – Sets/Clears the "Grid Smoothly Degrade" checkbox in Grid Options [0 = off, 1 = on]If this is set to 1, the display grid will smoothly reduce the number of visible grid lines as you zoom out. If it is set to 0, the grid will become invisible if you zoom out too far to display every grid division. (Version 17)
150 – Coordinate bar angle display mode [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 entities 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 entities only [0 = no, 1 = yes]190 – Selection Handle 1 X value [-10e6<=x<=10e6]
191 – Selection Handle 1 Y value [-10e6<=x<=10e6]
192 – Selection Handle 2 X value [-10e6<=x<=10e6]
193 – Selection Handle 2 Y value [-10e6<=x<=10e6]
194 – Selection Handle 3 X value [-10e6<=x<=10e6]
195 – Selection Handle 3 Y value [-10e6<=x<=10e6]196 – Selection Minimum X [-10e6<=x<=10e6]197 – Selection Minimum Y [-10e6<=x<=10e6]198 – Selection Maximum X [-10e6<=x<=10e6]199 – Selection Maximum Y [-10e6<=x<=10e6]200 – Selection Minimum Z [-10e6<=x<=10e6]201 – Selection Maximum Z [-10e6<=x<=10e6]202 – Selection Handle 1 Z value [-10e6<=x<=10e6]203 – Selection Handle 2 Z value [-10e6<=x<=10e6]204 – Selection Handle 3 Z value [-10e6<=x<=10e6]205 – View rotation about X axis
206 – View rotation about Y axis
207 – View rotation about Z axis
208 – View distance
209 – Projection mode [0 = perspective, 1 = parallel]
210 – The number of view windows in the active drawing
211 – The currently active view window in the active drawing
212 – The number of drawings currently open (Read-only)
213 – The currently active drawing
219 – Layer Toolbox visibility [0 = off, 1 = on]
220 – Toolbar visibility [0 = off, 1 = on]
221 – Main Toolbox visibility [0 = off, 1 = on]
222 – Snap Toolbox visibility [0 = off, 1 = on]
223 – Status Bar visibility [0 = off, 1 = on]
224 – Coordinate bar visibility [0 = off, 1 = on]
225 – 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 entity when created [0 = no, 1 = yes]
243 – This flag is no longer supported; used to be Shade when Created
244 – 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 – 2-D mode working plane [0 = xy, 1 = zy, 2 = xz]
250 – AutoSave status [0 = off, 1 = on]
251 – AutoSave time interval (minutes)
252 – Display Grid extent
253 – 3-D Display Grid Plane [0 = xy, 1 = zy, 2 = xz]
254 – Draw text in current color [0 = no, 1 = yes]
255 – Draw text in current layer [0 = no, 1 = yes]
256 – Default text layer
257 – Text justification [0 = left, 1 = center, 2 = right]
258 – Text style [0 = normal, 1 = bold, 2 = italic, 3 = bold italic]
259 – Text arc vertical scale
261 – Draw attributes in current color
262 – Draw attributes in current layer
263 – Default attribute layer
269 – Number of Arc SegmentsThis function controls the number of segments to create when an arc, ellipse, or circle is created as a plane or line. Note 1: this only affects initial creation – it does not affect conversion to plane or vector after the entity is created.Note 2: This represents the total number of segments for the new entity – 20-degree arcs and full circles will have the SAME NUMBER OF SEGMENTS. For example, if it is set to 20, a circle drawn with the "create as line" option will have 20 segments, as will a 20-degreearc created with the "Save as line" option. (Version 16)
270 – Display Entities by Layer Order [0 disables, 1 enables] (Version 16)
271 – Layer List Filter Mode [0 = Active Layers Only, 1 = Named Layers Only, 2 = Active Or Named Layers Only, 3 = All Layers, 4 = Layer Groups Only] (Version 16)
272 – Layer List Sort Mode [0 = by index, 1 = by status, 2 = by name, 3 = by content] (Version 16)
273 – Number of Multiline Styles in the current document (Read-only) (Version 16)
274 – Number of Layer Groups in the current document (Read-only) (Version 16)
279 – MultiLine Mode Status [0 = off, 1 = on]If MultiLine Mode Status is on, all new lines will be drawn as multilines. (Version 16)
280 – Current Layer Group Number [0 = off, 1 = on]If MultiLine Mode Status is on, all new lines will be drawn as multilines. (Version 17)
281 – Current Layer Group Status [0 = invisible, not editable, 2 = visible, not editable, 4 = visibleand editable] (Version 17)
Functions 290 – 299 are properties of an entity just selected with the Entity statement.
290 – Current Entity color’s Red value [0-255]
291 – Current Entity color’s Green value [0-255]
292 – Current Entity color’s Blue value [0-255]
293 – Current Entity Double Line Cap Style (Read-only) [0 = none, 1 = beginning, 2 = end, 3 = both]
294 – 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) [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 ENTITY statement. (Version 13)
297 – Entity Construction Line Type (Read-only) [0 = not a construction line, 1 = ray, 2 = construction line]This function indicates the construction line type of the current entity selected by the ENTITY statement. (Version 13)
298 – Entity Attribute Definition Text Type (Read-only) [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 the ENTITY statement. (Version 13)
299 – Entity Attribute Definition Visibility [0 = not an attribute definition, 1 = visible, 2 = hidden]This function indicates the visibility of the current Attribute Definition entity selected by the ENTITY statement. (Version 13)Note: The Attribute Definition Display Mode flag (Sys(62)) must be set to 1 or 2 for ANY attribute definitions to be visible.
300 – Current drawing color’s Red value [0-255]
301 – Current drawing color’s Green value [0-255]
302 – Current drawing color’s Blue value [0-255]
306 – Rubber-band color’s Red value [0-255]
307 – Rubber-band color’s Green value [0-255]
308 – Rubber-band color’s Blue value [0-255]
309 – Major Grid color’s Red Value [0-255] (Version 16)Display Grid color’s Red value [0-255] (Version 15 and earlier)
310 – Major Grid Color (Red Value) [0-255] (Version 16)Display Grid color’s Green value [0-255] (Version 15 and earlier)
311 – Major Grid Color’s Blue value [0-255] (Version 16)Display Grid color’s Blue value [0-255] (Version 15 and earlier)
312 – Point color’s Red value [0-255]
313 – Point color’s Green value [0-255]
314 – Point color’s Blue value [0-255]
315 – Selection color’s Red value [0-255]
316 – Selection color’s Green value [0-255]
317 – Selection color’s Blue value [0-255]
318 – Dimension color’s Red value [0-255]
319 – Dimension color’s Green value [0-255]
320 – Dimension color’s Blue value [0-255]
321 – Background color’s Red value [0-255]
322 – Background color’s Green value [0-255]
323 – Background color’s Blue value [0-255]
324 – Selection rubberband color’s Red value [0-255]
325 – Selection rubberband color’s Green value [0-255]
326 – Selection rubberband color’s Blue value [0-255]
327 – Entity point color (point select mode), Red value [0-255]
328 – Entity point color’s Green value [0-255]
329 – Entity point color’s Blue value [0-255]
331 – Cursor color’s Red value [0-255]
332 – Cursor color’s Green value [0-255]
333 – Cursor color’s Blue value [0-255]
334 – 3-D cursor X color’s Red value [0-255]
335 – 3-D cursor X color’s Green value [0-255]
336 – 3-D cursor X color’s Blue value [0-255]
337 – 3-D cursor Y color’s Red value [0-255]
338 – 3-D cursor Y color’s Green value [0-255]
339 – 3-D cursor Y color’s Blue value [0-255]
340 – 3-D cursor Z color’s Red value [0-255]
341 – 3-D cursor Z color’s Green value [0-255]
342 – 3-D cursor Z color’s Blue value [0-255]
343 – Smooth solids when shading [0 = off, 1 = on]
344 – 2-D Drafting Mode status [0 = off, 1 = on] (Read-only)
345 – Point Select Mode Status [0 = off, 1 = on] (Read-only)
346 – 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 texture
350 – Current material color’s Red value [0-255]
351 – Current material color’s Green value [0-255]
352 – Current material color’s Blue value [0-255]
353 – Default text color’s Red value [0-255]
354 – Default text color’s Green value [0-255]
355 – Default text color’s Blue value [0-255]
356 – Default attribute color’s Red value [0-255]
357 – Default attribute color’s Green value [0-255]
358 – Default attribute color’s Blue value [0-255]
359 – Default dimension color’s Red value [0-255]
360 – Default dimension color’s Green value [0-255]
361 – Default dimension color’s Blue value [0-255]
370 – Default Double Line width
371 – 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 index
376 – Minor Display Grid Color’s Red value) [0-255] (Version 16)
377 – Minor Display Grid Color’s Green value) [0-255] (Version 16)
378 – Minor Display Grid Color’s Blue value) [0-255] (Version 16)
390 – Number of attribute definitions in the block entity (Version 13)391 – Index of current attribute definition in the current block entity [0 to clear, or if none
selected] (Version 13)392 – Indexed attribute definition type (in current block) [1 = fixed, 2 = changeable] (Version 13)393 – Indexed attribute definition visibility (in current block) [1 = visible, 2 = hidden] (Version 13)401 – Angular dimension prefix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
402 – 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 arrows, 2 = text below and between arrows, 3 = text aligned to right of arrows, 4 = text above and right of arrows, 5 = text below and right of arrows, 6 = text aligned to left of arrows, 7 = text above and left of arrows, 8 = 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.456, 1 = 123-1/8, 2 = 123' 1.5",
3 = 123' 1-1/2"]
424 – Dimension text format [0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches] (identical to Sys(101) – changing one changes the other)
425 – Progressive text direction [0 = along dimension, 1 = horizontal]
428 – Angular dimension text format [0 = degrees, 1 = grads, 2 = radians, 3 = degrees + minutes + seconds]
433 – Angular dimension precision [-7<=x<=15]
437 – Link inward arrows [0 = off, 1 = on]
438 – Dimension text size [0<=x<=10e6]
441 – Dimension tolerance text size [0<=x<=10e6]
442 – Overshoot of Dimension extension lines [0<=x<=10e6]
443 – Gap of Dimension extension lines [0<=x<=10e6]
444 – Length of Dimension extension lines [0<=x<=10e6]
446 – Text balloon radius [0<=x<=10e6]
447 – Dimension line offset for baseline dimension [0<=x<=10e6]
450 – Dimension arc prefix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
451 – Dimension arc suffix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
452 – Dimension arc text location [0 = above, 1 = below]
453 – Pullout text location [0 = inline, 1 = above, 2 = below]
454 – Progressive dimension text location [1 = above, 2 = below]
455 – Dimension chamfer text location [0 = inline, 1 = above, 2 = below]
456 – Dimension arc text orientation [0 = along center of arc, 1 = horizontal]
457 – Pullout text orientation [0 = parallel to arrow, 1 = perpendicular to arrow, 2 = horizontal, 3 = vertical]
458 – Progressive dimension text orientation [0 = horizontal, 1 = vertical, 2 = upside down, 3 = vertical reversed]
459 – Dimension chamfer text orientation [0 = parallel to arrow, 1 = perpendicular, 2 = horizontal, 3 = vertical]
462 – Dimension arrowhead scale [0<=x<=1.0e6]
Length of arrowhead relative to text height
463 – Dimension arc precision [-7<=x<=15]464 – Dimension chamfer precision [-7<=x<=15]465 – Dimension coordinate precision [-7<=x<=15]466 – Dimension diameter precision [-7<=x<=15]467 – Dimension radius precision [-7<=x<=15]468 – Dimension progressive precision [-7<=x<=15]469 – Dimension radius progressive precision [-7<=x<=15]470 – Prevent user from starting commands while macro is running [0 = off, 1 = on]
Use this function to prevent the user from starting a command while the macro is waiting for the user to set points. It is only effective until the current macro ends.
480 – Prevent entity types from being selected. [0 clears, 1 disables lines, 16 disables circles/arcs, etc.]
See the PutAttr statement for a list of entity type numbers. Use repeated calls to disable more than one entity type. Set to zero to restore normal selection. This function is only effective until the current macro ends.
481 – Prevent drawing commands from accessing point information from entities on hidden layers [0 = off, 1 = on]
500 – Dimension Baseline text location [0 = text aligned between arrows, 1 = text above and between arrows, 2 = text below and between arrows, 3 = text aligned to right of arrows, 4 = text above and right of arrows, 5 = text below and right of arrows, 6 = text aligned to left of arrows, 7 = text above and left of arrows, 8 = 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<=x<=15]
504 – Dimension Baseline prefix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
505 – Dimension Baseline suffix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
510 – Dimension Extended text location [0 = text aligned between arrows, 1 = text above and between arrows, 2 = text below and between arrows, 3 = text aligned to right of arrows, 4 = text above and right of arrows, 5 = text below and right of arrows, 6 = text aligned to left of arrows, 7 = text above and left of arrows, 8 = text below and left of arrows]
511 – Dimension Extended text format [0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches]
512 – Dimension Extended text orientation [0 = parallel, 1 = perpendicular, 2 = horizontal, 3 = vertical]
513 – Dimension Extended text precision [-7<=x<=15]
514 – Dimension Extended prefix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
515 – Dimension Extended suffix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
520 – Dimension Distance text location [0 = text aligned between arrows, 1 = text above and between arrows, 2 = text below and between arrows, 3 = text aligned to right of arrows, 4 = text above and right of arrows, 5 = text below and right of arrows, 6 = text aligned to left of arrows, 7 = text above and left of arrows, 8 = text below and left of arrows]
521 – 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<=x<=15]
524 – Dimension Distance prefix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
525 – Dimension Distance suffix [0-5; 0 = None, 1 = Custom1, 2 = Custom2, etc.]
530 – Layer uses specific color [0 = off, 1 = on]Don't set this unless you've already set Sys(531), Sys(532) and Sys(533). (Version 14)
531 – Layer's red color value [0-255, default = 0] (Version 14)
532 – Layer's green color value [0-255, default = 0] (Version 14)
533 – Layer's blue color value [0-255, default = 0] (Version 14)
534 – Layer uses specific linestyle [0 = no, 1 = yes]
Don’t set this to 1 before you have set Sys(535-540). (Version 14)
535 – Layer's linetype [0-12; 0 = solid (default), 1 = dashed, 2 = hidden, 3 = center, 4 = phantom, 5 = dotted, 6 = dashdot, 7 = border, 8 = divide, 9 = special-1, 10 = special-2, 11 =special-3, 12 = special-4]Numbers above 12 can be used but will refer to custom line types which may vary from user to user or even drawing to drawing.
536 – Layer’s line scale [0-1e6, default = 2] (Version 14)
537 – Layer’s unit-based linewidth (0-1e6, default = 0) (Version 14)
538 – Does this layer use fixed linewidth? [0 = use Sys(537) value, 1 = use Sys(539) value]If 0, use the width specified by Sys(537); if 1, use the linewidth specified by Sys(539) (Version 14)
539 – Fixed linewidth in hundredths of mm five [0-211 (ex. 50 = .5 mm)]If the width specified does not match one of the preset values, the actual width will change to the next lowest preset width value (0.00, 0.05mm, 0.09mm, 0.13mm, etc.), so for example 12 would revert to 9, for 0.09mm. (Version 14)
540 – Does this layer use filled lines? [0 = no, 1 = yes] (Version 14)
541 – Enforce layer color settings on all new entities [0 = no, 1 = yes]
This matches the “Color by layer” setting in the Options menu. (Version 14)
542 – Enforce layer linestyle settings on all new entities [0 = no, 1 = yes]
This matches the “Line style by layer” setting in the Options menu. (Version 14)
550 – Default Fixed Lineweight (in 1/100ths of a millimeter) [1 = visible, 2 = hidden]This function indicates the current default linewidth if fixed lineweight is active (and no layer settings override the default setting). (Version 14)
551 – Fill fixed-weight lines (applies to on-screen display only) [0 = no, 1 = yes]This function indicates whether fixed-weight lines will be filled on-screen. (Version 14)
552 – Display Fixed-weight lines onscreen [0 = no, 1 = yes]This function indicates whether fixed-weight lines will be displayed at their fixed width on-screen. (Version 14)
553 – Print Fixed-weight lines [0 = no, 1 = yes]This function indicates whether fixed-weight lines will be printed at their set fixed width. If both Sys(553) and a print-option pen weight are specified, then the print-option width will bethe minimum lineweight printed. (Version 14)
554 – Scale factor for fixed-weight lines (per-session only, not stored in the drawing)
This function allows you to scale the fixed-weight lines if desired when printing to different sizes than usual. For example, if you normally print a D-size plot and need to do a letter-sized test print, you can scale the fixed-weight lines down to avoid losing details due to the fixed line width. (Version 14)
555 – Attribute Definition behavior when exploding blocks [1 = explode to attribute (uses the textcontents, not the tag name), 2 = leave as attribute definition]This function allows you to control what happens to attribute definitions when a block is exploded. (Version 14)
600 – Minimum X-value of the current display area [-10e6<=x<=10e6]
601 – Maximum X-value of the current display area [-10e6<=x<=10e6]
602 – Minimum Y-value of the current display area [-10e6<=x<=10e6]
603 – Maximum Y-value of the current display area [-10e6<=x<=10e6]
650 – Distance value returned by AngleDistance or LineDistance
651 – X-angle value returned by AngleDistance or LineAngle
652 – Y-angle value returned by AngleDistance
653 – Z-angle value returned by AngleDistance
654 – XY-angle value returned by AngleDistance
655 – Area value returned by Area or SurfaceArea or Volume
656 – Volume value returned by Volume command
657 – Interference check result
658 – Perimeter command resultThe numeric result of the >Perimeter macro command is stored here. (Version 17)
800 – Macro debug trace mode [0 = off, 1 = on, 2 = log to file]
This function allows you to examine the behavior of all or part of your macro as it executes. The macro will print each line to the debug window as the line is executed. When you set this function's value to 2, DesignCAD will dump the trace results to a log file, appending a .log extension to the macro's name (e.g. "MyMacro.d3m" logs to "MyMacro.d3m.log")
801 – Paperspace Mode [0 = off, 1 = on]
802 – Number of Paperspace Layouts – can be set to 0 to delete all existing layouts
803 – Index of current Paperspace Layout (starts at 1)
804 – Orientation of current Paperspace Layout [0 = Portrait, 1 = Landscape]
805 – Paper Width (inches) of current Paperspace Layout
806 – Paper Height (inches) of current Paperspace Layout
807 – Left Margin (inches) of current Paperspace Layout
808 – Right Margin (inches) of current Paperspace Layout
809 – Top Margin (inches) of current Paperspace Layout
810 – Bottom Margin (inches) of current Paperspace Layout
811 – Paper Measurement Units of current Paperspace Layout [1 = inches, 25.4 = mm, 2.54 = cm, .0254 = m]
996 – Enhanced Esc Key Behavior [0 or 1]0 (default) – Esc key behaves normally; if pressed during a drawing command (such as Circle or Line) it terminates that command and offers the chance to end the entire macro. If pressed in the middle of a batch of macro language operations it ends the macro immediately.1 (enhanced) – Esc key opens "do you want to quit?" dialog. Answer "No" resumes operation without skipping any commands. Answer "Yes" terminates the macro. If Esc is pressed during a drawing command (such as Circle or Line), that command is NOT terminated if the user answers "No", you must either complete the command or end the entire macro.
You can turn Sys(996) on and off for different parts of your macro. If you CHAIN to another macro, the current setting of Sys(996) is lost; the new macro assumes default behavior 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 is specifically 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 or 1]
0 for Enter or OK; 1 for Esc or Cancel
1000 – Print By Layer Order [0 = no, 1 = yes]
If “no” DesignCAD prints in display order.
1001 – Snap range in pixels
This sets the minimum distance in pixels that the cursor must be from the desired snap location.
1002 – Skip DWG Hatch patterns [0 = no, 1 = yes]
If this mode is on, all DWG hatch patterns will be skipped when importing DWG files. Occasionally this may help import an otherwise intractable DWG drawing.
1004 – 2-Point line DWG/DXF export [0 = off, 1 = on]This function allows you to turn the option to export lines as 2-point line entities instead of polyline entities. The default setting is off. If turned on, this function will export ALL polylinesin the drawing as 2-point Line entities. (Version 13)
1008 – Backup File Save status (Read & Write) [0 = off, 1 = on]This function indicates whether DesignCAD is set to automatically copy the previous version of your drawing to a BAK file when you save it. (Version 13)
1009 – Construction line visibility flag (Read & Write) [0 = hidden, 1 = visible]This function indicates whether DesignCAD shows or hides construction line entities. (Version 13)
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 European
1253 – Greek1254 – Turkish1257 – Baltic (Latvia, Slovenia, etc.)
1011 – DWG Import code page Supported 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.)
1015 – Sticky Handle mode (Read & Write) [0 = off, 1 = on]This function controls whether DesignCAD saves selection handles with the entity or not. (Version 13)
1016 – Synchronize Snap Grid to Display Grid (Read & Write) [0 = off, 1 = on]This function controls whether DesignCAD keeps the display grid and snap grid aligned to the same center. In previous versions the snap grid was always centered on the origin, but the new default behavior is to align them both on the same center. Therefore, it is possible to move the display grid center and have the snap grid shift to match. (Version 13)
1020 – Number of points to average when using SmoothLine
(menu command Smooth Line by Point Reduction) (Version 13)
1021 – Sets the smoothing angle to be used by SmoothLine2
(menu command Smooth Line by Angle Detection) (Version 13)
1022 – Smoothed lines convert-to-curves flag [0 = leave, 1 = convert to curve] (Version 13)
1023 – Enable/Disable SmoothOptions dialog for smooth commands [0 = hide, 1 = show] (Version 13)
1024 – Angle Constraint mode (Read & Write) [0 = off, 1 = on]This function allows the programmer to enable or disable Angle Constraints in a macro. (Version 13)
1027 – Message Box Button Style for the Message statement [0 = OK (default), 1 = OK/Cancel, 2 = Abort/Retry/Ignore, 3 = Yes/No/Cancel, 4 = Yes/No, 5 = Retry/Cancel] This function allows the programmer to specify the style of MessageBox that appears for the Message statement. (Version 13)
1028 – Return code for the last Message statement (Read-only) [1 = OK, 2 = Cancel, 3 = Abort, 4 = Retry, 5 = Ignore, 6 = Yes, 7 = No] This function allows the programmer to determine the user's response to a Message statement. (Version 13)
1032 – Plane Snap mode (Read & Write) [0 or 1]This function controls the behavior of the Plane Snap command. When set to zero, the plane snap command snaps to the nearest point in the mathematical plane occupied by thenearest 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 the nearest point on the nearest surface (default). (Version 13)
1033 – Symbol Snap mode (Read & Write) [0 or 1]This function controls the behavior of the Snap commands in the vicinity of symbols. When
set to zero, the snap commands ignore entities that are embedded in symbols. When set to one (default), the snap commands can snap to points on entities inside symbols. (Version 13)
1035 – Reconstruct grids after solid operations [0 = no, 1 = yes]By default, DesignCAD will attempt to combine adjacent facets from a cut grid entity into one or more new grids. By turning this flag off, all facets of a cut grid will be converted to planes. (Version 15)
1036 – Make invisible attributes selectable [0 = no, 1 = yes] If this is set to 1, SelectAll will select both visible and hidden attributes on visible layers. (Version 15)
1040 – Entity ID (Read-only?) (Version ??)
1041 – Section number (Read-only?) (Version ??)
1100 – Current Units of Measurement [0 = none, 1 = inches, 2 = feet, 3 = miles, 4 = mm, 5 = cm, 6 = m, 7 = km] (Version 15)
1101 – Default Units of Measurement for new drawings [0 = none, 1 = inches, 2 = feet, 3 = miles, 4 = mm, 5 = cm, 6 = m, 7 = km] (Version 15)
1102 – Default Units of Measurement for unitless drawings [0 = none, 1 = inches, 2 = feet, 3 = miles, 4 = mm, 5 = cm, 6 = m, 7 = km] (Version 15)
1103 – Interruptible Snap Mode [0 = off, 1 = on] (Version 15)
1104 – Running Snap Mode [0 = off, 1 = on] (Version 15)
Which snaps are on during Running Snap Mode are determined by Sys(1105)-(1109)
1105 – Running Gravity Snap [0 = disabled, 1 = enabled] (Version 15)
1106 – Running Line Snap [0 = disabled, 1 = enabled] (Version 15)
1107 – Running Midpoint Snap [0 = disabled, 1 = enabled] (Version 15)
1108 – Running Intersect-1 Snap [0 = disabled, 1 = enabled] (Version 15)
1109 – Running Tangent Snap [0 = disabled, 1 = enabled] (Version 15)
1110 – Current Toolbars Visibility [0 = off, 1 = on]Reflects the current status of Show All Toolbars command (Version 15)
1111 – Snap to Hatch points [0 = disabled, 1 = enabled] (Version 15)
1112 – File Lock [0 = unlocked, 1 = locked by another instance of DesignCAD] (Version 15)
1113 – Drawing Handles Visible [0 = no, 1 = yes] (Version 15)
1114 – Printing Base Units [1 = inches, 2 = feet, 3 = mi, 4 = mm, 5 = cm, 6 = m, 7 = km]
(See also Sys(10)) (Version 15)
1115 – Explode Symbols/Blocks at Top-Level only [0 = no (explodes recursively) 1 = yes (retains sub-blocks or symbols)] (Version 15)
1116 – PresetPoint Mode [0 = off, 1 = on] (Version 15)
1117 – Skip font data when saving DC2/DC3 ASCII files [0 = off, 1 = on] (Version 15)
1118 – Ortho tolerance angle (Default value 10 degrees)This setting controls the maximum deviation from horizontal/vertical axes that the Ortho command will convert to horizontal or vertical. (Version 15)
1119 – Truncate trailing zeros in dimensions? [0 = no, 1 = yes] (Version 15)
1120 – Truncate trailing zeroes in angular dimension? [0 = no, 1 = yes] (Version 15)
1121 – Truncate trailing zeroes in arc dimensions? [0 = no, 1 = yes] (Version 15)
1122 – Truncate Trailing zeroes in chamfer dimensions? [0 = no, 1 = yes] (Version 15)
1123 – Truncate trailing zeros in diameter dimensions? [0 = no, 1 = yes] (Version 15)
1124 – Truncate trailing zeros in radius dimensions? [0 = no, 1 = yes] (Version 15)
1125 – Truncate trailing zeros in coordinate dimensions? [0 = no, 1 = yes] (Version 15)
1126 – Truncate trailing zeros in progressive dimensions? [0 = no, 1 = yes] (Version 15)
1127 – Truncate trailing zeros in progressive radius dimensions? [0 = no, 1 = yes] (Version 15)
1128 – Truncate trailing zeros in distance-only dimensions? [0 = no, 1 = yes] (Version 15)
1129 – Truncate trailing zeros in baseline dimensions? [0 = no, 1 = yes] (Version 15)
1130 – Truncate trailing zeros in extended dimensions? [0 = no, 1 = yes] (Version 15)
20000 – Owner Validated flag
This is set to 1 if a protected drawing has been accessed with the correct password. The value is zero if the owner has not entered the password during this session, or if the drawing is unprotected.
20001 – Password Protected [0 if unprotected, non-zero otherwise]
20004 – Export disabled [0 allows export (no layer protection in the exported file), 1 prevents export to other file formats]
20007 – Save To Older Format disabled [0 allows the file to be saved to older DesignCAD formats (no layer protection in the saved file), 1 prevents the file from being saved to older file formats]
20008 – Symbol Load/Merge disabled [0 allows the drawing to be merged or used as a symbol (no layer protection in the loaded/merged data), 1 prevents the file from being loaded as a symbol or from being merged into another drawing]
20011 – Priority Class [32 = normal, 64 = idle, 128 = high priority, 256 = real-time priority]
Using SYS Functions
To use a SYS function in a macro, use it like you would any other function. For example, the following program segment checks that at least three points have been set:
if Sys(1) < 3 then setpoint "Set at least three points." 3 end if
The SYS function is different from the other macro functions in that you can assign a value to most SYS variables. In other words, you can use the SYS function on the left side of the equal sign 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 the variable on the left side of the equal sign. For example to set the current value for SYS(421) to the 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 be regenerated with the REGEN statement or the DesignCAD >Regenerate command (or the >RegenerateAll command to update all views). For example, if you change the view characteristics or the screen colors, the drawing screen must be regenerated for correct operation. The macro language interpreter does NOT check for valid SYS assignments or screen regeneration – if you change the SYS variables, your macro is responsible for all validity checking.
The SYS variables 90-93 can be used together with the ENTITY statement to read the type, linetype and layer of the entity referred to by the last ENTITY statement.
SYS$ Function
The SYS$ function represents several different DesignCAD system variables in string format. For example, SYS$(6) is the current path name. A list of the available SYS$ functions follows:
0 – Commandline parametersThis function contains any extra information that was on the command line after the macro name, or was passed by the CMDLINE statement to a RUN or CALL statement. For example, if you run mymacro.d3m by typing "mymacro.d3m 1, 10, 100" at the commandline, when the macro checks Sys$(0) it will find the string "1, 10, 100". (Version 14)
1 – Entity text string (Read-only)
This is the text from a Text or Attribute entity that was "loaded" with the ENTITY statement.
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 (without the path) (Read-only)Contains an empty string until the drawing has been saved at least once.
5 – Current drive (Read-only)
6 – Current path name
7 – 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 (\).
22 – Default bitmap directoryTerminate the desired directory with a backslash (\).
23 – Default macro directoryTerminate the desired directory with a backslash (\).
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 directory Terminate the desired directory with a backslash (\).
38 – Default export directory Terminate the desired directory with a backslash (\).
39 – Default EXE directory Terminate the desired directory with a backslash (\).
40 – Windows clipboard text
41 – Input window captionUse an empty string "" for no title bar.
42 – Output window captionUse an empty string "" for no title bar.
43 – Default Symbol Library Path (Version 15) Terminate the desired directory with a backslash (\). Example:Sys$(43) = " C:\Users\<user>\Documents\DesignCAD 3D MAX 25 64-bit\My Symbols\"
90 – Name of current view window
91 – Name of current material
92 – Entity color (Read-only)
This 9-digit string represents the RGB values for the color of the item referenced by the last ENTITY statement. It replaces Sys(92) in earlier versions of DesignCAD. The first three characters represent the red component, the second three the green component and the last three the blue component of the color. 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 current Entity 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)
200 – Statusbar panels visibility (write_only)This is a six-digit string consisting of ones and zeros. Each digit controls the visibility of one of the panes of the status bar, as follows:Digit Panel1 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 six charactersin length, or it will be ignored. Any character other than "0" (zero) will make the corresponding panel visible.Examples: Sys$(200) = "010001" ' shows only points counter and working planeSys$(200) = "111111" ' turns all panels back on
Notes: The string must be exactly six characters long, or it will have no effect on the currentsettings. Any character other than "0" will turn the corresponding panel ON. (Version 13)
296 – Entity Symbol Name (Read-only)This function contains the full path and filename of the symbol entity currently selected by the ENTITY statement, or the block name if the entity is a block. (Version 13)
297 – Entity Attribute Definition Tag
This function contains the tag name of the Attribute Definition currently selected by the ENTITY statement. (Version 13)
298 – Entity Attribute Definition PromptThis function contains the user prompt for the Attribute Definition currently selected by the ENTITY statement. (Version 13)
299 – Entity Attribute Definition Default TextThis function contains the default text of the Attribute Definition currently selected by the ENTITY statement. (Version 13)
300 – Entity NameThis function contains the name of the ENTITY statement. (Version 16)
301 – Layer Group Name
This function contains the name of the current layer group. (Version 17)
390 – Indexed Block Attribute Definition TagThis function contains the tag name of the indexed Attribute Definition that is contained in a Block entity currently selected by the ENTITY statement. The index of the attribute definition being described is set by Sys(391). (Version 13)
391 – Indexed Block Attribute Definition Default Text (Read-only)This function contains the default text string for the indexed Attribute Definition that is contained in a Block entity currently selected by the ENTITY statement. The index of the attribute definition being described is set by Sys(391). (Version 13)
392 – Indexed Block Attribute Definition TextThis function contains the actual text contents of the indexed Attribute Definition that is contained in a Block entity currently selected by the ENTITY statement. The index of the attribute definition being described is set by Sys(391). (Version 13)
Sample code – how to extract Attribute Definition data from blocks:For entnum = 1 To Sys(9) ' check every entity in the file Entity entnum On Error Resume If (Sys(90) = 26) And (Sys(296) = 3) Then ' This is a Symbol entity, of subtype Block blkName$ = Sys$(296) nAttributes = Sys(390) for i = 1 to nAttributes ' get data for every attribute definition in this ' block instance Sys(391) = i isFixed = Sys(392) isVisible = Sys(393) tag$ = Sys$(390) ' attribute definition tag defText$ = Sys$(391) ' default text string attText$ = Sys$(392) ' actual text string next i End If If Sys(90) = 71 Then ' This is an attribute definition (outside a block) isFixed = Sys(298) isVisible = Sys(299) tag$ = Sys$(297) ' attribute definition tag prompt$ = Sys$(298) ' user prompt defText$ = Sys$(299) ' default text string End If If Sys(90) = 68 Then ' This is a construction line
CLineType = Sys(297) If CLineType = 0 Then CLMsg$ = "Invalid Data" End If If CLineType = 1 Then CLMsg$ = "Construction Line" End If If CLineType = 2 Then CLMsg$ = "Construction Ray" End If End IfNext entnum
803 – Current Paperspace Layout Name
Using SYS$ Functions
To use the SYS$ function in a macro, use it like you would any other string function. For example, the following macro displays the current drive letter and path name:
message Sys$(6)
Macro Limitations
Maximum Program Size: Depending on available memory, up to 30,000 lines. Blank lines and lines containing only comments do not count.
Maximum Array Size: Depending on available memory, up to 200,000 elements (total of all arrays).
Maximum Number of Array Dimensions: 1
Maximum Number of Symbols: 200,000; symbols include Labels and Variables, each elementof 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: Depending on available memory, up to 30,000 strings.
Macro Language Key Words
The 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 SETPOINTSETSELECTEDPOINTS SGNSIN SQR SQRTSTEP STOP STRSTRING$ SYS SYS$SYSEX SYSEX$ TABTAN TO TRUNCUPDATE UPDATELAYER WCLOSEWINDOW
Macro Error Codes
When the macro interpreter encounters an error the error code is displayed along with the macro line in which the error occurred. The macro error codes and their meanings are listed below:
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.57 – 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
be open.106 – A GET or PUT statement was attempted when the file was not open or was not opened
for random access (R).107 – The layer number was out of range in a LAYER statement.108 – The entity is not a symbol.
SysEx Function
The SysEx functions are numeric variables that are stored in text files and are therefore remembered between DesignCAD sessions. There are 10,000 values available: SysEx(1) through SysEx(10000). The variables are stored in files of 100 each, as follows:
SysVal_001.ini stores SysEx(1) through SysEx(100).SysVal_002.ini stores SysEx(101) through SysEx(200)etc. throughSysVal_100.ini stores SysEx(9901) through 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 in the ini file's name. For example,ClearStorage 100 clears SysVal_100.ini, thereby clearing all values from SysEx(9901) through SysEx(10000).
Example:
For k = 1 To 5SysEx(k) = (k-1)^2
Next k
For k = 1 to 5Message "n: ", k-1, " n squared: ", SysEx(k)
Next k
SysEx$ Function
The SysEx$ functions are string variables that are stored in text files and are therefore remembered between DesignCAD sessions. There are 10,000 strings available: SysEx$(1) through SysEx$(10000). The variables are stored in files of 100 each, as follows:
SysStr_001.ini stores SysEx$(1) through SysEx$(100).SysStr_002.ini stores SysEx$(101) through SysEx$(200)etc. throughSysStr_100.ini stores SysEx$(9901) through 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 number in the ini file's name. For example,ClearStorage$ 100 clears SysStr_100.ini, thereby clearing all values from SysEx$(9901) through SysEx$(10000).
SelectScale
Chapter 3: Macro LanguageDesignCADCommands and Parameters
Parameters to Set PointsDesignCAD Macro Commands
Parameters to set points:
When developing a macro, sometimes you want the user to set the points himself, but most of the time you want to set the points in the macro. The following macro parameters provide you with a number of ways to set points where you want them.
Note: If your macro starts with the command >SetStartPoint{} the coordinates are measured from the start point NOT from the true origin of the drawing. Be cautious when using the point parameters. The result of using some of these parameters can vary greatly depending on whether the drawing is in 2-D Selection Mode or 3-D Selection Mode.
<CG x, y, zUse this to set a point at the center of gravity of the entity at x, y, z. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0
}' draw a line from the center of gravity ' of the box to a point 5 units right, 5 ' units up and 5 units forward from the ' center.>Line{
<CG 0.2, 0.3, 9.5<Pointrel 5, 5, 5
}
<Gravity x, y, zUse this to set a point at the existing point nearest x, y, z in the drawing. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Line{
<Pointxyz 5, 5, 0<Pointxyz 10, 5, 0<Pointxyz 10, 10, 0
}>Circle4{
<Radius 1.0<Gravity 4.5, 4.5, 0<Pointrel 1, 0, 0<Pointrel 0, 1, 0
}>Circle4{
<Gravity 9.9, 9.9, 0.5<Pointrel 1, 0, 0<Pointrel 0, 1, 0
}
<Int1 x, y, zUse this to set a point at the intersection nearest x, y, z. Be aware that the result can vary, depending on whether you are in 2-D Selection Mode or 3-D Selection Mode. Also, if you set x, y, z too far away from any intersections (or there are no intersections at all), the point will be set exactly on x, y, z.
Example:>Line{
<Pointxyz 10, 0, 0<Pointxyz 10, 10, 0
}>Line{
<Pointxyz 5, 5, 0<Pointxyz 15, 5, 0
}>Line{
<Int1 9.5, 9.5, 0<PointRel 5, 5, 0
}
SelectScale
<Int2 x1, y1, z1, x2, y2, z2Use this to set a point at the intersection of two specific lines; x1, y1, z1 selects one of the intersecting lines and x2, y2, z2 selects the other line. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Line{
<Pointxyz 10, 0, 0<Pointxyz 10, 10, 0
}>Line{
<Pointxyz 5, 5, 0<Pointxyz 15, 5, 0
}>Line{
<Int2 9.5, 9.5, 0, 4.5, 0.5, 0.5<PointRel 5, 5, 0
}
<LinePlane XL, YL, ZL, xp, yp, zpUse this to set a point at the intersection of the line specified by XL, YL, ZL and the plane specified by xp, yp, zp. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Plane{
<Pointxyz 5, 0, 0<Pointxyz 10, 0, 0<Pointxyz 7.5, 10, 0
}>Line{
<Pointxyz 7, 3, -5<Pointxyz 7, 3, 5
}>Line{
<LinePlane 7, 3, -5, 5, 0, 0<PointRel 10, 0, 0
}
<LineSnap x, y, z
Use this to set a point on the line nearest to x, y, z. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 5, 5, 0
}>Line{
<Pointxyz 0, 10, 0<Pointxyz 15, -5, 0
}>Line{
<LineSnap 2, 9, 0<LineSnap 4.5, 3.7, 0
}
<MidPoint x, y, zUse this to set a point at the midpoint of the line segment or arc specified by x, y, z. Results mayvary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Line{
<Pointxyz 0, 0, 0<Pointrel 10, 10, 0
}>Line{
<MidPoint 2, 2, 0<Pointrel 5, 0, 0
}
<PlaneSnap x, y, zUse this to set a point on the plane nearest to x, y, z. Results may vary between 2-D Selection Mode and 3-D Selection Mode.
Example:>Plane{
<Pointxyz 0, 0, 5<Pointxyz 10, 0, 5<Pointxyz 10, 10, 5<Pointxyz 0, 10, 5
SelectScale}>Line{
<Pointxyz -1, 0, 0<Planesnap -1, 0, 0<Pointxyz 5, 5, 0<Planesnap 5, 5, 0<Pointxyz 11, 11, 0<Planesnap 11, 11, 0
}
<PointPolar distance, angle, planeUse this to set a point at a specific distance and angle. The angle can be measured in the XY, YZ, or XZ planes. Plane: 0 = xy, 1 = yz, 2 = xz. If no point was previously set, the distance is calculated from the origin (or starting point if >SetStartPoint{} was used initially).
Example:>Line{
<Pointxyz 10, 0, 0<PointPolar 10, 90, 2<PointPolar 10, 90, 0<PointPolar 10, 180, 0<PointPolar 10, 279, 0<PointPolar 10, 270, 2
}
<PointRel dx, dy, dzUse this to set a point at relative x, y and z offsets from the last point set. If no point was previously set, the offsets are relative to the origin (or starting point if >SetStartPoint{} was used initially).
Example:
>Line{
<Pointxyz 0, 0, 0<PointRel 10, 0, 0<PointRel 0, 10, 0
}
<PointXYZ x, y, zUse this to set a point at absolute coordinates.
Example:
>Line{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}
<QuadrantSnap x, y, zUse this to set a point at the nearest quadrant point of a circle or arc.
Example:
>Circle{
<Type 0<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}>Line{
<QuadrantSnap 11, 0, 0<QuadrantSnap 0.5, 10.5, 0<QuadrantSnap –10.0, -0.25<QuadrantSnap 0, -10.2, 0
}
<UsePresetPointsUse this parameter to automatically use all the points in the point buffer (they are not erased from the buffer by this usage). This avoids the necessity to use PointVal to place the points in an array and then cycle through the array to set the points in the drawing command.
Example:
SetPoint "Set five points...", 5>Line{
<UsePresetPoints<Pointxyz 10, 0, 0
}
SelectScale
DesignCAD Macro Commands
2 3 A B C D E F G H I J L
M N O P Q R S T U V W X Z
Information about using the macro commands is given in the following format:
CommandName>CommandName{
<parameter [arguments, if any]description of parameter and/or arguments
<parameter [arguments]description
<Points used by the command [if applicable]}
description of the command
Note: Any special things that might be noted.
Example:>CommandName{
<parameter1 35<parameter2 23<parameter3 "35"<Color [red, green, blue]<layer 1<incomplete
}
Certain macro parameters are common to almost all of the design CAD drawing commands. In order to save space these common macro parameters are listed here rather than being repeated for every command that accepts them. The majority of the drawing commands will take these parameters:
<Color red, green, bluered, green and blue color components [0-255]
<Layer nlayer number [0-1000]
SelectScale<Linestyle type, scale, thickness
type: [0-12; 0 = solid, 1 = dashed, etc.]scale: line type scale (affects length of dashes and gaps)width: line thicknessThe linestyle parameter only affects lines, circles, arcs and curves. Solids and surfaces are not affected. Double Line entities are also unaffected.
Several drawing commands will also accept:<Incomplete i [0 = false, 1 = true]
Set this parameter to 1 if you have only set some (or none) of the points required for the drawing command and you want the user to set the points required to complete it. For example, if you are drawing a line, by including this parameter you can place the first several points of the line in yourmacro, then let the user complete the line as he wishes. For backward compatibility, omitting the value is the same as setting it to true. In other words,
<Incomplete 1
is the same as
<Incomplete
<NULLif present, doesn't draw anything, but updates the drawing command to default to the specified parameters.
Example:>Sphere{
<Latitude 10<Longitude 10<Orientation 2<Null
}Doesn't draw a sphere, but presets the sphere command defaults to use 10 facets around, 10 facets top to bottom and a polar orientation.
If Double Line Mode is active then many drawing commands will accept these parameters as well:
<Alignment n[0 = no, 1 = yes]Use this parameter to control whether the double-line entity is drawn centered on the points, left-aligned, or right-aligned.
<AutoTrim n[0 = no, 1 = yes]Use this parameter to control whether the double-line entity is drawn with AutoTrim turned on or of.
<Cap n[0 = No Caps, 1 = Cap Beginning, 2 = Cap End, 3 = Cap Both]Use this parameter to control whether the double-line entity is drawn centered on the points, left-aligned, or right-aligned.
<Filled n[0 = no, 1 = yes]Use this parameter to control whether the double-line entity is drawn hollow or filled.
<Width wUse this parameter to set the double-line entity's width.
The five parameters above only take effect if Double Line Mode is active. Otherwise, they are ignored.
New Macro Parameters
<MinPoints npUse this parameter to set the minimum number of points a drawing command will accept. If the user sets less than this number of points and ends the command by double-clicking or pressing the Enter key, the command aborts and draws nothing. (This only affects the commands such as Line, Curve, OrthoLine, OrthoLine2, Arrow, Hatch and Plane, which all accept an arbitrary number of points.)
<MaxPoints mpUse this parameter to set the maximum number of points a drawing command will accept. Once the maximum number of points has been set, the command ends automatically. (This only affectsthe commands such as Line, Curve, OrthoLine, OrthoLine2, Arrow, Hatch and Plane, which all accept an arbitrary number of points.)
<CmdPrompt prmpt$Use this parameter to temporarily replace the default command prompt with one of your own choosing. This parameter should work with any command that shows a command prompt in the status bar.
<UsePresetPointsUse this parameter to set all the points in the point buffer for use by the drawing command.
Example 1:>Plane{
<MinPoints 4 'this command requires at least 4 points<MaxPoints 10 'this command accepts up to 10 points<CmdPrompt "Set 2 to 8 more points to complete the plane"
SelectScale
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}
Example 2:Sys(1) = 0 'clear all the points (new to 13.0.007)SetPoint "Set up to five points...", 5' add two more points to the point buffer>PresetPoint '(new to 13.0.007){
<Pointxyz 12.5, 0, 0<Pointxyz 15, 20, 0
}>Line{
<Pointxyz 0, 0, 0 ' set starting point<UsePresetPoints ' add the points from the buffer<Pointxyz 0, 0, 0 ' close the line
}Sys(1) = 0
Macro Commands
22DBox
2DMode
2DSelectMode
33DSelectMode
AAboutDesignCAD
Acquire
AddLayerToGroup
AlignObjects
AngleDistance
ApplyArrowSize
ApplyColor
ApplyDoubleLineStyle
ApplyFixedText
ApplyLayer
ApplyLineFill
ApplyLineStyle
ApplyLineWidth
ApplyMaterial
ApplyTextSize
Arc
Arc2
Arc3
Arc4
Arc5
Arc6
Area
ArrangeIcons
SelectScale
Array
Arrow
AttribDef
AttribNormalDisplay
Attribute
AutoDimension
BBalloon
BatchConvert
BatchPrint
BezierCurve
BlockDefine
BlockInsert
Box
BreakLine
CCalculator
CascadeWindows
CenterOfGravity
Chamfer
ChangeCodePage
ChangePSTemplateProperties
Circle
Circle2
Circle3
Circle4
CircleTan2Lines
CircleTan3Lines
CircleTanLine
CircularArray
ClearDrawingHandle
Close
CloseAll
ColorToolBox
Combine
ComplementArc
Cone
ConstructionLine
ContourLine
ConvertText
ConvertToMultiline
CoordinateBar
Copy
CopyBitmap
CreateLayerGroup
Crosshair
CrossSection
CursorOptions
Curve
CurveToLine
CustomColor
Cut
CutCorner
CutEdge
CutLine
Cutoff *deprecated – See SectionCut
CutoffDel *deprecated – See SectionTrim
CutPlane
Cylinder
DDCADTile
DecVDis
DeleteCurrentLayout
DeleteLayerFromGroup
DeleteWorkplane
DeSelect
DimAngle
DimArc
SelectScale
DimBase
DimCenterPoint
DimChamfer
DimCoordinate
DimDiameter
Dimension
DimensionDistanceOnly
DimExtend
DimProgress
DimRadius
DimRadProgress
DoEntitySelection
Door
DoubleLineBar
DoubleLineConvert
DoubleLineMode
DoubleLineToPlane
DoubleLineToWideLine
DragCopy
DragMove
DragMoveSelectedPoints
DragSelect
DrawingHandle
DrawingInfo
DrawSymbolAsBox
Duplicate
DuplicateToLayer
DwgIn
DwgOut
DxfIn
DxfOut
EEllipse
Ellipsoid
EllipticalArc
EllipticalArc2
EntitySelect
Erase
EraseLast
ErasePresetPoint
Exit
Explode
ExportPlotFile
Extend
ExtendByDistance
Extrude
ExtrudeAlongCurve
FFileBackup
Fillet
FilletCorner
FilletEdge
FillWideLine
FitToAllWindow
FitToWindow
GGetEntity
Gravity
GridOptions
GroupDefine
GroupExplode
HHammer
Hatch
HatchFill
HatchLine
HatchOptions
HatchPosition
SelectScale
HelpIndex
HelpUsing
Hemisphere
HiddenEdge
HiddenEdgeBySection
Hide
HideCommand
HideRestoreToolbars
HideSec
HpglIn
IIgesIn
IgesOut
IncVDis
InfoBox
Interfere
Intersect-1
Intersect-2
JJoin
LLayerCopy
LayerOptions
LayerSave
Light
Line
LineAngle
LineDistance
LinePlane
LineSnap
LineStyleToolBox
LineToCurve
LoadBMP
LoadCustomKeys
LoadCustomMenu
LoadPSTemplate
LoadToolbox
LoadWorkplane
LockX
LockY
LockZ
MMainToolBox
MakePlane
MaterialEdit
MaterialList
MaterialToolBox
Merge
Midpoint
Midpoint2
Mirror
Move
MoveCursor
MoveDown
MoveLeft
MoveRight
MoveToBack
MoveToBackOf
MoveToFront
MoveToFrontOf
MoveUp
MultilineMode
MultiLineStyleEditor
NNew
NewWindow
SelectScale
OObjectRepeat
OffScreenBitmap
Open
Options
Origin
OriginalSize
Ortho
OrthoLine
OrthoMode
PPan
PaperSpaceConfiguration
PaperSpaceMode
Parallel
ParallelByDistance
Parallelogram
PasswordProtectionManager
Paste
Patch
Perimeter
PerpendicularFrom
PerpendicularPlane
PerpendicularTo
Plane
Planesnap
PlaneSubtract
PlotSort
PointMark
PointMove
PointSelect
PointSelectMode
PolygonAdd
PolygonCenter
PolygonEdge
PolygonIntersect
PolygonSelection
PolygonSubtract
PolygonXOr
PresetPoint
PresetPointMode
PrintCurrentView
PrintNow
PSViewerBox
Pullout
PurgeBlocks
Pyramid
QQShade
QShadeSec
QuarterCircle
Quit
RRecursiveGroupExplode
Redo
Redraw
RedrawAll
Regenerate
RegenerateAll
RemoveDrawingHandles
RemoveToolbox
ResizingNodes
RestoreDCADTile
RestoreDefaultMenu
ReversePoints
RoundBox
RoundCylinder
SelectScale
Rotate
Ruler
RunX
SSave
SaveAs
SaveAsSymbol
SaveBMP
SaveCopy
SaveCurrentView
SaveCustomKeys
SaveCustomMenu
SavePSTemplate
SaveSelected
ScrollBar
SectionCopy
SectionCut
SectionCutByLine
SectionDeleteCutoff
SectionTrim
Segment
SelectAddPoint
SelectAll
SelectDelete
SelectDuplicate
SelectDuplicateToLayer
SelectEverything
SelectImageSource
SelectionFilter
SelectLayer
SelectMirror
SelectMode
SelectModeChange
SelectMove
SelectOrtho
SelectPrevious
SelectScale
SelectScaleOrtho
SelectSlant
SemiCircle
SendAllFiles
SendCurrentFile
SetColor
SetDcadTile
SetDimensionOptions
SetDrawingHandle
SetGridCenter
SetHandle
SetPoints
SetPrintOptions
SetShadeStyle
SetStartPoint
SetView
SetViewerPoints
ShadeCommand
ShadeSection
ShadeView
ShowAttributes
ShowConstructionLines
ShowDrawingHandles
ShowGrid
ShowHide
ShowSymbolHandles
ShowToolbox
Sketch
Slice
SliceBySurface
SmoothLine
SelectScale
SmoothLine2
SmoothOff
SmoothOn
SmoothSetting
SnapGrid
SnapPreviewMode
SnapSize
SnapToolBox
SolidAdd
SolidDefine
SolidExplode
SolidIntersect
SolidSegregate
SolidSubtract
SolidXOr
Sphere
Split
Split2
StatusBar
Stretch
SurfaceArea
SurfaceConnect
SurfaceIntersection
Sweep
SymbolExplode
SymbolLoad
TTangentBetween
TangentFrom
TangentTo
Text
Text2D
Text3D
TextArc
TextBlock
TextOutlineFill
TickMark
TileH
TileV
ToolBar
Torus
TruncatedCone
Trim1
Trim2
Trim3
TrimDouble
TrimMultiLines
TruncatedCone
Tube
UUndo
Units
UnitsOfMeasurement
UnWorkplane
UserDefinedViewsEditor
VVectorConvert
ViewChange
ViewerLeft
ViewerRight
ViewRead
ViewRedo
ViewSave
ViewToolBox
Volume
VPlane
VrmlOut
SelectScale
WWall
Weld
Window
WmfIn
WmfOut
Workplane
XXyzIn
ZZoom
ZoomIn
ZoomOut
ZoomPrevious
ZoomWindow
2DBox
>2DBox
{
<Orientation o[0 = normal, 1 = align to any angle]
<Type t[0 = plane, 1 = vector]
<Points (orientation 0)[1 = corner, 2 = opposite corner]
<Points (orientation 1)[1 = corner, 2 = width and angle of base, 3 = height]
}
Use this to create a two-dimensional box.
Compatibility: All versions.
Example:>2DBox{
<color 0,0,255<layer 7<orientation 0<type 1<pointxyz 0,20,0<pointxyz 40, 50, 0
}
2DDraftingMode
>2DDraftingMode
{}
Deprecated. You should use 2DMode instead. 2DDraftingMode is retained only for backwards compatibility
Compatibility: All versions.
SelectScale
2DMode
>2DMode
{}
This toggles 2-D Drafting Mode on or off. To determine the current setting, check the value of Sys(344).
Compatibility: All versions.
Example: Test if 2-D Drafting Mode is currently active; if not, turn it on.If (NOT Sys(344)) Then
>2DMode{}
ElseMessage "2-D Drafting Mode already active!"
End If
2DSelectMode
>2DSelectMode
{}
This forces the program into 2-D Selection Mode.
Compatibility: All versions.
3DSelectMode
>3DSelectMode
{}
This forces the program into 3-D Selection Mode.
Compatibility: All versions.
AboutDesignCAD
>AboutDesignCAD
{}
This displays the “About DesignCAD” dialog.
Compatibility: All versions.
Acquire
>Acquire
{}
This acquires an image from a scanner.
Compatibility: All versions.
AddLayerToGroup
>AddLayerToGroup
{<LayerGroupIndex gi<Layer layernum1<Layer layernum2…<Layer layernumlast
}This adds one or more layers to the indexed layer group.
Compatibility: Version 17
AlignObjects
>AlignObjects
{
<Type t [0 = left, 1 = right, 2 = top, 3 = bottom, 4 = vertical center, 5 = horizontal center, 6 = front (3-D only), 7 = back (3-D only), 8 = axial center (3-D only)]
If Type is not specified, the dialog shows.}
This aligns the selected entities as specified by <Type.
Compatibility: Version 13 and later.
Example: Align two entities along their left edges.>2DBox
SelectScale{
<pointxyz 10, 10, 0<Pointrel 15, 10, 0<Type 1 ' vector box<Orientation 0 ' not tilted
}>Circle{
<Pointxyz 10, 30, 0<Pointrel 0, 5, 0
}>PointSelect{
<Type 0 ' new selection<Pointxyz 10, 10, 0
}>PointSelect{
<Type 1 ' add to selection<Pointxyz 10, 35, 0
}>AlignObjects{
<Type 0 ' align along left edge}
AngleDistance
>AngleDistance
{
<Points: 1 = reference point, 2 = offset point}
This measures the angle and distance from the first to the second point.
Distance value returned in Sys(650)X-Angle value returned in Sys(651)Y-Angle value returned in Sys(652)Z-Angle value returned in Sys(653)XY-Angle value returned in Sys(654)
Compatibility: All versions.
Example: Find the angle and distance between the lower left corner and the upper rightcorner of a 30x40 2-D box.
>2DBox{
<pointxyz 10, 10, 0<Pointrel 30, 40, 0<Type 1<Orientation 0
}>AngleDistance{
<Pointxyz 10, 10, 0<Pointxyz 40, 50, 0
}Message "The distance is ", Sys(650)Message "The angle is ", Sys(654)
ApplyArrowSize
>ApplyArrowSize
{}
This applies the current arrowhead size to the selected items. The current arrowhead size can be determined by checking Sys(462).
Compatibility: All versions.
ApplyColor
>ApplyColor
{}
This 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), Sys(301) and Sys(302).
Compatibility: All versions.
ApplyDoubleLineStyle
>ApplyDoubleLineStyle
{
<ApplyAutoTrimif present applies AutoTrim setting
<ApplyAlignmentif present applies Alignment
<ApplyEndCaps
SelectScale
if present applies Endcaps<ApplyFill
if present applies Filled setting<ApplyWidth
if present applies current width}
This applies the specified double line settings to the selected double-line entities. All non-double-line items are unaffected.
Current Double Line Width can be obtained from Sys(370), CapStyle from Sys(371), AutoTrim from Sys(372), Alignment from Sys(373) and Fill from Sys(374).
Compatibility: All versions.
Note: The parameters for this command require no arguments; each applies the current setting if that parameter is present. Running this command with allparameters omitted would have no effect on the selection.
Example: Apply the current Alignment, Width and CapStyle to the selected double lines.
>ApplyDoubleLineStyle{
<ApplyAlignment<ApplyEndCaps<ApplyWidth
}
ApplyFixedText
>ApplyFixedText
{
<Text t}
This applies a fixed text string to the selected dimension(s). An existing fixed text string can be removed by applying an empty string.
Compatibility: All versions.
Example: Apply a fixed text string to a selected dimension remove it.t$ = "100.123 cm">ApplyFixedText{
<Text [t$]
}REGENMessage "The fixed text has been applied...">ApplyFixedText{
<Text ""}Message "The fixed text has been removed."
ApplyLayer
>ApplyLayer
{}
Use this to move the selected items to the current layer. The current layer index can be determined from Sys(3) and the current layer name from Sys$(93).
Compatibility: All versions.
ApplyLineFill
>ApplyLineFill
{}
This applies the current line fill setting to the selected entities (it doesn't affect Double Line entities). The current line fill setting can be extracted from Sys(24).
Compatibility: All versions.
ApplyLineStyle
>ApplyLineStyle
{
<ApplyLineScaleif present applies Line Scale setting
<ApplyLineTypeif present applies LineType; also applied by default if no parameters present.
<ApplyFillif present applies Fill Wide Lines setting
<ApplyWidthif present applies Line Width
}
SelectScale
This applies the specified current line style settings to the selected entities. For backwards compatibility, if no parameters are specified, only the LineType is applied. Double Line entities are unaffected.
The current Line Type can be obtained from Sys(4), Line Scale from Sys(5), Line Width from Sys(6) and Fill status from Sys(24).
Note: the parameters for this command require no arguments (i.e. no "true", "false" or numeric settings). If the parameter is present, that setting is applied to the selected items.
Compatibility: All versions.
Example: Apply the current LineType and Scale to the selected lines.>ApplyLineStyle{
<ApplyLineType<ApplyLineScale
}
ApplyLineWidth
>ApplyLineWidth
{}
This applies the current Line Width to the selected items. The current Line Width can be obtained from Sys(4).
Compatibility: All versions.
ApplyMaterial
>ApplyMaterial
{}
This applies the current material to the selected items. The current material index can be obtained from Sys(349) and the material name from Sys$(91).
Compatibility: All versions.
ApplyTextSize
>ApplyTextSize
{
}
This applies the current text size to the selected items. The current text size can be obtained from Sys(12).
Compatibility: All versions.
Arc
>Arc
{
<Type t[0 = arc, 1 = line]
<Angle aspan angle of the arc
<Points: 1 = center, 2 = starting point, 3 = plane reference(optional)}
This draws an arc of specified span angle from a given center point and starting point with an optional third point to specify the arc's planar orientation.
Compatibility: All versions.
Example: Draw a 90° arc from the tip of a line to the left, with the center of the arc at the midpoint of the line.
>Line{
<Pointxyz 20, 10, 0<Pointxyz 45, 57, 0
}>Arc{
<MidPoint 22, 15, 0<Gravity 45, 55, 0<Pointrel -10, 0, 0<Angle 90<Type 0
}
Arc2
>Arc2
{
<Type t[0 = arc, 1 = line]
SelectScale<Radius r
radius of the arc<Points: 1 = start, 2 = end, 3 = plane reference (optional)
}
This draws an arc of specified radius, in a counterclockwise direction, between the given starting point and ending point with an optional third point to specify the arc's planar orientation.
Note: The arc cannot span more than 180° and is always drawn counterclockwise from point 1 to point 2.
Compatibility: All versions.
Example: Draw a 180° arc with radius 10, lying in the xz plane, with the base oriented along the X axis and the top pointing toward positive Z.
>Arc2{
<type 0<radius 10.0<pointxyz 10, 0, 0<pointxyz -10, 0, 0<pointxyz 0, 0, 10
}
Arc3
>Arc3
{
<Type t[0 = arc, 1 = line]
<Points: 1 = start, 2 = point on arc, 3 = end}
This draws an arc that starts at the first point, passes through the second point and ends at the third point.
Compatibility: All versions.
Example: Draw a dashed arc that fits snugly around an equilateral triangle.'step 1: Draw the triangle>Line{
<Color 255, 0, 0<pointxyz 0, 0, 0<pointpolar 20, 0, 0
<pointpolar 20, 120, 0<pointpolar 20, 240, 0
}'step 2: Draw the arc>Arc3{
<Color 0, 0, 255<Linestyle 1, 1.5, 0<pointxyz 20, 0, 0<pointpolar 20, 120, 0<pointpolar 20, 240, 0<Type 0
}
Arc4
Arc4
{
<Type t[0 = arc, 1 = line]
<Radius r
[-1 (and any value <= 0) = off, any positive value used as fixed radius for the arc](The Radius parameter is new to Version 15. Newer macros should makeit a point to explicitly specify this value – otherwise the macro's behavior may be altered depending on what the user last specified manually in the dialog when using this command)
<Points: 1 = center, 2 = start, 3 = endThe arc is drawn counterclockwise from point 2 to point 3.
}
This draws an arc from the given center point and starting point and which spans an angle defined by the third point.
Note: If the Radius pararameter is specified as a positive non-zero value, the arcis drawn with that fixed radius; otherwise the radius of the arc is determined by the distance of point 2 from point 1. Point 3 specifies the span angle; the arc will terminate at an imaginary line passing through points 1 and 3.
Compatibility: All versions.
Example:>Arc4{
<Linestyle 0, 1, 0<Pointxyz 0, 0, 0
SelectScale<Pointxyz 0, 10, 0<Radius 0 ' *see note above turns off fixed-radius optionMessage "Set a third point for the arc."<Incomplete
}
Arc5
>Arc5
{
<Type t[0 = arc, 1 = line]
<Points: 1 = start, 2 = end, 3 = radius}
This draws an arc with the given starting point, ending point and center which is defined by the third point.
Compatibility: All versions.
Example:>Arc5{
<Linestyle 0, 1, 0<Pointxyz 10, -10, 0<Pointxyz -10, -10, 0<Pointxyz 0, 10, 0
}
Arc6
>Arc6
{
<type t[0 = arc, 1 = line]
<radius r
<length l
<Points: 1, 2 = line tangent to beginning of arc, 3 = direction}
This draws an arc tangent to the direction given by points one and two.
Compatibility: All versions.
Example:
>Line{
<Pointxyz 12, 15, 0<Pointxyz 25, 14, 0
}Input "radius? ", radInput "Arc length? ", l>Arc6{
<Radius [rad]<Length [l]<Type 0<Pointxyz 12, 15, 0<Pointxyz 25, 14, 0<Pointxyz 27, 18, 0
}
Area
>Area{
<Points: 1 = start, 2 = second point, etc. around perimeter}
This measures the area bounded by a sequence of points, the result is returned in Sys(655). To avoid displaying the dialog use the Area() function instead.
Compatibility: All versions.
Example: Illustrate the difference between the Area() function and the Area command.' first, draw a 10 x 10 2-D box; area = 100, perimeter = 40.>2DBox{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0<Type = 1<Orientation = 0
}
' next, select the box and find its entity id>Pointselect{
<Pointxyz 10, 10, 0}If Sys(80) = 1 Then
Getselect 1, id
ElsePrint "Box was not selected..."
SelectScaleAnykeyStop
EndIf
' now, use the Area(n) functionPrint "The Area of the box is ", Area(id)Anykey
' Here we use the Entity statement to place all the points in memory so we can retrieve them with pointval and store them into an array. We will need to set each point in the box to measure thearea.Entity idk = Sys(99)Dim x(k), y(k), z(k)For j = 1 To k
Pointval x(j) y(j) z(j) jNext jSys(80) = 0Sys(1) = 0
'now, use the Area command.>Area{
'set each point in the boxFor j = 1 To k
<Pointxyz [x(j), y(j), z(j)]Next j
}
ArrangeIcons
>ArrangeIcons
{}
This arranges the minimized view windows.
Compatibility: All versions.
Array
>Array
{
<NCopy n1, n2, n3n1 = number of duplicates along first directionn2 = number of duplicates along second direction
n3 = number of duplicates along 3rd direction<Points
0 = location of first copy (set only if UseOriginalCopy=1)
1 = location of first duplicate along first direction
2 = location of first duplicate along 2nd direction
3 = location of first duplicate along 3rd direction
<AlongCurve al[0 = no, 1 = yes]
<Perpendicular p[0 = no, 1 = yes; only relevant when AlongCurve is set to 1] This parameter is retained only for backward compatibility, new macros should use the Orientation parameter instead.
*New parameters as of Version 14:<UseOriginalCopy u
[0 = no, 1 = yes]If set to 0, you must first set a point for the first copy in the array; followed by points for the direction and distance of subsequent copies.If set to 1, the selected entity becomes the first copy in the array. This setting emulates the behavior of older versions.
<Type d
[0 = "1, 2, ..." for distance between consecutive copies 1 = "1,...2" for overall distance between first and last copy]This parameter controls the distance type; copies may be set with a fixed distance between one another, or with a fixed distance from first to last copy.
<SpecifyOffsets s[0 = no, 1 = yes]Determines whether the distance between copies (or the overall distance if type = 1) is controlled by the points or by user-specified values.
<Offset r1, r2, r3r1 = distance along first directionr2 = distance along second directionr3 = distance along third direction
<Orientation o [0 = original – the orientation of the original copy is retained for all subsequent copies. 1 = Forward – each copy shifts its orientation so that an arrow from handles 1-2 points along the direction of the curve and an arrow from points 1-3 points "upward" from the plane of the curve 2 = Reverse – each copy shifts its orientation so that an arrow from handles 1-2 points in the opposite direction of the curve 3 = Left – each copy shifts orientation so that an arrow from handles 1-2 points to the left of the direction of travel along the curve 4 = Right – each copy shifts orientation so that an arrow from handles 1-2 points the right of the direction of travel along the curve 5 = Perpendicular – mimics the behavior of the Perpendicular flag in older versions of DesignCAD]If this parameter is present, it overrides the Perpendicular parameter (and only applies if AlongCurve is set to 1)
SelectScale}
This creates an array of copies of the selected entities.
Compatibility: All versions, but several new parameters were added in Version 14.
Example:>Sphere{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0
}>PointSelect{
<Pointxyz 5, 0, 0}>SetHandle{
<Pointxyz 0,0,0}>Array{
<AlongCurve=0<UseOriginalCopy=1<NCopy 5, 4, 3<Type 0<SpecifyOffsets 0<Pointxyz 15, 0, 0<Pointxyz 0, 15, 0<Pointxyz 5, 0, 15
}
Arrow
>Arrow{
<Type tarrowhead style [1 = normal, 2 = slash, 3 = filled circle, 4 = filled normal, 5 = filled long, 6 = none, 7 = hollow circle, 8 = hollow normal, 9 = hollow long, 10 = wide, 11 = filled wide, 12 = hollow wide]{bmc WMF00000.WMF}
<Size sarrowhead length (relative to text size)
<Doublesided d *New in Version 13specifies normal arrow or double-headed arrow [0 = normal, 1 = double-headed]
<Points: 1 = tail, 2-k = body, k+1 = head}
This draws an arrow.
Compatibility: All versions.
Example: Draw one arrow of each type.For i = 1 To 12
>Arrow{
<Type [i]<Size 1.0<Pointxyz 0.0, [(i-1)*10], 0.0<Pointxyz 20.0, [(i-1)*10], 0.0
}Next i
AttribDef
>AttribDef
{
<Tag tag$ – the attribute definition's identifier
<Prompt pmt$ – prompt to ask for the attribute's value
<Text t$ – the default value of the attribute
<Style st – the text style[0 = normal, 1 = bold, 2 = italic, 3 = bold italic]
<Justification j[0 = left, 1 = center, 2 = right]
<Size stext size
<Angle adefault text angle
<Font font$the full name of the Windows font, ex. "Times New Roman"
<Type ft – Font type[0 = truetype font, 1 = vector font]
<Visible i – text visibility[0 = false (text is hidden), 1 = true (text is visible)]
<Fix f – Fixed Text flag[0 = false (text can be changed), 1 = true (text can't be changed)]
<WaitForOK w – Show Dialog and wait for user OK[0 = don't wait, 1 = wait] If enough parameters are not specified, the dialog shows anyway
<Point for location}
This creates an attribute definition which can be included in a block.
Compatibility: Version 13 and later.
SelectScale
Example:>AttribDef{ <PointXYZ 3.8427, 14.1597, 0.0000 <Tag "TEST_ATTRIBUTE" <Prompt "Please enter the data" <Text "This is the default string" <Style 0 ' normal text <Justification 2 ' right justification <Size 2.1250 <Angle 17.1000 <VectorFont "Simplex2w" <FontType 1 ' vector font <Visible 1 ' text visible <Fix 1 ' changeable text <WaitForOk 0}}
AttribNormalDisplay
>AttribNormalDisplay
{}
This has some affect on the display of attributes.
Compatibility: Version 14 and later.
Example:>AttribNormalDisplay{ <Style 0 ' normal text}
Attribute
>Attribute
{
<Style t[0 = normal, 1 = bold, 2 = italic, 3 = bold italic]
<Justification[0 = left, 1 = center, 2 = right]
<Size stext size
<Font font$the full name of the Windows font, e.g.: "Times New Roman"
<Text text$
the text contents of the attribute<Visible i
[0 = false (text is hidden), 1 = true (text is visible)] attribute visibility (Version 14)<Angle a
Attribute text angle (Version 15)<Point for location
}
This draws a simple fixed-text attribute.
Compatibility: All versions.
Example:>Attribute{
<Color 0, 0, 255<Layer 1<Style 3<Justification 1<Size 2<Font "Times New Roman"<Text "I am an attribute"<Visible 1<Angle 0<Pointxyz 10, 10, 0
}
AutoDimension
>AutoDimension
{
<Lines l – dimension lines?[0 = no, 1 = yes]
<Arcs a – dimension arcs and circles?[0 = no, 1 = yes]
<DoubleLines d – include double line entities?[0 = no, 1 = yes] (covers all double entity types)
<Ellipses e – dimension ellipses?[0 = no, 1 = yes]
<SelectOnly s – dimension selected entities only?[0 = no, 1 = yes]
<WaitForOK w – show the command dialog?[0 = no, 1 = yes]
}
This automatically dimensions selected entity types.
SelectScale
Compatibility: Version 13 and later.
Example: AutoDimension all selected line entities and double-line entities and don't show the dialog.
>AutoDimension{
<Lines 1<Arcs 0<Ellipses 0<DoubleLines 1<SelectOnly 1<WaitForOK 0
}
Balloon
>Balloon
{
<Font font$the full name of the Windows font, e.g.: "Times New Roman"
<Text content$text to place in the balloon
<Size 2.0000balloon radius
<Arrowhead iarrowhead style [1-12]; if not set, uses Sys(652)
<Arrowsize assize of arrowhead
<Points: 1 = arrowhead, 2-n = body, last = center of balloon}
This draws a text balloon with an arrow leader.
Compatibility: All versions.
Example:t$ = "12A">Balloon{
<Color 0, 255, 0<Layer 2<Font "Arial"<Text [t$]<Size 3<Arrowhead 3<Arrowsize 1.0
<Pointxyz 20, 10, 0<Pointxyz 10, 20, 0<Pointxyz 20, 30, 0
}
BatchConvert
>BatchConvert
{}
This opens the “Batch Conversion” dialog.
Compatibility: All versions.
BatchPrint
>BatchPrint
{}
This opens the “Batch Print” dialog.
Compatibility: All versions.
BezierCurve
>BezierCurve
{
<Incomplete -This parameter allows the user to set more points.
<Points: 1 = start, 2 = tangent, 3 = next point, 4 = tangent, ...}
This draws a Bezier curve.
Compatibility: All versions.
Example:>SetStartPoint{}>BezierCurve{
<Color 255, 0, 128
SelectScale<Layer 4<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 20, 0<Pointxyz 20, 20, 0
}>BezierCurve{
<Color 255, 0, 255<Layer 4<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 20, 0<Pointxyz 30, 20, 0
}
BlockDefine
>BlockDefine{
<Name n$ - block definition name
<WaitForOK w - wait for user to press OK[0 = don't wait, 1 = wait]
<Type t - What to do with the entities[0 = Convert to block, 1 = Retain, 2 = Delete]
}
This creates a new block definition from the selected entities. The primary selection handle becomes the block's insertion point.
Compatibility: Version 13 and later.
Example:>Circle{
<Pointxyz 18.1, 18.1, 0<Pointxyz 18.5, 18.1, 0
}>2DBox{
<Pointxyz 20, 20, 0<Pointxyz 22, 22, 0<Type 1 'vector<Orientation 0 'not angled
}>PointSelect{
<Pointxyz 18.1, 18.1, 0<Type 0
}>PointSelect{
<Pointxyz 20, 20, 0<Type 1
}>SetHandle{
Pointxyz 17.7, 17.7, 0}
>BlockDefine{
<Name "BlockOne"<Type 0 'convert to block
}
BlockInsert
>BlockInsert{
<Name n$ - name of the block definition to be inserted.
<Type t - [1 = uniform scale, 0 = non-uniform scale]This parameter is useful when using SpecifyScaleOnscreen
<Scale xscale, yscale, zscale - scale factors.If this parameter is omitted, uses SpecifyScaleOnScreen option.
<Angle a - the angle of the inserted blockIf this parameter is omitted, uses SpecifyAngleOnScreen option.
<ExplodeOnCreate e - explode the block after insertion?[0 = no, 1 = yes]
<SelectAfter s - Select the block after insertion?[0 = no, 1 = yes]
<Incomplete i - Allows the user to finish setting points
<WaitForOK w - optionally displays the dialog[0 = no, 1 = yes]
<UseDefaultText u - Allows you to bypass the prompts for attribute text values and use the default text automatically.[0 = no, 1 = yes]
<Points: 1 = insertion point,2 = angle (if Angle parameter omitted)
}
This inserts a new copy of an existing block into the drawing.
Compatibility: Version 13 and later.
Example:>BlockInsert
SelectScale{
<Name "BlockOne<Type 1 'Uniform scale<Scale 1.0<Angle 0<ExplodeOnCreate 0<SelectAfter 0<Pointxyz 10.0, 10.0, 0.0
}
Box
>Box{
<Points: 1 = first corner, 2 = opposite corner}
This draws a rectangular line or plane or a 3-D box. (Also see 2DBox)
Compatibility: All versions.
Example: Draw a 3-D box with dimensions: 30 x 20 x 10.>SetStartPoint{}>Box{
<Color 0, 0, 255<Layer 1<Pointxyz 0, 0, 0<Pointrelative 30, 20, 10
}
BreakLine
>BreakLine
{}
This breaks a multi-segment line into individual line segments.
Compatibility: All versions.
Example: Draw a 2-D box then break it into individual sides.>2DBox{
<Type 1
<Pointxyz 0, 0, 0<Pointxyz 20, 30, 0
}>PointSelect{
<Type 0<Pointxyz 10, 0, 0
}>BreakLine{}Message "The box is now broken into segments.">PointSelect{
<Type 0<Pointxyz 10, 0, 0
}Print "Press a key"anykey>PointSelect{
<Type 0<Pointxyz 20, 15, 0
}Print "Press a key"anykey>PointSelect{
<Type 0<Pointxyz 10, 30, 0
}Print "Press a key"anykey>PointSelect{
<Type 0<Pointxyz 0, 15, 0
}
Calculator
>Calculator
{}
This opens DesignCAD’s built-in calculator.
Compatibility: All versions.
SelectScale
CascadeWindows
>CascadeWindows
{}
This cascades all the drawing view windows.
Compatibility: All versions.
CenterOfGravity
>CenterOfGravity
{
<pointxyz x, y, z}
Note: This cannot be used to set a point during another command; it can only be used for cursor movement or selection. See Parameters to Set Points.
Compatibility: All versions.
Chamfer
>Chamfer
{
<Depth d, d2 [optional]Chamfer depths. If only one value is specified and no angle is specified, the chamfer depth is the same across both faces.
<Angle a [optional]Chamfer angle, referenced to the first line clicked.
<Type t[0 = normal chamfer, 1 = keep original lines]
<Points: 1 = first line, 2 = 2nd line to be chamfered}
Chamfer two line segments specifying either one chamfer depth, two depths or one depth and an angle.
Compatibility: All versions.
Example:>Line{ <Color 0, 0, 0
<Layer 1 <LineStyle 0, 2.0, 0.0 <PointXYZ 15.750, 11.5, 0.0 <PointXYZ 22.0, 28.0, 0.0 }
>Line{ <Color 0,0,0 <Layer 1 <LineStyle 0, 2.0, 0.0 <PointXYZ 23.0,29.125,0.0 <PointXYZ 45.25,17.75,0.0 }
>Chamfer{ <PointXYZ 20.25,22.75,0.0 <PointXYZ 28.75,25.25,0.0 <Depth 3.0, 3.0 ' <Depth 3.0 'alternate entry with same result <Type 0 }
>Undo{ }
>Chamfer{ <PointXYZ 20.0,23.25,0.0 <PointXYZ 32.25,23.75,0.0 <Depth 3.0 <Angle 60.0 <Type 0 }
ChangeCodePage
>ChangeCodePage{
<CodePage cpnew code page
<Font font$the full name of the Windows font, ex. "Times New Roman". This parameter may be omitted, in which case the same font will be used (if it is available in the selected code page)
<SelectOnly s0 = change all text, 1 = only change selected text
}
SelectScale
Changes the code page (character set) of TrueType text. If the selected code page is unavailable on the system the system default character set will be used to display the text.
Supported code pages:1250 - Eastern Europe (Poland, Czech Republic, etc.)1251 - Cyrillic (Russia)1252 - US, Western European1253 - Greek1254 - Turkish1257 - Baltic (Latvia, Slovenia, etc.)
Compatibility: Version 13 and later.
Example: convert all TrueType text in the drawing to use the Baltic character set.>ChangeCodePage{
<SelectOnly 0<CodePage 1257
}
ChangePSTemplateProperties
>ChangePSTemplateProperties{
<Orientation or[0 = Portrait, 1 = Landscape
<Width wthe width of the page (in paper units)
<Height hthe height of the page (in paper units)
<LeftMargin lnthe width of the left margin (in paper units)
<RightMargin rmthe width of the right margin (in paper units)
<TopMargin tmthe width of the top margin (in paper units)
<BottomMargin bmthe width of the bottom margin (in paper units)
<Name templatename$the name of the paperspace template
<UnitsOfMeasurement units[1 = inches, 2 = feet, 3 = mi, 4 = mm, 5 = cm, 6 = m, 7 = km]
}
This sets/changes the page properties of the current paperspace template. You must be in Paper Space Mode to activate this command.
Compatibility: Version 15 and later.
Example:
>PaperSpaceMode{}>ChangePSTemplateProperties{
<Orientation 1 'landscape<UnitsOfMeasurement 1 'inches<Width 11.0<Height 8.5<LeftMargin 0.5<RightMargin 0.5<TopMargin 0.25<BottomMargin 0.25<Name "LetterLandscapeInches"
}
Circle
>Circle
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<Points: 1 = center, 2 = radius, 3 = plane reference (optional)}
This draws a circle centered at the first point with a radius determined by the second point
Compatibility: All versions.
Example: Draw a circle parallel to the YZ Plane.>SetStartPoint{}>Circle{
<Pointxyz 0, 0, 0<Pointxyz 0, 10, 0<Pointxyz 0, 10, 10
}
Circle2
>Circle2
{
SelectScale<Type t
[0 = circle, 1 = vector circle, 2 = plane]<Points: 1, 2 = diameter, 3 = plane ref. (optional)
}
This draws a circle, given two points which define the circle's diameter.
Compatibility: All versions.
Example: Draw a circular plane tilted at 45° to the YZ plane.>Circle2{
<Color 255, 128, 0<Layer 4<Linestyle 2, 1.25, 0<Type 2<Pointxyz 10, 20, 0<Pointxyz 10, 20, 20<Pointxyz 30, 40, 20
}
Circle3
>Circle3
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<Points: 1, 2, 3 all lying on the circle}
This draws a circle that passes through three specific points.
Compatibility: All versions.
Example:>Circle3{
<Pointxyz 10, 10, 0<Pointxyz 0, 10, 10<IncompleteMessage "Set the last point for the circle."
}
Circle4
>Circle4
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<Radius rradius of the circle
<Points: 1 = center of the circle, 2 = axis, 3 = tilt}
This draws a circle centered on the first point, with the specified radius. Points two and three specify the axis and tilt of the circle.
Compatibility: All versions.
Example:>Circle4{
<Type 0<Radius 15<Pointxyz 10, 10, 0<Pointxyz 10, 20, 10<Pointxyz 20, 20, 10
}
CircleTan2Lines
>CircleTan2Lines
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<Radius rradius of the circle
<SelectOnly s[0 - can use any circles, 1 - only draws tangent to the selected circles]
<Points: 1 = tangent line, 2 = other tangent line}
This draws a circle of given radius that lies tangent to the two lines specified.
Note: The tangent lines must be in the same plane.
Compatibility: All versions.
Example:>SetStartPoint{}
SelectScale>Line{
<Color 255, 0, 0<Pointxyz 0,0,0<PointPolar 20, 0, 0<PointPolar 20, 90, 2
}>CircleTan2Lines{
<Color 0, 255, 0<Type 0<Radius 10<Pointxyz 0, 0, 0<Pointxyz 20, 0, 20
}
CircleTan3Lines
>CircleTan3Lines
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<SelectOnly s[0 - can use any circles, 1 - only draws tangent to the selected circles]
<Points: 1,2,3 = tangent lines}
This draws a circle that lies tangent to the three lines specified.
Compatibility: All versions.
Note: The tangent lines must be in the same plane.
Example:>2DBox{
<Orientation 1<Type 1<Pointxyz 0,0,0<pointxyz 20, 20, 0<Pointxyz 0, 40, 0
}>CircleTan3Lines{
<Type 0<Pointxyz 10, 10, 0<Pointxyz 10, 30, 0
<Pointxyz -10, 10, 0}
CircleTanLine
>CircleTanLine
{
<Type t[0 = circle, 1 = vector circle, 2 = plane]
<Radius rspecified the circle's radius if LockRadius is 1
<LockRadius b[0 = diameter specified by second point; 1 = radius set by radius parameter]
<Points: 1 = tangent line, 2 = direction (and possibly diameter)}
This draws a circle that is tangent to the line specified.
Compatibility: Version 17 and later.
Note: The tangent line must be in the same plane as the circle.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0
}>CircleTanLine{
<Type 0<Radius 5<LockRadius 1<Pointxyz 10, 0, 0<Pointxyz 10, 5, 0
}
CircularArray
>CircularArray
{
<Angle aspan angle for the array of copies
<Axis jcentral axis for the array: [0 = x, 1 = y, 2 = z, 3 = 2-point, 4 = line, 5 = plane]
SelectScale<Ncopy m
number of copies to create (including original)<Offset d
total offset from first to last copy along central axis<Perpendicular p
[0 = each copy retains the orientation of the original, 1 = rotate each copy]<Point 1 = center of rotation for the circular array
}
This creates an array of copies of the selected entities in a circular pattern.
Compatibility: All versions.
Example:>Sphere{
<Orientation 2<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0
}>PointSelect{
<Pointxyz 20, 10, 0}>CircularArray{
<Angle 1800<Axis 1<Ncopy 26<Offset 120<Pointxyz -5, 0, 0
}
ClearDrawingHandle
>ClearDrawingHandle
{}
This removes the handles from a drawing (identical to RemoveDrawingHandles).
Close
>Close
{
<SaveChanges s
[0 = no, 1 = yes]<FileName "Filename"
If a specific filename is given in quotes, the file will be saved with that name. An empty string "" saves the file under its current name. A question mark in quotes "?" will close the file if no changes have been made, or open the "Save Changes?" dialog if the drawing has changed.
}
This closes the currently active drawing.
Note: If you close all open drawings the only command that will work reliably immediately thereafter is >New{}. Most macro language commands requirean open drawing to function. Therefore, you should use >Close{} with caution. You can check the value of Sys(211) to see how many drawing files are open. If it is 1, you should either not use Close, or if you use it, follow it IMMEDIATELY with New.
Compatibility: All versions.
Example:>Sphere{
<Orientation 2<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0
}>PointSelect{
<Pointxyz 20, 10, 0}>CircularArray{
<Angle 1800<Axis 1<Ncopy 26<Offset 120<Pointxyz -5, 0, 0
}>Close{
<SaveChanges 1<FileName "*\mysave.dcd"
}>New{}
SelectScale
CloseAll
>CloseAll
{
<SaveChanges s[0 = no, 1 = yes]if SaveChanges is set to 0, all documents will close quietly without prompting you to save any changes. If SaveChanges is set to 1, any documents that have unsaved changes will prompt you to save them.
}
This closes all currently open drawings.
Note: After running this command, your macro will effectively end, since macros require at least one open document to function.
Compatibility: Version 15 and later.
Example:>Sphere{
<Orientation 2<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0
}>PointSelect{
<Pointxyz 20, 10, 0}>CircularArray{
<Angle 1800<Axis 1<Ncopy 26<Offset 120<Pointxyz -5, 0, 0
}>CloseAll{
<SaveChanges 1}
ColorToolBox
>ColorToolbox
{}
This toggles the visibility of the Color Toolbox.
Compatibility: All versions.
Combine
>Combine
{}
This combines the selected lines into a single line.
Compatibility: All versions.
ComplementArc
>ComplementArc
{}
This complements the selected arcs.
Compatibility: All versions.
Cone
>Cone
{
<Nface mnumber of sides for the cone [3-100]
<Orientation o[0 = point 2 is a vertex, 1 = point 2 is the midpoint of a side]
<Points: 1 = center of base, 2 = radius of base, 3 = height}
This draws a cone.
Compatibility: All versions.
Example: Draw two cones, the first one fitting inside a circle of radius 10, the next one just enclosing a circle of the same radius.
>Circle{
<Color 0, 255, 0
SelectScale<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 0, 10
}sides = 6>Cone{
<Color 255, 0, 0' orientation 0 makes the base fit inside a' given radius<Orientation 0<Nface [sides]<Pointxyz 0, 0, 0<Pointpolar 10, 0, 2<Pointrel 0, 10, 0
}>Cone{
<Color 0, 0, 255' orientation 1 makes the base enclose a' given radius<Orientation 1<Pointxyz 0, 0, 0<Pointpolar 10, [180/sides], 2<Pointrel 0, 10, 0
}
ConstructionLine
>ConstructionLine
{
<Type t: [0 = Line, 1 = Ray]
<Points: 1 = center of construction Line, 2 = direction}
This draws a construction line.
Compatibility: Version 13 and later.
Example:>ConstructionLine{
<Layer 32<Color 255, 255, 128<Type 0 ' line<Pointxyz 10, 10, 0<Pointrel 10, 0, 0 'horizontal line
}>ConstructionLine{
<Layer 31<Color 128, 255, 255<Type 1 ' ray<Pointxyz 10, 10, 0<Pointrel 0, 10, 0 ' vertical ray
}
ContourLine
>ContourLine
{
<Axis a: [0 = Custom Plane, 1 = ZY(fixed X), 2 = XZ (fixed Y),
3 = XY (fixed Z)]
<Type t: [0 = save as vector, 1 = save as plane]
<SelectOnly s: [0 = entire drawing, 1 = selection only]
<Points: 1, 2, 3, ...}
This draws a contour line. If Axis = 0 (Custom Plane), points 1-3 define the plane for the contourline. If Axis = 0, 1, or 2, more points may be set to draw extra contour lines.
Compatibility: Version 13 and later.
Example:>Cylinder{
<Color 128, 128, 128<NFace 20<Orientation 0<Pointxyz 0, 0, 0<Pointrel 0, 5, 0<Pointrel 15, 0, 0
}>ContourLine{
<Layer 3<Color 128, 255, 255<SelectOnly 0 ' contour entire drawing<Axis 1 ' constant x (zy plane)<Type 0 ' save as vector<Pointxyz 1, 0, 0
SelectScale<Pointxyz 2, 0, 0<Pointxyz 3, 0, 0
}
ConvertText
>ConvertText
{}
This converts the selected text from 2-D Text to 3-D Text or vice versa.
Compatibility: All versions.
ConvertToMultiLine
>ConvertToMultiLine
{}
This converts the selected entities to multiline entities.
Compatibility: Version 16 and later.
CoordinateBar
>CoordinateBar
{}
This toggles the visibility of the Coordinate Bar.
Compatibility: All versions.
Copy
>Copy
{}
This copies the selected items to the clipboard.
Compatibility: All versions.
Example:>Box{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>PointSelect{
<Pointxyz 12, 12, 0}>SetHandle{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>Copy{}>Paste{
<Type 0<Pointxyz 12, 24, 0<Pointxyz 40, 24, 0
}
CopyBitmap
>CopyBitmap
{
<Points: 1 = first corner of region, 2 = opposite corner of region copied
<IncompleteIf this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
}
This copies only raster data (pixel for pixel) from the drawing screen to the clipboard.
Note: If you set no points at all, the entire view window is copied to the clipboard. If you specify the first point and the <Incomplete parameter, the user can set the other corner of the region. If you specify only the <Incomplete parameter, the user can set both corners of the region to be copied.
Compatibility: All versions.
SelectScale
CreateLayerGroup
>CreateLayerGroup
{
<Name groupname
<Layer laynum1
<Layer laynum2
…
<Layer laynumlast}
This creates a layer group using the given name and specified layer numbers.
Compatibility: Version 17 and later.
Crosshair
>Crosshair
{}
This toggles the crosshairs on or off.
Compatibility: All versions.
CrossSection
>CrossSection
{
<Axis a: [0 = Custom Plane, 1 = ZY(fixed X), 2 = XZ (fixed Y),
3 = XY (fixed Z)]
<SelectOnly s0 = draw cross section through all solids, 1 = draw cross section through selected solids only
<Points: 1 [, 2, 3]}
This draws a cross section of the selected solids, or opionally all solids in the drawing, that intersect with the selected plane. If Axis = Custom Plane, points 1-3 define the plane for the cross section. The resulting cross sections are plane entities.
Compatibility: Version 13 and later.
Example:>Cylinder{
<Color 128, 128, 128<NFace 20<Orientation 0<Pointxyz 0, 0, 0<Pointrel 0, 5, 0<Pointrel 15, 0, 0
}>CrossSection{
<Layer 3<Color 128, 255, 255<Axis 1 ' constant x (zy plane)<Pointxyz 1, 0, 0<SelectOnly 0
}
CursorOptions
>CursorOptions
{}
This opens the Cursor Options window.
Compatibility: All versions.
Curve
>Curve
{
<IncompleteIf this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Type n[0 = spline curve, 1 = vectorized curve]
<Points: 1 = start, 2 = point on curve, 3-k points along curve}
This draws a spline curve.
Compatibility: All versions.
Example:
SelectScale>Curve{
<Color 0, 128, 255<Layer 3<Linestyle 5, 2, 0<Type 0<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0<Pointxyz 20, 0, 0<Pointxyz 30, 10, 0<IncompleteMessage "Finish the curve."
}
CurveToLine
>CurveToLine
{}
This converts a curve to a line, keeping the same points as the nodes of the curve; the resulting line may not resemble the curve at all.
Compatibility: All versions.
Example:>Curve{
<Color 0, 128, 255<Layer 3<Type 0<Pointxyz 0,0,0<Pointxyz 10,10,0<Pointxyz 20, 0, 0<Pointxyz 30, 10, 0
}>PointSelect{
<Pointxyz 0, 0, 0}>CurveToLine{}
CustomColor
>CustomColor
{<Color r, g, b
}
This opens the Custom Color window.
Compatibility: All versions.
Cut
>Cut{}
This cuts the selected items from the drawing to the clipboard.
Compatibility: All versions.
Example:>Box{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>PointSelect{
<Pointxyz 12, 12, 0}>SetHandle{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>Cut{}>Paste{
<Type 0<Pointxyz 12, 24, 0<Pointxyz 40, 24, 0
}
CutCorner
>CutCorner
{
SelectScale<Depth d
<Point 1 = corner to cut}
This chamfers a corner of a 3-D solid.
Compatibility: All versions.
Example:after line
>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}>CutCorner{
<Depth 4<Pointxyz 10, 10, 0
}>CutCorner{
<Pointxyz 0, 10, 0}
CutEdge
>CutEdge
{
<Depth d
<Point 1 = edge to cut}
This chamfers the edge of a 3-D solid.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}>CutEdge{
<Pointxyz 0, 6, 0<Depth 4
}
>CutEdge{
<Depth 3<Pointxyz 10, 6, 0
}
CutLine
>CutLine
{
<Points 1 = line to cut, 2 = location of cut, 3 = opposite end of cut (required for closed entities such as circles, ellipses and rectangles)
}
This cuts a line at a specific point or a closed entity at two points.
Compatibility: Version 13 and later.
Example:>2DBox{
<Orientation 0<Type 1 ' vector<Pointxyz 10, 10, 0<Pointxyz 30, 20, 0
}>CutLine{
<Pointxyz 10, 10, 0<Pointxyz 15, 10, 0<Pointxyz 15, 30, 0
}
Cutoff
>Cutoff
{
<Points: 1 = first corner of region, 2 = opposite corner}
Deprecated. This cuts all entities at their intersection with the rectangular cutting region. This command is identical to SectionCut below; SectionCut is the preferred form.
Compatibility: All versions.
Example:
SelectScale>Box{
<Pointxyz 0, 0, 0<Pointxyz 25, 25, 25
}>Cutoff{
<Pointxyz 15, 15, -2<Pointxyz 26, 26, 15
}>PointSelect{
<Pointxyz 25, 25, 0}>Move{
<Pointxyz 30, 30, 0}
CutoffDel
>CutoffDel
{
<Points: 1 = first corner of region, 2 = opposite corner}
Deprecated. This is identical to SectionDeleteCutoff below; SectionDeleteCutoff is the preferredform.
Compatibility: All versions up to 17. Version 17 remaps this command to SectionTrim.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 25, 25, 25
}>CutoffDel{
<Pointxyz 15, 15, -2<Pointxyz 26, 26, 15
}
CutPlane
>CutPlane
{
<Points: 1 = cutting line, 2 = plane to be cut}
This cuts a plane along an overlapping line.
Compatibility: All versions.
Example:>Plane{
<Pointxyz 0,0,0<Pointxyz 0, 10, 0<Pointxyz 10,10, 0<Pointxyz 10, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, -10, 0<Pointxyz 10, -10, 0<Pointxyz 10, -20, 0<Pointxyz 0, -20, 0<Pointxyz 0, -10, 0<Pointxyz -10, -10, 0<Pointxyz -10, 0, 0
}>Line{
<Pointxyz 0, -10, 0<Pointxyz 20, -5, 0<Pointxyz 0, 0, 0
}>Cutplane{
<Pointxyz 20, -5, 0<Pointxyz 0, 10, 0
}
Cylinder
>Cylinder
{
<Nface mnumber of faces [3-100]
<Orientation o[0 = point 2 on vertex, 1 = point 2 on midpoint of a side]
<Points: 1 = center of base, 2 = radius of base, 3 = height of cylinder}
This draws a cylinder.
SelectScale
Compatibility: All versions.
Example:>Cylinder{
<Orientation 1<Nface 20<Pointxyz 10, 10, 0<Pointxyz 10, 10, 10<Pointxyz 40, 10, 0
}
DCADTile
>DcadTile{}
This arranges the view windows in the default DesignCAD arrangement.
DecVDis
>DecVDis{}
This reduces viewing distance by 10% of the current value.
DeleteCurrentLayout
>DeleteCurrentLayout{}
This deletes the current Paperspace Layout Template unless it is the last one remaining.
Compatibility: All versions.
DeleteLayerFromGroup
>DeleteLayerFromGroup{<LayerGroupIndex gi<Layer layernum1<Layer layernum2…
<Layer layernumlast}
This deletes the specified layer(s) from the specified layer group.
Compatibility: Version 17 and later.
DeleteWorkplane
>DeleteWorkplane{
<Name WpName$}
This deletes the named custom workplane. If no such name exists the command has no effect.
Compatibility: Version 13 and later.
DeSelect
>DeSelect{}
This clears the selection set.
Compatibility: Version 14 and later.
DimAngle
>DimAngle
{
<Type t[0 = single dimension entity, 1 = exploded dimension]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<Size sdimension text size - if 0.0, uses default text size
<Gap gdistance between measured points and bottom of leader lines
SelectScale<Length l
length of fixed-length leader lines<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot d
distance between arrow tips and top of leader lines<Orientation o
text orientation [0 = tangent to arc, 1 = horizontal]<Precision p
number of digits past the decimal in the dimension text<Format f
angular text format [0 = degrees, 1 = grads, 2 = radians, 3 = DMS]<Location k
location of text [0 = outside arrows, 1 = inside arrows]<ToleranceType tt
[0 = none, 1 = single value, 2 = high/low values]<ToleranceSize ts
relative size of tolerance text (only affects tolerance type 2)<ToleranceLow tl
low tolerance value for tolerance type 2<ToleranceHigh th
high tolerance value for tolerance type 2<Tolerance tv
tolerance value for tolerance type 1<Prefix i$
dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]<Suffix j$
dimension suffix ["0" = none, "1" = custom1, etc.]<Text fixed$
If present, sets the fixed dimension text
<Points: 1 = center, 2 = start angle, 3 = end angle, 4 = arrow location}
This draws an angle dimension.
Compatibility: All versions.
Example:>DimAngle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 7, 7, 0<Pointxyz 10, 12, 0<Arrowhead 1
<Arrowsize 1<Size 1<Orientation 1<Prefix "0"<Suffix "0"<Tolerancetype 0<Location 0
}
DimArc
>DimArc
{
<Orientation otext orientation [0 = tangent to arc, 1 = horizontal]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text for tolerance type 2
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size; if 0.0, uses the default text size
<Type t[0 = dimension, 1 = exploded dimension]
<Gap gdistance between measured points and leader bottoms
<Length llength of fixed-length leader lines
SelectScale<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot os
distance between arrow tips and leader tops<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = arc to be measured, 2 = arrow location}
This draws the dimension of the length of an arc.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command, the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
Compatibility: All versions.
Example:>Arc3{
<Pointxyz 0,10,0<pointxyz 10, 10,0<Pointxyz 15, 0,0
}>DimArc{
<Font "Times New Roman"
<Size 3<Arrowhead 1<Arrowsize 1.5<Precision 3<ToleranceType 2<ToleranceLow -0.0005<ToleranceHigh +0.0003<Prefix 4<Suffix 3<Format 2<Location 1<Orientation 1<Pointxyz 10, 10,0<Pointxyz 10, 20,0
}
DimBase
>DimBase
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
SelectScale<Type t
[0 = dimension, 1 = exploded dimension]<Gap g
distance between measured points and leader bottoms<Length l
length of fixed-length leader lines<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot os
distance between arrow tips and leader tops<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<LinePosition lp
[0 = arrows inside leaders, 1 = arrows outside leaders]<Axis y
[1 = horizontal, 2 = vertical]<Text fixed$
If present, sets the fixed dimension text. All dimensioned sections willuse this same text.
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = basepoint, 2 = 1st distance, 3 = 2nd distance, etc.}
This draws a baseline dimension
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command, the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
Compatibility: All versions.
Example:>2DMode{}>SetStartPoint{}>DimBase{
<Color 0,0,0<Layer 1<PointXYZ 0.0000,0.0000,0.0000<PointXYZ 37.1250,-0.7500,0.0000<PointXYZ 65.1250,-1.6250,0.0000<PointXYZ 89.5000,-2.3750,0.0000<PointXYZ 89.5000,5.3750,0.0000<Axis 1<Orientation 0<Precision 3<Format 0<Location 0<ToleranceType 1<ToleranceSize 0.2500<ToleranceLow -0.01<ToleranceHigh +0.01<Tolerance 0.01<Suffix "0"<Prefix "0"<Font "Arial"<Size 0.0000<Type 0<Gap 1.0000<OverShoot 0.5000<Arrowhead 5<Gap 1.0000<Offset 2.0000<LinePosition 0
}
DimCenterPoint
>DimCenterPoint
{
<Type t – [0 = size in percent of radius, 1 = size in units]
SelectScale<Size s – the size (radius) of the center mark. Also, for type 0, it is the
percentage of crosshair overshoot.
<Overshoot o – the size (in drawing units) of the crosshair overshoot.
<Gap g – the distance between the outside of the center mark and the insideof the crosshair line.
<Showline sl – whether or not the crosshairs are drawn.[0 = centermark only, 1 = center mark plus crosshairs]
<Points: 1 = chamfer line, 2, 3... = body of dimension}
This draws a dimension for the center point of a circle.
Compatibility: Version 13 and later.
Example:>DimCenterPoint{
<Type 1<Size 1.5<Overshoot 0.5<Gap 1.0<ShowLine 1<Pointxyz 25, 0, 0
}
DimChamfer
>DimChamfer
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t[0 = dimension, 1 = exploded dimension]
<Gap gdistance between measured points and leader bottoms
<Length llength of fixed-length leader lines
<Fix fx[0 = variable-length leader lines; 1 = for fixed-length]
<OverShoot osdistance between arrow tips and leader tops
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<LinePosition lp[0 = arrows inside leaders, 1 = arrows outside leaders]
<Axis y[1 = horizontal, 2 = vertical]
<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = chamfer line, 2, 3... = body of dimension}
This draws the dimension of a chamfer.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command, the one used last will overrule the previous one.
SelectScale
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0 ,0<Pointxyz 25, 0, 0<Pointxyz 25, 25, 0
}>Chamfer{
<Depth 5<Pointxyz 0, 0, 0<Pointxyz 25, 25, 0
}>DimChamfer{
<Arrowhead 1<Arrowsize 1<Tolerancetype 0<Size 1<Pointxyz 22.5, 2.5, 0<Pointxyz 25, 0, 0
}
DimCoordinate
>DimCoordinate
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t[0 = dimension, 1 = exploded dimension]
<Gap gdistance between measured points and leader bottoms
<Length llength of fixed-length leader lines
<Fix fx[0 = variable-length leader lines; 1 = for fixed-length]
<OverShoot osdistance between arrow tips and leader tops
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<Axis y[1 = horizontal, 2 = vertical]
<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = reference point, 2 = location to measure, 3 = dimension direction
}
SelectScale
This draws the dimension of a coordinate.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command, the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
Compatibility: All versions.
Example:>DimCoordinate{
<Pointxyz 0, 0, 0<Pointxyz 10, 15, 0<Pointxyz 10, 16, 0<Precision 3<Format 0<Font "book antiqua"
}>DimCoordinate{
<Pointxyz 0, 0, 0<Pointxyz 10, 15, 0<Pointxyz 11, 15, 0
}
DimDiameter
>DimDiameter
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t[0 = dimension, 1 = exploded dimension]
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<Axis y[0 = text and arrows inside, 1 = external text and arrows; arrows connected by line, 2 = external text and single arrow, 3 = arrows inside, text outside]
<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = circle to measure, 2 = dimension location}
This draws the dimension of a diameter.
- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
SelectScale
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command, the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section, it will overrule the drop-down list selection by the user. (However, it will NOT update the text in the list selection)
Compatibility: All versions.
Example:>Circle{
<Pointxyz 25, 25, 0<Pointxyz 25,35, 0
}>DimDiameter{
<Size 1.5<Type 0<Arrowhead 4<Format 0<Axis 0<Pointxyz 35, 25, 0<Pointxyz 35, 30, 0
}
Dimension
>Dimension
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tl
low tolerance value for tolerance type 2<ToleranceHigh th
high tolerance value for tolerance type 2<Tolerance tv
tolerance value for tolerance type 1<Suffix i$
dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]<Prefix j$
dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]<Font "fontname"
the full name of the Windows font, e.g.: "Times New Roman"<Size s
dimension text size<Type t
[0 = dimension, 1 = exploded dimension]<Gap g
distance between measured points and leader bottoms<Length l
length of fixed-length leader lines<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot os
distance between arrow tips and leader tops<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<LinePosition lp
[0 = arrows inside leaders, 1 = arrows outside leaders]<Axis y
[0 = Auto, 1 = Free, 2 = X, 3 = Y, 4 = Z]<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1, 2 = distance to measure, 3 = dimension location}
This draws a dimension.
Compatibility: All versions.
SelectScale
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user (however, it will NOT update the text in the list selection).
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user (however, it will NOT update the text in the list selection).
Example:>Dimension{
<Layer 12<Type 0<Arrowhead 3<Arrowsize 1<Axis 2<Size 1<Fix 0<Format 2<Precision 4<Pointxyz 10, 5, 0<Pointxyz 25.10364, 5, 0<Pointxyz 25, 10, 0
}
DimensionDistanceOnly
>DimensionDistanceOnly{
<Orientation oText orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pNumber of digits past the decimal in the dimension text
<Format fText format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location lText location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tl
low tolerance value for tolerance type 2<ToleranceHigh th
high tolerance value for tolerance type 2<Tolerance tv
tolerance value for tolerance type 1<Suffix i$
dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]<Prefix "j$
dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]<Font "fontname"
the full name of the Windows font, e.g.: "Times New Roman"<Size s
dimension text size<Type t
[0 = dimension, 1 = exploded dimension]<Axis y
[1 = horizontal, 2 = vertical]<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1, 2 = distance to measure, 3 = text location}
This draws a distance dimension only.
Compatibility: All versions.
Notes: - <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
Example:>DimensionDistanceOnly
SelectScale{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0<Pointxyz 10, 15, 0
}
DimExtend
>DimExtend
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t[0 = dimension, 1 = exploded dimension]
<Gap gdistance between measured points and leader bottoms
<OverShoot osdistance between arrow tips and leader tops
<Length llength of fixed-length leader lines
<Fix fx[0 = variable-length leader lines; 1 = for fixed-length]
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<LinePosition lp[0 = arrows inside leaders, 1 = arrows outside leaders]
<Axis y[1 = X, 2 = Y]
<Text fixed$
If present, sets the fixed dimension text. All dimensioned sections willuse this same text.
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1, 2 = 1st distance, 3 = 2nd distance, 4 = 3rd distance, ..., n =arrow location
}
This draws an extended dimension.
Compatibility: All versions.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
Example:>DimExtend{
<Arrowhead 7<Arrowsize 1<Size 1<Type 0<Fix 0
SelectScale<Gap 1.5<Overshoot 1.5<Format 0<Precision 3<Location 0<Tolerancetype 1<Tolerance 0.002<Pointxyz 10, 10, 0<Pointxyz 27.23154, 10, 0<Pointxyz 35.1234, 10, 0<Pointxyz 49.15, 10, 0<Pointxyz 50, 15, 0
}
DimProgress
>DimProgress
{
<Orientation otext orientation [0 = aligned with arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t
[0 = dimension, 1 = exploded dimension]<Gap g
distance between measured points and leader bottoms<Length l
length of fixed-length leader lines<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot os
distance between arrow tips and leader tops<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<Axis y
[1 = horizontal, 2 = vertical]<Text fixed$
If present, sets the fixed dimension text. All dimensioned sections willuse this same text.
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = reference point, 2, 3,... = distances, n = location}
This draws a progressive dimension.
Compatibility: All versions.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
Example:
SelectScale>DimProgress{
<Arrowhead 9<Arrowsize 1<Size 1<Type 0<Fix 0<Gap 1.5<Overshoot 1.5<Format 0<Precision 3<Location 0<Tolerancetype 1<Tolerance 0.002<Pointxyz 10, 10, 0<Pointxyz 27.23154, 10, 0<Pointxyz 35.1234, 10, 0<Pointxyz 49.15, 10, 0<Pointxyz 50, 15, 0
}
DimRadius
>DimRadius
{
<Color rval, gval, bvalred, green and blue (RGB) color components [0-255]
<Layer nlayer number [0-255]
<IncompleteIf this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Orientation otext orientation [0 = parallel to arrows, 1 = perpendicular, 2 = horizontal, 3 = vertical]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size sdimension text size
<Type t[0 = dimension, 1 = exploded dimension]
<Arrowhead aarrowhead style; see Arrow command for details
<Arrowsize asarrowhead size
<Axis y[0 = text and arrow inside, 1 = internal arrow; external text, connected by line to arrow, 2 = text and arrow outside, 3 = text and arrow outside; line to center from arrowhead]
<Text fixed$
If present, sets the fixed dimension text
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1 = arc/circle, 2 = dimension location}
This draws a radius dimension.
Compatibility: All versions.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
SelectScale
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
Example:>Circle{
<Pointxyz 10, 30, 0<Pointxyz 10, 40, 0
}>DimRadius{
<Axis 0<Pointxyz 10, 40, 0<Pointxyz 15, 40, 0
}
DimRadProgress
>DimRadProgress
{
<Orientation otext orientation [0 = normal, 1 = horizontal]
<Precision pnumber of digits past the decimal in the dimension text
<Format ftext format [0 = 4.125, 1 = 4-1/8, 2 = 4'1.5", 3 = 4'1-1/2"]
<Location ltext location relative to arrows [0 = inside, 1 = outside]
<ToleranceType tt[0 = none, 1 = single value, 2 = high/low values]
<ToleranceSize tsrelative size of tolerance text
<ToleranceLow tllow tolerance value for tolerance type 2
<ToleranceHigh thhigh tolerance value for tolerance type 2
<Tolerance tvtolerance value for tolerance type 1
<Suffix i$dimension suffix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Prefix j$dimension prefix ["0" = none, "1" = custom1, "2" = custom2, etc.]
<Font "fontname"the full name of the Windows font, e.g.: "Times New Roman"
<Size s
dimension text size<Type t
[0 = dimension, 1 = exploded dimension]<Gap g
distance between measured points and leader bottoms<Length l
length of fixed-length leader lines<Fix fx
[0 = variable-length leader lines; 1 = for fixed-length]<OverShoot os
distance between arrow tips and leader tops<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<Text fixed$
If present, sets the fixed dimension text. All dimensioned sections willuse this same text.
*New parameters added in Version 15
<Multiplier m [-1 (and any value <= 0) = off, any positive value turns it on]
<PrefixText p$
<SuffixText s$
<Points: 1, 2,... = arcs to dimension, n = dimension location}
This draws a progressive radius dimension.
Compatibility: All versions.
Notes:- <Prefix and <PrefixText are mutually exclusive. If both parameters are used in the same
command the one used last will overrule the previous one.
- Once the <PrefixText is used in the command section, it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
- <Suffix and <SuffixText are mutually exclusive. If both parameters are used in the same command the one used last will overrule the previous one.
- Once the <SuffixText is used in the command section it will overrule the drop-down list selection by the user, however, it will NOT update the text in the list selection.
Example:
SelectScale>DimRadProgress{
<Arrowhead 9<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0<Pointxyz 35, 10, 0<Pointxyz 50, 10, 0<Pointxyz 50, 12, 0
}
DoEntitySelection
>DoEntitySelection
{
<UsePresetPoints 'uses points already in the point buffer
<Points ' specifies points instead of, or in addition to, those already inthe buffer.
}
This is used to select entities while in Preset Point Mode.
Compatibility: Version 16 and later.
Example:' requires PresetPointModeIf Not Sys(1116) Then
>PresetPointMode{}
End If>PresetPoint{
<PointXYZ 10, 10, 0<PointXYZ 15, 15, 0
}>2DBox{
<Orientation 0<Type 1<Layer 1<Color 255, 0, 0<UsePresetPoints
}Sys(1) = 0 'clear the point buffer>PresetPoint{
<PointXYZ 20, 10, 0<PointXYZ 25, 15, 0
}
>2DBox{
<Color 0, 0, 255<UsePresetPoints
}Sys(1) = 0 'clear the point buffer>PresetPoint{
<PointXYZ 10.5, 10.5, 0'<PointXYZ 20.5, 10.5, 0
}
>DoEntitySelection{
<UsePresetPoints<PointXYZ 20.5, 10.5, 0
}'clear preset points'Sys(1) = 0End
Door
>Door
{
<Type t[0 = Custom Door, 1 = Custom Sliding Door, 2 = 2 ft. 6 in. door, 3 = 3 ft. 6 in. door, 4 = 3ft. door, 5 = 5 ft. sliding door]
<Center ca[0 = door hinges on 1st point, 2 = door centered on 1st point. Corresponds to the “Center Align checkbox in the Door command dialog.]
<CenterPosition cp[0 = door not centered in width of double-line walls, 1 = door centered in width of double-line walls. Corresponds to the “Middle Align” checkbox in the Door command dialog.]
<SlidingDoor 0[In Version 17, this parameter is meaningless – this parameter is recorded but has no affect on the door that is drawn. Only the Type parameter determines if the door is a sliding door or not.]
<Size s – specifies the width of the door
<Text – specifies the text that is drawn with the door. This corresponds tothe "Remark" field in the Door command dialog.
<Point1 = door hinge point or door center (depends on the Center parameter)
<Point2 = door orientation – this point indicates which way the door opens.}
This draws a door.
SelectScale
Compatibility: All versions.
Example:>Line{
<Color 255,0,0<Layer 1<LineStyle 0, 2.0000, 0.0000<Width 0.5<Filled 0<Cap 3<AutoTrim 0<Alignment 1<PointXYZ 10, 10, 0<PointXYZ 10, 39.5, 0<PointXYZ 50, 39.5, 0
}
>Door{
<PointXYZ 24.4, 39.0, 0<PointXYZ 30.4, 39.6, 0<Type 2<Center 1<CenterPosition 1<SlidingDoor 0<Size 2.5<Text "2-6"
}
>Door{
<PointXYZ 9.0, 23.7, 0<PointXYZ 9.0, 30, 0<Type 4<Center 1<CenterPosition 1<SlidingDoor 0<Size 3.0<Text "3-0"
}
DoubleLineBar
>DoubleLineBar
{}
This toggles the DoubleLineToolbar on or off.
Compatibility: All versions.
Example:If Not (Sys(232)) Then
>DoubleLineBar{}
End If
DoubleLineConvert
>DoubleLineConvert
{
<Alignment n[0 = Left, 1 = Center, 2 = Right]
<AutoTrim a[0 = No, 1 = Yes]
<Cap c[0 = None, 1 = Cap Beginning, 2 = Cap End, 3 = Cap Both]
<Fill f[0 = No, 1 = Yes]
<Width w
<Point - a single point specifying the entity to be converted.}
This converts an ordinary line, circle, arc or curve into its double line equivalent using the parameters provided.
Compatibility: All versions.
Example:w = Sys(370) ' widthc = Sys(371) ' capstylet = Sys(372) ' autotrima = Sys(373) ' alignmentf = Sys(374) ' fill>DoubleLineConvert{
<Alignment [a]<Autotrim [t]<Width [w]<Cap [c]<Fill [f]' set a point on the entity
SelectScale<Pointxyz 10, 10, 0
}
DoubleLineMode
>DoubleLineMode
{}
This toggles Double Line Mode on or off.
Compatibility: All versions.
Example:If Not (Sys(346)) Then
>DoubleLineMode{}
End If
DoubleLineToPlane
>DoubleLineToPlane
{}
This converts selected Double Lines to planes.
Compatibility: Version `3 and later.
Example:Sys(346) = 0>Line{
<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0<Pointxyz 20, 20, 0<Pointxyz 10, 10, 0<Pointxyz 10, 10, 0
}>PointSelect{
<Pointxyz 10, 10, 0}>DoubleLineToPlane{}
DoubleLineToWideLine
>DoubleLineToWideLine
{}
This converts selected Double Lines to wide lines.
Compatibility: Version 13 and later.
Example:Sys(346) = 0>Line{
<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0<Pointxyz 20, 20, 0<Pointxyz 10, 10, 0<Pointxyz 10, 10, 0
}>PointSelect{
<Pointxyz 10, 10, 0}>DoubleLineToWideLine{}
DragCopy
>DragCopy
{
<Point 1 = location of copy}
This makes a copy of the selected entities.
Note: This command differs from >Duplicate{} in that it uses only the primary selection handle. Therefore with >DragCopy{} it is not possible to make acopy and change the scale and/or orientation of the copy at the same time.
Compatibility: All versions.
Example:>2DBox
SelectScale{
<Pointxyz 0, 0, 0<Pointxyz 20, 10, 0<Orientation 0<Type 1
}>PointSelect{
<Pointxyz 20, 10, 0}>DragCopy{
<Pointxyz 30, 15, 0}
DragMove
>DragMove
{
<Point: 1 = new location}
This moves the selected entities to a new location.
Note: This command differs from >Move{} in that it uses only the primary selection handle. Therefore with >DragMove{} it is not possible to move the entity and change its scale and/or orientation at the same time.
Compatibility: All versions.
Example:>2DBox{
<Pointxyz 0, 0, 0<Pointxyz 20, 10, 0<Orientation 0<Type 1
}>PointSelect{
<Pointxyz 20, 10, 0}>DragMove{
<Pointxyz 30, 15, 0}
DragMoveSelectedPoints
>DragMoveSelectedPoints
{
<Point: 1 = starting location; 2 = ending location}
This moves the selected points of the selected entity. The points are offset by the distance and direction between the two points set.
Note: This command only works while in Point Select Mode with at least one entity selected and at least one point highlighted for editing.
Compatibility: Version 13 and later.
Example:retry:Message "Select an entity on the screen"SetPoint "Set a point on an entity", 1PointVal x y z 1
>PointSelect{
<Type 0<Pointxyz [x, y, z]
}If Sys(80) < 1 Then Goto retry
If Not Sys(345) Then>PointSelectMode{}
End If
Message "Select some points on the entity."retry2:Sys(41) = 2 'show a rubberband boxSetPoint "Set 2 points for a box...", 2If Sys(1) < 2 Then Goto retry 2>DragSelect{
PointVal x, y, z, 1 'use 1st point<Pointxyz [x, y, z]PointVal x, y, z, 2 'use 2nd point<Pointxyz [x, y, z]
SelectScale
}SetSelectedPointsIf Sys(1) < 1 Then
Message "None selected. Try again..."Goto retry2
End If
Message "Moving the selected points..."PointVal x y z 1>GroupPointsMove{
<Pointxyz [x, y, z]<PointRel 5, 5, 0
}
DragSelect
>DragSelect
{
Type t[0 = select only items inside box, 1 = add items inside box to current selection, 2 = select only items inside or touched by box, 3 = add items inside or touched by box to current selection][for Point Select Mode: 0 = new point selection, 1 = add enclosed points, 2 = remove enclosed points, 3 = toggle status of enclosed points]
<Points: 1 = 1st corner of selection rectangle, 2 = opposite corner}
This selects entities by drawing a rectangle around them. Alternatively, it can be used while in Point Select Mode to select multiple points in one or more selected entities.
Compatibility: All versions.
Example: Select all entities within a 10 x 10 x 10 cube centered on the origin.>SelectMode3D{}>DragSelect{
<Type 0<Pointxyz -5, -5, -5<Pointxyz 5, 5, 5
}
See DragMoveSelectedPoints for an example of usage with Point Select Mode.
DrawingHandle
>DrawingHandle
{
<Points: 1 = primary handle, 2 = second handle, 3 = third handle}
This sets the drawing handles which are used when loading symbols or merging drawings.
Compatibility: All versions.
Example: Set one drawing handle at the center of the drawing.'Find the center of the drawingx = (Sys(120) + Sys(122))/2y = (Sys(121) + Sys(123))/2z = (Sys(124) + Sys(125))/2'set a handle at the center>DrawingHandle{
<Pointxyz [x, y, z]}
DrawingInfo
>DrawingInfo
{}
This shows the Drawing Info window.
Compatibility: All versions.
DrawSymbolAsBox
>DrawSymbolAsBox
{}
This toggles whether DesignCAD draws symbols as boxes (for faster redraws) or actually drawseach entity comprising the symbols.
Compatibility: All versions.
SelectScale
Duplicate
>Duplicate
{
<Reference r[0 = from handle, 1 = from reference point
<Type t[0 = changeable scale, 1 = fixed scale]
<Points:1 = 1st handle's new location (or reference point if reference=1), 2 = 2nd handle (or new location if reference=1), 3 = 3rd handle (only in 3-D mode if 3 handles set and reference=0)
}
This makes a new copy of the selected entity(s).
Compatibility: All versions.
Example: Draw a box, then make two copies: one at original scale, but rotated; the other one smaller than the original.
>Box{
<Pointxyz 0, 0, 0<Pointxyz 20, 10, 10
}>Pointselect{
<Pointxyz 0, 0, 0}>SetHandle{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, 10, 0
}>Duplicate{
<Type 0<Reference 0<Pointxyz 30, 0, 0<Pointxyz 30, 30, 0<Pointxyz 30, 30, 10
}>Duplicate{
<Type 1<Reference 0<Pointxyz 45, 0, 0<Pointxyz 50, 0, 0<Pointxyz 50, 10, 0
}>Duplicate{
<Type 0<Reference 1<Pointxyz 45, 0, 0<Pointxyz 50, 5, 0
}
DuplicateToLayer
>DuplicateToLayer
{
<Layer n – Destination layer}
This copies the selected entities to a single specified layer. If more than one layer is specified only the last one listed is used as the destination.
Compatibility: Version 13 and later.
Example: Copy the current selection to layer 7.>DuplicateToLayer{
<Layer 7}
DwgIn
DwgIn
{
<Filename "drawingname.ext"
<ExplodeBlocks ex[0 = no, 1 = yes]This parameter controls whether blocks in the imported drawing are retained as blocks or are exploded into individual entities.
<SkipHatch sh[0 = no, 1 = yes]This parameter offers the option to bypass hatch entities in the imported drawing.
<UseVectorFont uv
SelectScale
[0 = no, 1 = yes]If set to 1, all text will be imported to use the current vector font. If set to 0, all text is imported using the current TrueType font.
}
This imports a DWG file.
Note: For a convenient shortcut to specify the path to DesignCAD itself, use an asterisk "*". For example, if DesignCAD is installed in C:\Program Files\DesignCAD 97 and your file MYDWG.DWG is in the DWG subdirectory underneath DesignCAD, you can specify the filename as "*DWG\MYDWG.DWG" or "*\DWG\MYDWG.DWG."
Compatibility: All versions.
Example:' load a dwg file that is in DesignCAD's directory>DwgIn{<Filename "*\MyDwg.dwg"}' load a dwg file from the DWG subdirectory right beneath DesignCAD>DwgIn{
<Filename "*\DWG\MyOther.dwg"<ExplodeBlocks 1<SkipHatch 0<UseVectorFont 1
}
DwgOut
>DwgOut
{
<Filename "drawingname.ext"
<Type t[0 = 2.5, 1 = 2.6, 2 = 9.0, 3 = 10.0, 5 = 11.0, 5 = 13.0, 6 = 14.0, 7 = 2000]This parameter controls the version of DWG file that will be created.
<GridType g[0 = 3-D Mesh, 1 = 3-D Polyface]This parameter offers the option to export grid entities as a rectangular mesh or as individual polygons.
<HatchType ht[0 = hatch, 1 = lines, 2 = outline]This parameter controls how hatch entities are exported.
}
This exports the drawing to a DWG file.
Note: See notes on path names.
Compatibility: All versions.
Example:>DwgOut{
<Filename "*\NewDwg.Dwg"<Type 7<GridType 0<HatchType 0
}
DxfIn
>DxfIn
{
<Filename "drawingname.ext"
<ExplodeBlocks ex[0 = no, 1 = yes]This parameter controls whether blocks in the imported drawing are retained as blocks or are exploded into individual entities.
<SkipHatch sh[0 = no, 1 = yes]This parameter offers the option to bypass hatch entities in the imported drawing.
<UseVectorFont uv[0 = no, 1 = yes]If set to 1, all text will be imported to use the current vector font. If set to 0, all text is imported using the current TrueType font.
}
This imports a DXF file.
Note: See notes on path names.
Compatibility: All versions.
Example:' load a dxf file that is in DesignCAD's directory>DxfIn{
SelectScale<Filename "*\MyDxf.dxf"
}' load a dxf file from the DXF subdirectory right beneath DesignCAD>DxfIn{
<Filename "*\DXF\MyOther.DXF"<ExplodeBlocks 0<SkipHatch 1<UseVectorFont 0
}
DxfOut
>DxfOut{
<Filename "drawingname.ext"
<Type t[0 = no, 1 = yes]This parameter controls whether blocks in the imported drawing are retained as blocks or are exploded into individual entities.
<GridType g[0 = 3-D Mesh, 1 = 3-D Polyface]This parameter offers the option to export grid entities as a rectangular mesh or as individual polygons.
<HatchType ht[0 = hatch, 1 = lines, 2 = outline]This parameter controls how hatch entities are exported.
}
This exports the drawing to a DXF file.
Note: See notes on path names.
Compatibility: All versions.
Example:>DxfOut{
<Filename "*\NewDxf.Dxf"<Type 5<GridType 1<HatchType 2
}
Ellipse
>Ellipse
{
<Type t[0 = normal, 1 = vector, 2 = plane]
<Points: 1 = center, 2 = major axis, 3 = minor axis}
This draws an ellipse.
Compatibility: All versions.
Example:n = 4red = 128blue = 255green = 128>Ellipse{
<Color [red, blue, green]<Layer [n]<Type 0<Pointxyz 0, 0, 0<Pointxyz 20, 10, 0<Pointxyz -10, 5, 0
}
Ellipsoid
>Ellipsoid
{
<Latitude nlatnumber of divisions from pole to pole
<Longitude nlonnumber of divisions around the middle
<Orientation o[0 = point 2 on vertex, 1 = point 2 on midpoint of a side]
<Points: 1 = center, 2 = radius1, 3 = radius2, 4 = radius3}
This draws an ellipsoid.
Compatibility: Version 15 and later.
SelectScale
Example:n = 4red = 128blue = 255green = 128>Ellipse{
<Color [red, blue, green]<Layer [n]<Type 0<Pointxyz 0, 0, 0<Pointxyz 20, 10, 0<Pointxyz -10, 5, 0
}
EllipticalArc
>EllipticalArc
{
<Type t[0 = normal, 1 = vector]
<Points: 1 = center, 2 = start point (major axis), 3 = endpoint}
This draws an elliptical arc which starts at the one of the axes of the ellipse.
Compatibility: All versions.
Example:>EllipticalArc{
<Type 0<Pointxyz 0,0,0<Pointxyz 20, 10, 0<Pointxyz -10, 5, 0
}
EllipticalArc2
>EllipticalArc2
{
<Type t[0 = normal, 1 = vector]
<Points: 1 = center, 2 = major axis, 3 = minor axis, 4 = start point, 5 = end point
}
This draws an elliptical arc with arbitrary starting and ending angles.
Compatibility: All versions.
Example:>EllipticalArc2{
<Type 0<Pointxyz 0,0,0<Pointxyz 20, 10, 0<Pointxyz -5, 5, 0<Pointxyz 11, -5, 0<Pointxyz 6, 10, 0
}
EntitySelect
>EntitySelect
{<Type t1<Type t2<Type …
}
This allows you to select all entities of one or more type(s) in the entire drawing.
Note: See the PUTATTR statement in the previous chapter for a list of entity types.
Compatibility: All versions.
Example: Select all line, circles and ellipses.>EntitySelect{
<Type 1<Type 2<Type 16
}
Erase
>Erase
{}
This erases all selected entities. It is identical to SelectDelete below.
SelectScale
Compatibility: All versions.
EraseLast
>EraseLast
{}
This erases the last item that was drawn.
Compatibility: All versions.
ErasePresetPoint
>ErasePresetPoint
{}
This erases the last point in the point buffer.
Compatibility: All versions.
Example: Preset some points then erase the last one.Sys(1) = 0>PresetPoint{ <Pointxyz 10, 0, 0 <PointRel 10, 0, 0 <PointRel 0, 20, 0 <PointRel -10, 0, 0 <PointRel 0, -30, 0}' Changed my mind – I don't like the last point>ErasePresetPoint{}
Exit
>Exit
{}
This closes DesignCAD.
Compatibility: All versions.
Explode
>Explode
{}
This explodes the selected compound entity (dimensions, grids, symbols, etc.) into its component pieces.
Compatibility: All versions.
ExportPlotFile
>ExportPlotFile
{}
This exports a plotter/cutter/engraver file (HPGL, DMPL, Dhalgren Intermediate File, etc).
Compatibility: Version 13 and later.
Note: See notes on path names.
Extend
>Extend
{
<SelectOnly s[0 can affect any line; 1 only will extend a selected line]
<Points: 1 = line to be extended, 2 = distance to extend the line.}
This extends a line.
Note: Point 1 must be near the endpoint to be extended. Point 2 does not have to lie along the original line.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0,0,0
SelectScale<Pointxyz 10,10,10
}>Pointselect{
<Pointxyz 8,8,8}>Extend{
<Pointxyz 10,10,10<Pointxyz 15,15, 12
}
ExtendByDistance
>ExtendByDistance
{
<Distance d
<Type t[0 = along line, 1 = along X, 2 = along Y, 3 = along Z]
<Points: 1 = end of line to be extended.}
This extends a line by the specified distance.
Note: Point 1 must be near the endpoint which is to be extended.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0,0,0<Pointxyz 10,10,10
}>Extendbydistance{
<Distance 20<Type 0<Pointxyz 10,10,10
}
Extrude
>Extrude
{
<IncompleteIf this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<AlongCurve aextrudes an entity along a curve or line [0 = false, 1 = true]
<Perpendicular ponly applies when AlongCurve is true – if Perpendicular is also true, each copy of the extrusion template remains perpendicular to the curve or line. [0 = false, 1 = true]
<Scale 0, sfixedThe ending scale factor for fixed scale extrusion. There is no need to specify this scale for a varying scale extrusion; it is always 1.0.
<Scale 1, sf1Scale factors 1 through n are only used for varying scale extrusion. Scale factor 1 appliesat the SECOND point, factor 2 at the THIRD, etc.
<Scale 2, sf2<Scale 3, sf3<Scale n, sfn<Type t
[0 = fixed, 1 = varying]<Points: 1 = reference, 2 = first distance, 3 = 2nd distance, ...
}
This creates a surface by extruding a profile along a path.
Compatibility: All versions.
Example: Extrude one entity with varying scale and another with fixed scale.>Circle{
<Type 0<Pointxyz 0, 0, 0<Pointxyz 0, 10, 0<Pointxyz 10, 10, 0
}>PointSelect{
<Pointxyz 0, 0, 0}>Duplicate{
<Pointxyz 30, 0, 0}>Extrude{
<Type 1<Pointxyz 0, 0, 0<Pointxyz 0, 0, 10<Pointxyz 0, 0, 11<Pointxyz 0, 0, 20
SelectScale<Pointxyz 0, 0, 20<Pointxyz 0, 0, 0<Pointxyz 0, 0, 0<Scale 1, 1.0<Scale 2, 2.0<Scale 3, 1.0<Scale 4, 0.75<Scale 5, 0.75<Scale 6, 1.0
}>PointSelect{
<Gravity 30, 0, 0}>Extrude{
<Type 0<Pointxyz 30, 0, 0<Pointxyz 30, 0, 20<Scale 0, .75
}
ExtrudeAlongCurve
>ExtrudeAlongCurve
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Scale 0, sfixedThe ending scale factor for fixed scale extrusion. There is no need to specify this scale for a varying scale extrusion; it is always 1.0.
<Scale 1, sf1Scale factors 1 through n are only used for varying scale extrusion. Scale factor 1 appliesat the SECOND point, factor 2 at the THIRD, etc.
<Scale 2, sf2<Scale 3, sf3<Scale n, sfn<Type t
[0 = fixed scale, 1 = varying scale]<Orientation o
[0 = original – the orientation of the original copy is retained for all subsequent copies. 1 = Forward – each copy shifts its orientation so that an arrow from handles 1-2 points along the direction of the curve and an arrow from points 1-3 points "upward" from the plane of the curve 2 = Reverse – each copy shifts its orientation so that an arrow from handles 1-2 points inthe opposite direction of the curve 3 = Left – each copy shifts orientation so that an arrow from handles 1-2 points to the leftof the direction of travel along the curve
4 = Right – each copy shifts orientation so that an arrow from handles 1-2 points the rightof the direction of travel along the curve 5 = Perpendicular – mimics the behavior of the Perpendicular flag in older versions of DesignCAD]If this parameter is present, it overrides the Perpendicular parameter (and only applies if AlongCurve is set to 1)
<Points: 1 = reference, 2 = first distance, 3 = 2nd distance, ...}
This creates a surface by extruding a profile along a curve.
Compatibility: Version 15 and later.
FileBackup
>FileBackup
{}
This toggles DesignCAD's automatic save of backup file versions. See also Sys(1008).
Compatibility: Version 15 and later.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, 20, 0
}>Fillet{
<Type 0<Radius 2<Pointxyz 10, 0, 0<Pointxyz 20, 10, 0
}
Fillet
>Fillet
{<Type t
[0 = normal fillet, 1 = keep original lines]<Radius r<Points: 1 = 1st line to fillet, 2 = 2nd line to fillet
SelectScale}
This rounds the intersection of two lines.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, 20, 0
}>Fillet{
<Type 0<Radius 2<Pointxyz 10, 0, 0<Pointxyz 20, 10, 0
}
FilletCorner
{<Radius r<NFace n<Point 1 = corner to fillet
}
This fillets a corner of a 3-D solid.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}>FilletCorner{
<Radius 4<Nface 12<Pointxyz 10, 10, 0
}>FilletCorner{
<Pointxyz 0, 10, 0}
FilletEdge
>FilletEdge
{<Radius r1, r2<NFace n<Point 1 = edge to fillet
}
This fillets one edge of a 3-D solid.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}>FilletEdge{
<Nface 12<Pointxyz 0, 6, 0<Radius 4, 4
}>FilletEdge{
<Nface 8<Radius 3, 3<Pointxyz 10, 6, 0
}
FillWideLine
>FillWideLine
{}
This toggles wide line fill mode on or off.
Note: This command will not affect existing lines. It simply toggles the Fill Wide Lines setting in the Linestyle toolbox and will affect any lines drawn after
SelectScale
the change. DesignCAD currently allows a mix of filled and unfilled wide lines in the same drawing.
Compatibility: All versions.
Example: Check to see if Fill Wide Lines is on; if not, set it.If NOT Sys(24) Then>FillWideLines{}End If
FitToAllWindow
>FitToAllWindow
{}
This performs Fit To Window in all view windows of the drawing zooming them in or out as necessary.
Compatibility: All versions.
FitToWindow
>FitToWindow
{}
This zooms the drawing in or out so that it will completely fill the view window.
Compatibility: All versions.
GetEntity
>GetEntity
{<Point 1 = starting point to snap from<Type T1 – first entity type to find…<Type Tn – last entity type to find. Entity types are listed in the GETATTR Statement topic.<All a – find only on editable layers? [0 = yes, 1 = no]<MarkSkip ms – mark entity to be skipped after found? [0 = no, 1 = yes]
<SkipMark onlyms – find only among skipped entities? [0 = no, 1 = yes]}
This allows the programmer to find an entity and its section number by snap point. The entity id is returned in Sys(1040) and the section number is returned in Sys(1041).
Compatibility: Version 14 and later.
Example:>Curve{
<Layer 1<LineStyle 0, 2, 0<Pointxyz 5, 20, 0<Pointxyz 25, 5, 0<Pointxyz 52, 3, 0
}>Line{
<Layer 1<Pointxyz 5, 20, 0<Pointxyz 14, 40, 0<Pointxyz 58, 36, 0<Pointxyz 89, 0, 0<Pointxyz 30, -11, 0
}KeepLooking = 1Again:>GetEntity{
<PointXYZ 6, 21, 0<Type 4<Type 1<All 0<MarkSkip 1<SkipMark 1
}If (Sys(1040) <> 0) Then
KeepLooking = 1Entity Sys(1040)Message Sys$(300)Message "Segment #", Sys(1041)
ElseKeepLooking = 0Message "No (more) entities of the correct type were found within snapping range."
End If
Do While KeepLooking = 1
SelectScaleGoto Again
Loop
End
Gravity
>Gravity
{<Point 1 = starting point to snap from
}
This moves the cursor to the nearest existing point from the point specified.
Note: To set a gravity point inside the parameters section of another macro command, use the <Gravity x, y, z parameter. See Parameters to Set Points.
Compatibility: All versions.
GridOptions
>GridOptions
{}
This opens the Grid Options dialog.
Compatibility: All versions.
GroupDefine
>GroupDefine
{}
This defines the selected entities as a group.
Compatibility: All versions.
GroupExplode
>GroupExplode
{
}
This explodes the selected group(s) into individual entities.
Compatibility: All versions.
Hammer
>Hammer
{<Radius r<Type t
[0 = round hammer, 1 = pointed hammer]<Fix fx
[0 = hammered surface fixed to grid edges, 1 = free edges]<Points 1 = strike point, 2 = depth of strike
}
This makes a dent in a grid surface.
Note: This command will only operate in 3-D mode.
Compatibility: All versions.
Example:'Hammer does not operate in 2-D Mode, so'If 2-D Drafting Mode, return to 3-D modeIf Sys(344) Then>2DMode{}End If>Line{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0
}>Line{
<Pointxyz 20, 0, 0<Pointxyz 10, 15, 0
}>Line{
<Pointxyz 10, 15, 0<Pointxyz 0, 0, 0
}>Patch
SelectScale{
<Nplane 20, 20<Pointxyz 10, 0, 0<Pointxyz 15, 7.5, 0<Pointxyz 5, 7.5, 0
}>Hammer{
<Type 0<Radius 8<Fix 1<Pointxyz 10, 7.5, 0<Pointxyz 10, 7.0, 6
}
Hatch
>Hatch
{<Scale s
pattern scale<Angle a
pattern angle<Type t
hatch pattern: 0 = ANGLE, 1 = ANSI31, 2 = ANSI32, etc.Since there may be custom hatch patterns in the drawing, this parameter is unreliable from system to system. Instead, your new macros should use the new Name parameter instead.
<Name Pattern$hatch pattern name: "ANGLE", "HEX", "WIN_SOLID", etc. This parameter is now preferred over the Type parameter.
<Points: 1, 2, 3,... perimeter of hatch area}
This inserts a hatched area into the drawing.
Compatibility: All versions.
Example:If NOT Sys(344) Then
>2DMode{}
End If>Hatch{
<Color 255, 0, 128<Layer 3
<Scale 1.0<Angle 0<Name "HONEY"<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 20, 20<Pointxyz 0, 20, 0
}
HatchFill
>HatchFill
{<Scale s
pattern scale<Angle a
pattern angle<Type t
hatch pattern: 0 = ANGLE, 1 = ANSI31, 2 = ANSI32, etc.Since there may be custom hatch patterns in the drawing, this parameter is unreliable from system to system. Instead, your new macros should use the new Name parameter instead.
<Name Pattern$hatch pattern name: "ANGLE", "HEX", "WIN_SOLID", etc. This parameter is now preferred over the Type parameter.
<UseScreenArea bUse (new to Version 16)If set to 1, the hatch fill will be limited to the visible screen area. If set to zero, the hatch fillwill only be restricted by entity boundaries and may extend beyond the visible screen area..
<Point inside area to be filled}
This fills an enclosed region with a hatch pattern.
Note: This command will only work in 2-D Mode.
Compatibility: All versions.
Example:If NOT Sys(344) Then>2DMode{}End If>2DBox{
<Type 1<Pointxyz 0, 0, 0
SelectScale<Pointxyz 20, 10, 0
}>HatchFill{
<Name "Brass"<Angle 30<Scale 0.75<Pointxyz 10, 5, 0
}
HatchLine
>HatchLine
{<Scale s
pattern scale<Angle a
pattern angle<Type t
hatch pattern: 0 = ANGLE, 1 = ANSI31, 2 = ANSI32, etc.Since there may be custom hatch patterns in the drawing, this parameter is unreliable from system to system. Instead, your new macros should use the new Name parameter instead.
<Name Pattern$hatch pattern name: "ANGLE", "HEX", "WIN_SOLID", etc. This parameter is now preferred over the Type parameter.
<Points on each line to be hatched}
This inserts a hatched area into the region enclosed by the line(s) specified.
Note: This command will only work in 2-D Mode.
Compatibility: All versions.
Example:If NOT Sys(344) Then>2DMode{}End If>Circle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 10, 0
}>2DBox
{<Type 1<Pointxyz 24, 24, 0<Pointxyz 12, 12, 0
}>HatchLine{
<Name "BRICK2"<Pointxyz 10, 0, 0<Pointxyz 24, 24, 0
}
HatchOptions
>HatchOptions
{}
This opens the Hatch Options dialog.
Compatibility: Version 13 and later.
HatchPosition
>HatchPosition
{
<SelectOnly s [0 = no (all hatch patterns will be repositioned, 1 = yes (only the currently selected hatch pattern will be repositioned)]
<Points – Point 1 = original location in the hatch pattern Point 2 = new position
}
This allows you to realign a hatch pattern's base position in the drawing.
Compatibility: Version 15 and later.
HelpIndex
>HelpIndex
{}
This opens the Help index.
Compatibility: All versions.
SelectScale
HelpUsing
>HelpUsing
{}
This opens the "Using Help" topic.
Compatibility: All versions.
Hemisphere
>Hemisphere
{<Orientation o
[0 = vertex, 1 = midpoint of side, 2 = pole]<NLatitude
number of sides around equator<NLongitude
number of sides from pole to equator<Points: 1 = center, 2 = radius, 3 = direction
}
This draws a hemisphere.
Compatibility: All versions.
Example:If Sys(344) Then>2DMode{}End If>Hemisphere{
<Color 0, 255, 128<Layer 7<Orientation 2<Latitude 12<Longitude 6<Pointxyz 12, 12, 0<Pointxyz 24, 15, 0<Pointxyz 32, 18, 15
}
HiddenEdge
>HiddenEdge
{<Point 1 = point on line to be hidden
}
This hides the specified line segment.
Compatibility: All versions.
Example:>Plane{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, 20, 0<Pointxyz 0, 20, 0
}>Line{
<Pointxyz 10, -5, 0<Pointxyz 10, 25, 0
}>Circle{
<Type 2<Pointxyz 10, 10, 0<Pointxyz 10, 15, 0
}>Circle{
<Type 2<Pointxyz 10, 10, 0<Pointxyz 10, 15, 0
}>CutPlane{
<Pointxyz 10, -5, 0<Pointxyz 0, 0, 0
}>PlaneSubtract{
<Pointxyz 10, 15, 0<Pointxyz 0, 0, 0
}>PlaneSubtract{
SelectScale<Pointxyz 10, 15, 0<Pointxyz 10, 0, 0
}>HiddenEdge{
<Pointxyz 10, 2.5, 0}>HiddenEdge{
<Pointxyz 10, 17.5, 0}
HiddenEdgeBySection
>HiddenEdgeBySection
{<Points 1, 2 = region overlapping lines to be hidden
}
This hides all line segments enclosed by, or touching, the bounding box.
Compatibility: All versions.
Example:>Plane{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 20, 20, 0<Pointxyz 0, 20, 0
}>Line{
<Pointxyz 10, -5, 0<Pointxyz 10, 25, 0
}>Circle{
<Type 2<Pointxyz 10, 10, 0<Pointxyz 10, 15, 0
}>Circle{
<Type 2<Pointxyz 10, 10, 0<Pointxyz 10, 15, 0
}
>CutPlane{
<Pointxyz 10, -5, 0<Pointxyz 0, 0, 0
}>PlaneSubtract{
<Pointxyz 10, 15, 0<Pointxyz 0, 0, 0
}>PlaneSubtract{
<Pointxyz 10, 15, 0<Pointxyz 10, 0, 0
}>HiddenEdgeBySection{
<Pointxyz 10, 2.5, 0<Pointxyz 12, 17.5, 0
}
Hide
>Hide
{<ShowLine sl
[0 = no show, 1 = show]<ShowArrow sa
[0 = no show, 1 = show]<ShowDimension sd
[0 = no show, 1 = show]<ShowText st
[0 = no show, 1 = show]}
This hides lines and/or arrows, dimensions and text in the entire view.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 12, 24, 12
}>Line{
<Pointxyz -10, -10, -10<Pointxyz 0, 0, 0
SelectScale}>Hide{
<ShowText 0<ShowLine 1<ShowArrow 0<ShowDim 0
}
HideCommand
>HideCommand
{}
This opens the Hide command dialog for user interaction.
Compatibility: All versions.
HideRestoreToolbars
>HideRestoreToolbars
{}
This toggles the visibility of all currently enabled toolbars at once.
Compatibility: Version 15 and later.
HideSec
>HideSec
{<ShowLine sl
[0 = no show, 1 = show]<ShowArrow sa
[0 = no show, 1 = show]<ShowDim sd
[0 = no show, 1 = show]<ShowText st
[0 = no show, 1 = show]<Points: 1 = 1st corner, 2 = opposite corner of area to hide lines
}
Besides lines and/or arrows, dimensions and text in a section of the current view bounded by two points set by either the macro or the user.
Compatibility: All versions.
Example:Sys(36) = 1>Box{
<Pointxyz 0, 0, 0<Pointxyz 24, 12, 15
}>Dimension{
<Pointxyz 0, 0, 0<Pointxyz 24, 0, 0<Pointxyz 24, -5, 0
}>HideSec{
<ShowDim 1<Pointxyz -15, -15, 0<Pointxyz 15, 36, 10
}
HpglIn
>HpglIn
{<Filename "Filename.ext"
}
This imports an HPGL plot file.
Note: For files in or beneath the DesignCAD directory, you may use an asterisk at the beginning of the filename. For example if DesignCAD is installed in C:\MyProgs\DCAD14 and your hpgl file Myfile.hpg is in the same directory, you could use: <filename "*\Myfile.hpg" for the filename, instead of: <filename "C:\MyProgs\DCAD14\Myfile.hpg"
Compatibility: All versions.
IgesIn
>IgesIn
{<Filename "Filename.ext"
}
SelectScale
This imports an IGES file.
Note: As with HpglIn, you can use an asterisk in the filename parameter to refer to the DesignCAD directory.
Compatibility: All versions.
IgesOut
>IgesOut
{<Filename "Filename.ext"
}
This exports the drawing to an IGES file.
Note: As with HpglIn, you can use an asterisk in the filename parameter to refer to the DesignCAD directory.
Compatibility: All versions.
IncVDis
>IncVDis
{}
Increase viewing distance 10%.
Compatibility: All versions.
InfoBox
>InfoBox
{}
This opens the Info Box.
Compatibility: All versions.
Interfere
>Interfere
{<Points: 1, 2 = solids to check
}
This checks for interference (overlap) between two solids returning the result in Sys(657).
Compatibility: All versions.
Example:>Sphere{
<Pointxyz 0, 0, 0<Pointxyz 12, 0, 0
}>Sphere{
<Pointxyz 23, 0, 0<Pointxyz 23, 12, 0
}>Interfere{
<Pointxyz 0, 12, 0<Pointxyz 23, 12, 0
}
Intersect-1
>Intersect-1
{<Point 1 = point near intersection
}
This moves the cursor to the intersection nearest the point specified.
Note: To set an intersection point for use by another macro command, use the <Int1 x, y, z parameter. See Parameters to Set Points.
Compatibility: All versions.
Intersect-2
>Intersect-2
SelectScale{
<Points: 1 = point on 1st line, 2 = point on 2nd line}
This moves the cursor to the intersection of the two lines specified.
Note: To set an intersection of 2 lines for use by another macro command, use the macro parameter<Int2 x1, y1, z1, x2, y2, z2. See Parameters to Set Points.
Compatibility: All versions.
Join
>Join
{<SelectOnly s[0 = only selected entities, 1 = all entities in range box]<Endpoint i[0 = all enclosed points, 1 = endpoints only]<2DRange r[0 = 3-D range box, 1 = 2-D range box]<Points: 1 = corner of region, 2 = opposite corner of region
}
This joins the enclosed endpoints at a single point.
Compatibility: All versions.
Example:>Line{
<PointXYZ 0.0000, 0.0000, 0.0000<PointXYZ 9.0711, -10.4578, 0.0000
}>Line{
<PointXYZ 24.7008, 0.0754, 0.0000<PointXYZ 12.9414, -14.1277, 0.0000
}>Line{
<PointXYZ -0.7520, -27.4020, 0.0000<PointXYZ 9.7243, -13.8872, 0.0000
}>Join{
<PointXYZ 1.8319, -7.1940, 0.0000<PointXYZ 19.0819, -17.4678, 0.0000<EndPoint 1<2DRange 1<SelectOnly 0
}
LayerCopy
>LayerCopy
{<LayerFrom n1<LayerFrom n2<LayerFrom n3<LayerFrom n...layers to be copied from<LayerTo – destination layer
}
This duplicates the contents of one or more layers to another layer.
Compatibility: All versions.
Example: Copy layers 1, 10 and 24 to layer 37.
For i = 1 To 30>Box{
<Layer [i]<Color [8*i, 255 - 8*i, (128 + 8*1)\ 256]<Pointxyz [5 * i, 0, 0]<Pointxyz [5 * i + 4, 4, 4]
}Next i>LayerCopy{
<LayerFrom 1<LayerFrom 10<LayerFrom 24<LayerTo 37
}
LayerOptions
>LayerOptions
{}
SelectScale
This opens the Layer Options dialog.
Compatibility: All versions.
LayerSave
>LayerSave
{<LayerSelected n1<LayerSelected n2<LayerSelected n3<LayerSelected n...<Filename "filename.ext"
}
This saves the contents of one or more layers to a separate drawing file.
Note: As with DxfIn, you can use an asterisk in front of the filename as a shortcutfor the path to the DesignCAD directory.
Compatibility: All versions.
Example: Save layers 1, 10 and 24.For i = 1 To 30>Box{
<Layer [i]<Color [8*i, 255 - 8*i, (128 + 8*1)\ 256]<Pointxyz [5 * i, 0, 0]<Pointxyz [5 * i + 4, 4, 4]
}Next i>LayerSave{
<LayerSelected 1<LayerSelected 10<LayerSelected 24<Filename "*\Lsave.dc"
}
Light
>Light{}
This opens the Light Options dialog. The command only works in 3-D mode.
Compatibility: All versions.
Line
>Line{
<Incomplete - (optional)}
This draws a line.
Compatibility: All versions.
Example: Draw a "+" shape in the xz plane.
>Line{
<Pointxyz 0, 0, 0<Pointpolar 10, 0, 2<Pointpolar 10, 90, 2<Pointpolar 10, 0, 2<Pointpolar 10, -90, 2<Pointpolar 10, 0, 2<Pointpolar 10, -90, 2<Pointpolar 10, 180, 2<Pointpolar 10, -90, 2<Pointpolar 10, 180, 2<Pointpolar 10, 90, 2<Pointpolar 10, 180, 2<Pointpolar 10, 90, 2
}
LineAngle
>LineAngle
{<Points: 1, 2 = lines to measure
}This measures the angle between two lines.
Note: This command only works on two co-planar lines.
Result returned in Sys(651)
SelectScale
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 0, 10, 20
}>Line{
<Pointxyz 0, 0, 0<Pointxyz 15, 12, -5
}>LineAngle{
<Pointxyz 0, 10, 0<Pointxyz 15, 12, -5
}
LineDistance
>LineDistance
{<Points: 1, 2 = lines to measure
}
This measures the shortest distance between two lines.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}>Line{
<Pointxyz 5, 5, -5<Pointxyz 5, 5, 5
}>LineDistance{
<Pointxyz 0, 0, 0<Pointxyz 5, 5, 5
}
LinePlane
>LinePlane
{<Points: 1 = line, 2 = plane
}
This moves the cursor to the intersection of a line and a plane.
Note: To place an intersection of a line and a plane for use by a macro command, use the parameter <LinePlane xl, yl, zl, xp, yp, zp. See Parameters to Set Points.
Compatibility: All versions.
LineSnap
>LineSnap
{<point near line to snap to
}This moves the cursor to the nearest point on the nearest line.
Note: To snap to a line inside the parameters section of a macro command, use the parameter <Linesnap x, y, z. See Parameters to Set Points.
Compatibility: All versions.
LineStyleToolBox
>LineStyleToolbox
{}
This toggles the visibility of the Linestyle Toolbox
Compatibility: All versions.
LineToCurve
>LineToCurve
{
SelectScale}
This 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.
LoadBMP
>LoadBmp
{<Filename "filename.ext"<Points: 1 = starting corner, 2 = opposite corner (optional)
}
This inserts an image file into the current drawing. It can load image files of many types, including BMP, JPG, TIF, etc.
Note: As with the DxfIn command, you may use an asterisk in front of the filename for a shortcut to the DesignCAD directory, such as "*\mybmp.bmp".
Compatibility: All versions.
Example:
>LoadBmp{
<Filename "c:\windows\bubbles.bmp"<Pointxyz 0, 0, 0
}
LoadCustomKeys
>LoadCustomKeys
{<Filename "filename.dkf"
}
Note: As with the DxfIn command, you may use an asterisk in front of the filename for a shortcut to the DesignCAD directory, such as "*\mykeys.dkf".
This loads a custom keyboard (*.dka, *.dkf) file.
Compatibility: All versions.
Example:>LoadCustomKeys{
<Filename "*\MyCustomKeys.dma"}
LoadCustomMenu
>LoadCustomMenu
{<Filename "filename.dmf"
}
Note: As with the DxfIn command, you may use an asterisk in front of the filename for a shortcut to the DesignCAD directory, such as "*\mymenu.dmf".
This loads a custom menu (*.dma, *.dmf) file.
Compatibility: All versions.
Example:>LoadCustomMenu{
<Filename "*\MyCustomMenu.dma"}
LoadPSTemplate
>LoadPSTemplate
{<Filename "filename.tps"
}
Note: As with the DxfIn command, you may use an asterisk in front of the filename for a shortcut to the DesignCAD directory, such as "*\PSTemplate\MyPaperTemplate.tps".
This loads a paperspace template (*.tps) file and activates Paperspace Mode if it is not already active.
Compatibility: All versions.
Example:>LoadPSTemplate{
SelectScale<Filename "*\MyTemplate.tps"
}
LoadToolbox
>LoadToolbox
{<Filename "filename.dct"
}
This loads a custom toolbox from a (*.dct) file.
Note: You can use an asterisk in front of the filename as a shortcut for the path to the DesignCAD directory. The DCT file format is described later in this documentation.
Compatibility: All versions.
Example:>LoadToolbox{
<Filename "*\mytoolbox.dct"}
LoadWorkplane
>LoadWorkplane{
<Name WpName$}
This loads the named custom workplane; if no such name exists the command has no effect.
Compatibility: Version 13 and later.
LockX
>LockX
{
<LockCoordinate k[0 = unlocked, 1 = locked]
<Point with the x-value to be locked. This point is ignored if LockCoordinate is set to 0
}
This either locks or unlocks the cursor to set points at constant X. The cursor may move freely while the coordinate is locked, but all points will shift to the locked X value.
Note: Any Locked coordinate can by unlocked by any other Lock command that sets LockCoordinate to 0. Also, switching from locked X to locked Y or Z does not require an intermediate unlock operation.
Compatibility: Version 13 and later.
Example:>LockX{
<LockCoordinate 1<Pointxyz 15, 0, 0
}
Message "X is now locked at 15. Set points for a line and press Enter when done..."
>Line{}
>LockX{
<LockCoordinate 0}
Message "X is unlocked. Set points for a line and press Enter whendone..."
>Line{}
LockY
>LockY
{
<LockCoordinate k[0 = no, 1 = yes]
<Point with the y-value to be locked. This point is ignored if LockCoordinate is set to 0
}
SelectScale
This either locks or unlocks the cursor to set points at constant Y. The cursor may move freely while the coordinate is locked, but all points will shift to the locked Y value.
Note: Any Locked coordinate can by unlocked by any other Lock command that sets LockCoordinate to 0. Also, switching from locked X to locked Y or Z does not require an intermediate unlock operation.
Compatibility: Version 13 and later.
Example:Message "Locking X to 10">LockX{ <LockCoordinate 1 <Pointxyz 10, 0, 0 }
>Line{}
>LockX{ <LockCoordinate 0 <Pointxyz 20, 0, 0 }
Message "Free motion...">Line{}
Message "Locking Y at 15">LockY{ <LockCoordinate 1 <Pointxyz 20, 15, 30 }
>Line{}
Message "Locking Z at 5">LockZ{ <LockCoordinate 1 <Pointxyz 10, 15, 5 }
>Circle{}
Message "Freedom Rings">LockX{ <LockCoordinate 0 }
>Line{}
LockZ
>LockZ
{
<LockCoordinate k[0 = no, 1 = yes]
<Point with the z-value to be locked. This point is ignored if LockCoordinate is set to 0
}
This either locks or unlocks the cursor to set points at constant Z. The cursor may move freely while the coordinate is locked, but all points will shift to the locked Z value.
Note: Any Locked coordinate can by unlocked by any other Lock command that sets LockCoordinate to 0. Also, switching from locked X to locked Y or Z does not require an intermediate unlock operation.
Compatibility: Version 13 and later.
Example:Message "Locking X to 10">LockX
SelectScale
{ <LockCoordinate 1 <Pointxyz 10, 0, 0 }
>Line{}
>LockX{ <LockCoordinate 0 <Pointxyz 20, 0, 0 }
Message "Free motion...">Line{}
Message "Locking Y at 15">LockY{ <LockCoordinate 1 <Pointxyz 20, 15, 30 }
>Line{}
Message "Locking Z at 5">LockZ{ <LockCoordinate 1 <Pointxyz 10, 15, 5 }
>Circle{}
Message "Freedom Rings">LockX{ <LockCoordinate 0
}
>Line{}
MainToolBox
>MainToolbox
{}
This toggles the visibility of the Main Toolbox.
Compatibility: All versions.
MakePlane
>MakePlane
{}
This converts the selected entities into planes of the same shape.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointpolar 10, 120, 0<Pointpolar 10, 240, 0
}>Pointselect{
<Pointxyz 0, 0, 0}>MakePlane{}
MaterialEdit
>MaterialEdit
{
SelectScale}
This opens the Material Options dialog.
Compatibility: All versions.
MaterialList
>MaterialList
{}
This generates a counted list of the attributes in the drawing.
Compatibility: All versions.
MaterialToolBox
>MaterialToolbox
{}
This toggles the visibility of the Material Toolbox.
Compatibility: All versions.
Merge
>Merge
{<Scale s
[0 = changeable scale, 1 = original scale]<Type t
[0 = not selected after merge, 1 = selected after merge]<Filename "path\filename.ext"
<Points: 1 = 1st handle, 2 = 2nd handle, 3 = 3rd handle}
This merges another drawing file into the current drawing with the option to scale the merged file. This has the same effect as loading a symbol with the "Explode Symbol" option checked. Toload an unexploded symbol with a macro use the SymbolLoad command.
Note: Use an asterisk (*) as a shortcut for the path in the Filename parameter. The asterisk will always point to the drive and directory where DesignCAD
is installed. For example, "*\somefile.dc" refers to a drawing that is in the same directory as DesignCAD. "*\Sample\othrfile.dc" refers to a file in the DesignCAD\Sample directory.
Compatibility: All versions.
Example:>Merge{
<PointXYZ 0.0000, 0.0000, 0.0000<PointXYZ 12, 0, 0<PointXYZ 12, 20, 0<Filename "*\somefile.dc"<Type 0<Scale 0
}
Midpoint
>MidPoint
{<Point near line segment
}
This moves the cursor to the midpoint of the nearest line.
Note: To snap to a midpoint inside the parameters section of a macro command, use the <MidPoint x, y, z parameter. See Parameters to Set Points.
Compatibility: All versions.
Midpoint2
>MidPoint2
{<Point 1<Point 2
}
This moves the cursor to a point midway between points 1 and 2.
Compatibility: Version 13 and later.
SelectScale
Mirror
>Mirror
{<Axis a[0 = x, 1 = y, 2 = z, 3 = custom]<Type t[0 = don't make copy , 1 = make copy]<Point 1 = location of mirrored copy
}
This creates a mirror copy of the selected entities.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 0, 0, 10
}>Hemisphere{
<Orientation 1<Pointxyz 0, 0, 0<Pointxyz 0, 3, 3<Pointxyz 0, 3, -3
}>Pointselect{
<Pointxyz 0, 3, -3}>SetHandle{
<Pointxyz 0, 0, 0}>Mirror{
<Axis 2<Pointxyz 0, 0, 10
}
Move
>Move
{<Reference r
[0 = from handle, 1 = from reference point<Type t[0 = changeable scale, 1 = fixed scale]<Points: 1 = 1st handle's new location (or reference point if reference=1), 2 = 2nd handle (or new location if reference=1), 3 = 3rd handle (only in 3-D mode if 3 handles set and reference=0)
}
This moves the selected entities to a new location.
Compatibility: All versions.
Example:>2DBox{
<Type 1<Orientation 0<Pointxyz 0, 0, 0<Pointxyz 20, 10, 0
}>PointSelect{
<Pointxyz 0, 0, 0}>SetHandle{
<Pointxyz 0, 0, 0<Pointpolar 20, 0, 0
}Print "Press a key"Anykey>Move{
<Type 1<Reference 0<Pointxyz 10, 0, 0'rotated, but not scaled<Pointpolar 30, 30, 0
}Print "press a key"Anykey>Move{
<Type 0<Reference 0<Pointxyz 10, 0, 0
SelectScale'rotated and scaled<Pointpolar 30, 30, 0
}Print "press a key"Anykey>Move{
<Type 0<Reference 1<Pointxyz 0, 0, 0<Pointrel 10, 0, 0 'moves 10 units right
MoveCursor
>MoveCursor
{
<Point - new location for cursor}
This moves the cursor without setting a point. If no point is specified, the command waits for the user to set a point.
Compatibility: All versions.
Example:>MoveCursor{
<Pointxyz 10, 10, 0}
MoveDown
>MoveDown
{}
This rotates the camera below the entity.
Compatibility: All versions.
MoveLeft
>MoveLeft
{}
This rotates the camera to the left.
Compatibility: All versions.
MoveRight
>MoveRight
{}
This rotates the camera to the right.
Compatibility: All versions.
MoveToBack
>MoveToBack
{}
This moves the selected items to the back of the display list so they appear to be "behind" all other entities in the drawing.
Compatibility: All versions.
MoveToBackOf
>MoveToBackOf
{
<Point - item to be directly in "front" of selected items.}
This moves the selected items to the back of the clicked item in the display list so they appear tobe "behind" the entity referenced by the point.
Compatibility: All versions.
MoveToFront
>MoveToFront
{}
SelectScale
This moves the selected items to the front of the display list so they appear to be "in front of" all other entities in the drawing.
Compatibility: All versions.
MoveToFrontOf
>MoveToFrontOf
{
<Point - item to be directly "behind" the selected items.}
This moves the selected items to the front of the clicked item in the display list so they appear tobe "in front of" the entity referenced by the point.
Compatibility: All versions.
MoveUp
>MoveUp
{}
This rotates the camera toward the top of the entity.
Compatibility: All versions.
MultilineMode
>MultilineMode
{}
This toggles Multiline Mode on and off.
Compatibility: Version 16(?) and later.
MultiLineStyleEditor
>MultiLineStyleEditor
{}
This toggles MultilineStyleEditor on and off.
Compatibility: Version 16(?) and later.
New
>New
{}
This opens a new drawing file.
Compatibility: All versions.
NewWindow
>NewWindow
{}
This opens a new view window.
Compatibility: All versions.
ObjectRepeat
>ObjectRepeat
{}
Deprecated. This is the same as Array which is the preferred command.
Compatibility: All versions.
OffScreenBitmap
>OffScreenBitmap
{}
This toggles the OffscreenBitmap option.
Compatibility: All versions.
SelectScale
Open
>Open
{<Filename "filename.ext"
}
This opens a drawing file. If you don't specify a filename, or if DesignCAD can't find the file specified, the Open dialog appears with a list of available files.
Note: You can use an asterisk (*)in place of the full path to the DesignCAD directory. For example, if DesignCAD is installed in C:\Program Files\DesignCAD 97 and you want to open the drawing Myfile.dc in that directory, you can use <Filename "*\Myfile.dc" as the parameter for the Open command, instead of the more cumbersome <Filename "C:\Program Files\DesignCAD 97\Myfile.dc."
Compatibility: All versions.
Example:>Open{
<Filename "*\Samples\KB20.dc"}
Options
>Options
{}
This opens the Options folder.
Compatibility: All versions.
Origin
>Origin
{<point 1 = new origin
}
This moves the origin of the drawing to the specified location.
Compatibility: All versions.
OriginalSize
>OriginalSize
{}
This restores the drawing to its original zoom factor and location.
Compatibility: All versions.
Ortho
>Ortho
{}
This aligns the selected entities with the X, Y and Z axes if the entities are almost parallel to the axes.
Compatibility: All versions.
OrthoLine
>OrthoLine
{<Incomplete - (Optional)<Points along orthogonal line
}
This draws an orthogonal line (all segments are parallel to X, Y or Z axes).
Compatibility: All versions.
OrthoMode
>OrthoMode
{}
This toggles OrthoMode on or off.
Compatibility: All versions.
SelectScale
Pan
>Pan
{<Points: 1 = drag handle, 2 = new location
}
This shifts the view of the drawing.
Compatibility: All versions.
Example:>Pan{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}
PaperSpaceConfiguration
>PaperSpaceConfiguration
{}
This opens the PaperSpace Configuration dialog.
Compatibility: All versions.
PaperSpaceMode
>PaperSpaceMode
{<Filename "filename.tps"
}
This toggles DesignCAD into or out of Paper Space Mode. The Filename parameter is optional but, if given, toggles paperspace mode on (if necessary) and loads the given template file without showing a dialog.
Compatibility: All versions.
Parallel
>Parallel
{<SelectOnly i
[0 = parallel any entity, 1 = parallel only selected entities]<Points: 1 = original line, 2 = location of parallel line
}
This draws a new line parallel to an existing line.
Compatibility: All versions.
Example:>Circle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}>Parallel{
<Color 255, 0, 128<Pointxyz 10, 0, 0<Pointxyz 11, 0, 0
}
ParallelByDistance
>ParallelByDistance
{<Distance d
distance of parallel line from original line<SelectOnly i
[0 = parallel any entity, 1 = parallel only selected entities]<Points: 1 = original line, 2 = direction of parallel line
}
This draws a new line parallel to an existing line at a specified distance.
Compatibility: All versions.
Example:>Circle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}>ParallelByDistance{
<Color 255, 0, 128<Distance 5
SelectScale<Pointxyz 10, 0, 0<Pointxyz 11, 0, 0
}
Parallelogram
>Parallelogram
{<Type t
[0 = line, 1 = plane]<Points: 1 = first corner, 2 = second corner, 3 = third corner
}
This draws a parallelogram.
Compatibility: All versions.
Example:>Parallelogram{
<Color 255, 0, 128<Pointxyz 0, 0, 0<Pointxyz 10, 2, 0<Pointxyz 12, 7, 0<Type 1
}
PasswordProtectionManager
>PasswordProtectionManager
{}
This opens the Password Protection Manager dialog.
Compatibility: All versions.
Paste
>Paste
{<Type t
0 = Changeable scale (based on distance between handles 1 and 2); 1 = Fixed scale (always paste at original size)
<SelectOnly0 = select the pasted entity; 1 = leave the pasted entity unselected
<Points: 1 = primary handle, 2-3 = second and third handles}
This pastes entities from the clipboard into the drawing.
Compatibility: All versions.
Example:>Box{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>PointSelect{
<Pointxyz 12, 12, 0}>SetHandle{
<Pointxyz 12, 12, 0<Pointxyz 36, 24, 0
}>Copy{}>Paste{
<Type 0<Pointxyz 12, 24, 0<Pointxyz 40, 24, 0
}
Patch
>Patch
{<NPlane n, mnumber of divisions across the width and length of the patch<Points: 1, 2, 3, 4 lines to be patched
}
This draws a surface grid between any three or four connected lines.
Compatibility: All versions.
Example:>BezierCurve{
SelectScale<PointXYZ 0.0000, 0.0000, 0.0000<PointXYZ 9.5450, 7.4976, 0.0000<PointXYZ 25.0892, 8.5261, 0.0000<PointXYZ 31.3900, 17.7556, 0.0000
}>BezierCurve{
<PointXYZ 0.0000, 0.0000, 19.6003<PointXYZ 6.7322, 7.6098, 19.6003<PointXYZ 25.0892, 8.5261, 27.2730<PointXYZ 23.9830, 20.7747, 27.2730
}>Curve{
<PointXYZ 25.0892, 8.5261, 0.0000<PointXYZ 24.5787, 11.2713, 19.5198<PointXYZ 25.0892, 8.5261, 27.2730<Type 0
}>Curve{
<PointXYZ 0.0000, 0.0000, 19.6003<PointXYZ -3.5712, 0.1884, 7.7175<PointXYZ 0.0000, 0.0000, 0.0000<Type 0
}>Patch{
<PointXYZ -2.8071, 0.1481, 13.4527<PointXYZ 12.2845, 3.6014, -0.0000<PointXYZ 24.5199, 11.5875, 17.1385<PointXYZ 11.3393, 2.8027, 22.0757<NPlane 20, 20
}
Perimeter
>Perimeter
{<Points: points around the perimeter to be measured
}
This measures the length of the line represented by the points set; the result is returned in Sys(658).
Compatibility: Version 17 and later.
Example:
>Perimeter{
<Pointxyz 15, 10, 0<Pointxyz 25, 15, 0<Pointxyz 15, 15, 0<Pointxyz 15, 10, 0
}Precision 4Message "The perimeter is: ", Sys(658)
PerpendicularFrom
>PerpendicularFrom
{<Length l
length of perpendicular line<SelectOnly i
[0 = to any line, 1 = to a selected line only]<Points: 1 = starting line, 2 = direction of perpendicular
}
This draws a perpendicular line of specified length from a specified point on an existing line in the specified direction.
Compatibility: All versions.
Example:>Line{
<Pointxyz 10, 5, 0<Pointxyz 25, 45, 0
}>PerpendicularFrom{
<Midpoint 10, 5, 0<Pointxyz 0, 15, 0<Length 15
}
PerpendicularPlane
>PerpendicularPlane{
<Width wlength of a side of the perpendicular plane
<Points: 1 = line, 2 = intersection of plane and line}
SelectScale
This draws a rectangular plane of specified width perpendicular to a given line and point.
Compatibility: All versions.
Example:>Circle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 0, 10
}>PerpendicularPlane{
<Width 1<Pointxyz 10, 0, 0<Pointxyz 10, 0, 0
}>PerpendicularPlane{
<Pointpolar 10, 45, 2<Pointrel 0, 0, 0
}>PerpendicularPlane{
<Pointpolar 10, 135, 2<Pointrel 0, 0, 0
}
PerpendicularTo
>PerpendicularTo
{<SelectOnly i[0 = to any line, 1 = to a selected line only]<Points: 1 = start point, 2 = reference line
}
This draws a perpendicular line from a starting point to a specified line.
Compatibility: All versions.
Example:>Line{
<Pointxyz 15, 10, 0<Pointxyz 25, 15, 0
}>PerpendicularTo
{<Pointxyz 0, 12, 0<Pointxyz 15, 10, 0
}
Plane
>Plane
{<Incomplete - (Optional)<Points: 1, 2, 3,... perimeter of plane
}
This draws a bounded planar surface.
Compatibility: All versions.
Example:>Plane{
<Pointxyz 10, 10, 10<Pointrel 0, 0, 10<Pointrel 15, 0, 0<Pointrel 0, 0, 10<Pointrel 15, 0, 0<Pointrel 0, 0, -20
}
Planesnap
>PlaneSnap
{<Point 1 = point near plane
}
This moves the cursor to the nearest point on the nearest plane or surface.
Note: To set a point on a plane inside another macro command, use the parameter <Planesnap x, y, z. See Parameters to Set Points.
Compatibility: All versions.
PlaneSubtract
>PlaneSubtract
SelectScale{
<Points: 1 = plane to be subtracted, 2 = plane to be modified}
This subtracts plane 1 from plane 2.
Compatibility: All versions.
Example:>Plane{
<Pointxyz 10, 30, 0<Pointrel 0, 20, 0<Pointrel 20, 0, 0<Pointrel 0, -20, 0
}>Plane{
<Pointxyz 0, 0, 0<Pointrel 10, 0, 0<Pointrel 0, 20, 0<Pointrel 30, 0, 0<pointrel 0, 40, 0<Pointrel -40, 0, 0
}>PlaneSubtract{
<Pointxyz 10, 30, 0<Pointxyz 0, 0, 0
}
PlotSort
>PlotSort
{}
This enables/disables the “Optimize plot by color sorting” option in the Print dialog. In this mode DesignCAD sends the drawing to a plotter one color at a time.
Compatibility: Version 14(?) and later.
Example:>PlotSort{}
PointMark
>PointMark
{<Type t
[0 = cross, 1 = cross + circle, 2 = cross + square, 3 = cross + circle + square]<Size s<points: points to be marked
}
This draws one or more point marks.
Compatibility: All versions.
Example:Sys(36) = 1 'set silent mode for speed>PointMark{
<Type 1<Size 1For i = 0 To 25 <Pointxyz [i, sqrt(i), 0]Next i
}
PointMove
>PointMove
{<Points: 1 = point to be moved, 2 = new location
}
This moves a vertex to a new location.
Compatibility: All versions.
Example:>2DBox{
<Orientation 0<Pointxyz 0, 0, 0<Pointxyz 30, 20, 0
}>Pointmove{
<Pointxyz 30, 0, 0<Pointxyz 30, 10, 0
}
SelectScale
PointSelect
>PointSelect
{<Type t
[0 = normal, 1 = Shift, 2 = Ctrl, 3 = Ctrl+Shift]<Point 1 = entity to be selected
}
This selects an entity by setting a point on it.
Compatibility: All versions.
PointSelectMode
>PointSelectMode
{}
This toggles Point Select Mode.
Note: You can check the value of Sys(345) to determine if Point Select Mode is currently active.
Compatibility: All versions.
Example: Make sure PointSelectMode is active.If NOT(Sys(345)) Then
>PointSelectMode{}
End If
PointXYZ
>PointXYZ
{<Point 1 - location to set point
}
This moves the cursor to the specified point.
Note: To set a point for use by another macro command, use the <Pointxyz x, y,z parameter. See Parameters to Set Points.
Compatibility: All versions.
PolygonAdd
>PolygonAdd
{}
This adds two or more shapes together to form one continuous shape. The shapes must line in the same plane.
Compatibility: Version 13 and later.
Example: Add two circles to form a single shape.>Circle{
<Pointxyz 20, 20, 0<Pointxyz 30, 20, 0
}>Circle{
<Pointxyz 35, 20, 0<Pointxyz 45, 20, 0
}>PolygonAdd{
<Pointxyz 20, 30, 0<Pointxyz 35, 30, 0
}
PolygonCenter
>PolygonCenter
{<Orientation o
[0 = vertex, 1 = midpoint of side]<NSide s
number of sides<Type t
[0 = line, 2 = plane]<Points: 1 = center, 2 = radius, 3 = plane reference
}
This draws a polygon from the center to a point on its perimeter.
Compatibility: All versions.
SelectScale
Example: Draw two polygons, one just inside a circle, the other just enclosing the same circle.rad = 10Input "How many sides for the polygon", sidesangle1 = 360/(2*sides)
>SetStartPoint{}>Circle{
<Pointxyz 0, 0, 0<Pointpolar [rad, 0, 0]<Pointpolar [rad, 90, 0]
}>PolygonCenter{
<Orientation 1<Pointxyz 0, 0, 0<Pointxyz [rad, 0, 0]<NSide [sides]
}>PolygonCenter{
<Orientation 0<Pointxyz 0, 0, 0<Pointpolar [rad, angle1, 0]<NSide [sides]
}
PolygonEdge
>PolygonEdge
{<NSide s
number of sides<Type t
[0 = line, 2 = plane]<Points: 1 = vertex, 2 = next vertex, 3 = plane reference
}
This draws a polygon from two neighboring corners.
Compatibility: All versions.
Example:>PolygonEdge{
<NSide 5
<Type 0<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0<Pointxyz 5, 5, 0
}
PolygonIntersect
>PolygonIntersect
{}
This finds the common intersecting region of two or more shapes.
Compatibility: Version 13 and later.
Example: Find the intersection of two overlapping circles.>Circle{
<Pointxyz 20, 20, 0<Pointxyz 30, 20, 0
}>Circle{
<Pointxyz 35, 20, 0<Pointxyz 45, 20, 0
}>PolygonIntersect{
<Pointxyz 20, 30, 0<Pointxyz 35, 30, 0
}
PolygonSelection
>PolygonSelection
{
<Points for the selection polygon}
This selects entities bounded by a polygonal fence.
Compatibility: All versions.
Example: Select some entities inside a polygon.>Circle{
SelectScale<Pointxyz 20, 20, 0<Pointxyz 30, 20, 0
}>Circle{
<Pointxyz 35, 20, 0<Pointxyz 45, 20, 0
}>PolygonSelection{
<Pointxyz 5, 5, 0<Pointxyz 50, 5, 0<Pointxyz 50, 35, 0<Pointxyz 5, 35, 0
}
PolygonSubtract
>PolygonSubtract
{}
This subtracts one or more shapes from another shape.
Compatibility: Version 13 and later.
Example: Subtract one circle from another overlapping circle.>Circle{
<Pointxyz 20, 20, 0<Pointxyz 30, 20, 0
}>Circle{
<Pointxyz 35, 20, 0<Pointxyz 45, 20, 0
}>PolygonSubtract{
<Pointxyz 20, 30, 0<Pointxyz 35, 30, 0
}
PolygonXOr
>PolygonXOr
{}
This deletes the area common to two shapes.
Compatibility: Version 13 and later.
Example: Cut away the overlap between two circles.>Circle{
<Pointxyz 20, 20, 0<Pointxyz 30, 20, 0
}>Circle{
<Pointxyz 35, 20, 0<Pointxyz 45, 20, 0
}>PolygonXOr{
<Pointxyz 20, 30, 0<Pointxyz 35, 30, 0
}
PresetPoint
>PresetPoint
{<Points: set any points you want using the PointXYZ, PointPolar and other point-setting macro parameters
}
This stores one or more points in the point buffer just as if you had used SetPoint to have the user set points.
Compatibility: Version 13 and later.
Example: Draw a line using some existing points that were set in Preset Point Mode then set some more using PresetPoint and draw a curve through those points.
Enter Preset Point Mode, set a few points, then run this macro; it should draw a line through the points you preset then draw a curve. After the macro has completed, press "V" or run the Line command; it should draw a horizontal line using the last two points set by the macro.
If Sys(1) < 1 Then Message "No pre-existing points – skipping Line command"Else >Line { <UsePresetPoints }End If
SelectScale' clear the preset pointsSys(1) = 0>PresetPoint{ <Pointxyz 10, 0, 0 <PointRel 10, 0, 0 <PointRel 0, 20, 0 <PointRel -10, 0, 0 <PointRel 0, -30, 0}' Changed my mind – I don't like the last point>ErasePresetPoint{}' Add a new corrected point>PresetPoint{ <PointXYZ 10, 0, 0}>Curve{ <UsePresetPoints ' I can still add more points this way... <Pointxyz 30, 20, 0}' clear points againSys(1) = 0 ' set two points ready for use by presetpoint mode on exit.>PresetPoint{ <Pointxyz 10, 10, 0 <Pointxyz 25, 10, 0}End
PresetPointMode
>PresetPointMode
{}
This toggles Preset Point Mode on and off. You can determine if Preset Point Mode is currently active by testing Sys(1116).
Compatibility: Version 15(?) and later.
Example: Turn on PresetPointMode if not active.If (Not Sys(1116)) Then
>PresetPointMode
{}
End If
{}
This opens the Print dialog.
Compatibility: All versions.
PrintCurrentView
>PrintCurrentView
{}
This Prince the portion of the drawing that is currently displayed in the active view sized to fill the page.
Compatibility: Version 13 and later.
PrintNow
>PrintNow
{}
This sends the document directly to the default printer, using the most recent print settings.
Compatibility: All versions.
PSViewerBox
>PSViewerBox
{}
This prompts the user to set points to create paper-space view frame (only works in Paper Space Mode).
SelectScale
Compatibility: All versions.
Pullout
>Pullout
{<Orientation o
[0 = parallel, 1 = perpendicular, 2 = horizontal, 3 = vertical]<Location l
[0 = in-line, 1 = above, 2 = below]<Font "fontname"
the full name of the Windows font, e.g.: "Times New Roman"<Text "textcontent"<Size s
text size; if zero, uses default text size<Arrowhead a
arrowhead style; see Arrow command for details<Arrowsize as
arrowhead size<Points 1 = head, 2 ... = body, last = text location
}
This draws an arrow with descriptive text.
Compatibility: All versions.
Example:>Pullout{
<Orientation 2<Size 2<Arrowsize 1<Arrowhead 3<Pointxyz 5, 0, 0<Pointxyz 10, 0, 0<Text "This is a pullout"
}
PurgeBlocks
>PurgeBlocks
{}
This deletes all unused blocks from the drawing.
Compatibility: Version 13 and later.
Pyramid
>Pyramid
{<Orientation o
0 = vertex, 1 = midpoint<NFace n
}
This draws a pyramid of the specified number of sides.
Compatibility: All versions.
Example: Draw two pyramids, the first one fitting inside a circle of radius 10, the next one just enclosing a circle of the same radius.
>Circle{
<Color 0, 255, 0<Pointxyz 0,0,0<Pointxyz 10, 0, 0<Pointxyz 10, 0, 10
}sides = 4>Pyramid{
<Color 255, 0, 0' orientation 0 makes the base fit inside a ' given radius<Orientation 0<Nface [sides]<Pointxyz 0, 0, 0<Pointpolar 10, 0, 2<Pointrel 0, 10, 0
}>Pyramid{
<Color 0, 0, 255' orientation 1 makes the base enclose a ' given radius<Orientation 1<Pointxyz 0, 0, 0<Pointpolar 10, [180/sides], 2<Pointrel 0, 10, 0
}
QShade
>QShade
SelectScale{
<ShowLine sl[0 = no show, 1 = show]
<ShowArrow sa[0 = no show, 1 = show]
<ShowDim sd[0 = no show, 1 = show]
<ShowText st[0 = no show, 1 = show]
}
This issues the Quick Shade command for the view.
Compatibility: All versions.
Example:>Box{
<Pointxyz 10, 5, 10<Pointrel 10, 10, -10
}>QShade{
<ShowLine 0<ShowArrow 0<ShowDim 0<ShowText 0
}
QShadeSec
>QShadeSec
{<ShowLine sl
[0 = no show, 1 = show]<ShowArrow sa
[0 = no show, 1 = show]<ShowDim sd
[0 = no show, 1 = show]<ShowText st
[0 = no show, 1 = show]<Points: 1 = corner of region, 2 = opposite corner of region
}
This issues the Quick Shade command for section.
Compatibility: All versions.
Example:>Box{
<Pointxyz 10, 5, 10<Pointrel 10, 10, -10
}>QShadeSec{
<ShowLine 1<ShowArrow 1<ShowDim 1<ShowText 0<Pointxyz -10, -10, -10<Pointxyz 10, 20, 10
}
QuarterCircle
>QuarterCircle
{<Type t
[0 = arc, 1 = vector arc]<Points: 1 = starting point, 2 = endpoint, 3 = plane reference
}
This draws a quarter circle counterclockwise from start to end.
Compatibility: All versions.
Example:>QuarterCircle{
<Color 255, 0, 0<Type 0<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0
}
Quit
>Quit
{}
This exits DesignCAD.
Compatibility: All versions.
SelectScale
RecursiveGroupExplode
>RecursiveGroupExplode
{}
This explodes all groups and nested groups that are currently selected; afterwards the selected entities are not part of any group.
Compatibility: Version 17 and later.
Redo
>Redo
{}
This restores an operation that was previously cancelled with Undo.
Compatibility: All versions.
Redraw
>Redraw
{}
This refreshes the image of the active view.
Compatibility: All versions.
RedrawAll
>RedrawAll
{}
This refreshes the image of all views.
Compatibility: All versions.
Regenerate
>Regenerate
{}
This redraws every entity of the active view.
Compatibility: All versions.
RegenerateAll
>RegenerateAll
{}
This redraws every entity of every view.
Compatibility: All versions.
RemoveDrawingHandles
>RemoveDrawingHandles
{}
This removes the handles from a drawing (identical to ClearDrawingHandle).
Compatibility: Version 15 and later.
RemoveToolbox
>RemoveToolbox
{<Toolboxname "name"
Displayed name of toolbox under View | Options}
This deletes the specified custom toolbox from DesignCAD's interface.
Compatibility: All versions.
SelectScale
ResizingNodes
>ResizingNodes
{}
This toggles Resizing nodes for selections on and off.
Compatibility: Version 14 and later.
RestoreDCADTile
>RestoreDCADTile
{}
This restores the default DesignCAD Tile settings.
Compatibility: All versions.
RestoreDefaultMenu
>RestoreDefaultMenu
{}
This restores DesignCAD’s default menu.
Compatibility: All versions.
ReversePoints
>ReversePoints
{}
This reverses the point order in selected lines, planes and curves. The apparent shape is not changed only the order of points (e.g. Last-to-first instead of first-to-last).
Compatibility: Version 13 and later.
RoundBox
>RoundBox
{<NFace n<Radius r<Points: 1 = starting corner, 2 = opposite corner
}
This draws a 3-D box with all corners filleted.
Compatibility: Version 13 and later.
Example:>Roundbox{
<NFace 12<Radius 1<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}
RoundCylinder
>RoundCylinder
{<NFace n1, n2, n3
n1 = number of facets around the cylinder bodyn2 = number of facets for the first end's filletn3 = number of facets for the second end's fillet
<Radius r1, r2r1 = radius of first end filletr2 = radius of second end fillet
<Orientation o [0 = point2 on vertex, 1 = point 2 on middle of edge] (currently not implemented)<Points: 1 = center, 2 = radius, 3 = height
}
This draws a cylinder with rounded ends.
Compatibility: Version 15 and later.
Example:>RoundCylinder{
<NFace 20, 8, 8<Radius 0.5, 1
SelectScale<Pointxyz 0, 0, 0<Pointxyz 6, 0, 0<Pointxyz 6, 16, 0
}
Rotate
>Rotate
{
<Axis i[0 = x, 1 = y, 2 = z, 3 = 2-point, 4 = line, 5 = plane]
<Angle arotation angle
<ThroughHandle th[0 = no, 1 = yes]This parameter controls whether the axis of rotation runs through the primary selection handle or through the point(s) specified.
<Points for axis of rotation, line, or plane and center of rotation}
This rotates the selected entities.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 20, 10, 10
}>PointSelect{
<Pointxyz 0, 0, 0}>SetHandle{
<Pointxyz 10, 10, 5}>Rotate{
<ThroughHandle 1<Axis 1<Pointxyz 10, 10, 5<Angle 45
}>Rotate{
<ThroughHandle 0<Axis 2<Pointxyz 10, 10, 10<Angle 30
}
Ruler
>Ruler
{}
This toggles the ruler display on or off (but ruler only displays in 2-D Drafting Mode).
Compatibility: All versions.
RunX
>RunX
{
<FileName exename.exe}
This runs a program given the fully qualified path and name-with-extension of an executable program.
Compatibility: All versions.
Save
>Save
{}
This saves the drawing under its current name; if it has not been saved yet, the SaveAs dialog opens.
Compatibility: All versions.
SaveAs
>SaveAs
{<SelectOnly ss
SelectScale
[0 = save everything, 1 = only save selected items]<Save2D t
[0 = no, 1 = 2-D projection, 2 = 2-D with hidden line removal, 3 = 2-D hidden line with automatic cleanup]
<Filename "filename.ext"}
This opens the operating system’s Save As dialogue allowing the user to save the current drawing under a new filename.
Note: As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference tothe directory containing the DesignCAD program.
Compatibility: All versions.
Example:>New{}>Sphere{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Color 128, 0, 255<Layer 3
}>SaveAs{
<Filename "*\saveas.dc"}>Sphere{
<Pointxyz 20, 0, 0<Pointxyz 20, 10, 0<Color 255, 0, 0
}>SaveAs{
<Filename "*\spheres2.dc"}>SaveAs{
<Filename "*\spheres2.dc3"}>PointSelect{
<Pointxyz 20, 10, 0}
>SaveAs{
<SelectOnly 1<Filename "*\spheresel.dc"
}
SaveAsSymbol
>SaveAsSymbol
{<SelectOnly ss
[0 = save everything, 1 = only save selected items]<ToLayerZero z
[0 = no (entities retain their original layer), 1 = yes (all entities moved to layer 0 in the saved file)]
<Type t[0 = default handles, 1 = use existing handles or macro points set]
<Filename "filename.ext"}
This opens the operating system’s Save As dialogue allowing the user to save the current drawing (or selected entities) under a new file name for use as a symbol.
Note: As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference tothe directory containing the DesignCAD program.
Compatibility: Version 15 and later.
Example: Save the current selection using macro points as the drawing handles.>2DBox{
<Orientation 0<Type 1<Pointxyz 0, 0, 0<Pointxyz 10, 7.5, 0<Layer 7
}>PointSelect{
<Pointxyz 0, 0, 0
>SaveAsSymbol{
<Filename "*\symbols\MyNewSymbol.dcd"<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Type 1 'use the points just set for the handles
SelectScale<SelectOnly 1 ' save only the selected entities<ToLayerZero 1 'store the saved entities in layer 0
}
SaveBMP
>SaveBmp
{<Filename "filename.ext"<Points: 1 = 1st corner of rectangular region, 2 = opposite corner.
}
This saves a bitmap image of all or part of the view.
Note: As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference tothe directory containing the DesignCAD program.
Note on Points: If no points are set and <Incomplete is not specified, the entireview will be saved as a bitmap.
Compatibility: All versions.
Example:>Sphere{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0
}>Shade{}>SaveBmp{
<Filename "*sphere.jpg"}
SaveCopy
>SaveCopy
{<SelectOnly ss
[0 = save everything, 1 = only save selected items]<Save2D t
[0 = no, 1 = 2-D projection, 2 = 2-D with hidden line removal, 3 = 2-D hidden line with automatic cleanup]
<Filename "filename.ext"
}
This saves a copy of the current drawing under a new filename. The name of the file being edited remains unchanged.
Note: As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference tothe directory containing the DesignCAD program.
Compatibility: Version 15 and later.
Example:>New{}>Sphere{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Color 128, 0, 255<Layer 3
}>SaveAs{
<SelectOnly 0<Save2D 0<Filename "*\Spheres1.dcd"
}>Sphere{
<Pointxyz 20, 0, 0<Pointxyz 20, 10, 0<Color 255, 0, 0
}>SaveCopy{
<SelectOnly 0<Save2D 0<Filename "*\spheres2.dcd"
}
SaveCurrentView
>SaveCurrentView
{<Text "view name"
}
SelectScale
This saves the current view angles and view distance as a named view setting in the Viewing Toolbox view list. This named view is saved along with DesignCAD's other custom settings and will continue to be available in other drawing sessions.
Note: Do not confuse this command with ViewSave which saves the number of view windows and their sizes, the zoom factors and view angles for each view window and other details in a separate file.
Compatibility: All versions.
Example:>SaveCurrentView{
<Text "Custom View"}
SaveCustomKeys
>SaveCustomKeys
{<Filename "filename.dkf"
{
This saves the current keyboard shortcuts as a custom keyboard file (*.dkf).
Compatibility: Version 15 and later.
SaveCustomMenu
>SaveCustomMenu
{<Filename "filename.dmf"
{
This saves the current menu as a custom menu file (*.dmf, *.dma).
Compatibility: All versions.
SavePSTemplate
>SavePSTemplate
{<Filename "filename.tps"
{
This saves the current paper space template to a template file (*.tps). This command only workswhile in Paper Space mode.
Compatibility: All versions.
SaveSelected
>SaveSelected
{<Filename "filename.ext"
}
This saves the selected entities to a separate drawing file.
Note: The selection handles will be used as the new file's drawing handles. As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference to the directory containing the DesignCAD program.
Compatibility: All versions.
Example:>SaveSelected{
<Filename "*\myfiles\selected.dc"}
ScrollBar
>ScrollBar
{}
This toggles the scroll bar on or off.
Compatibility: All versions.
SectionCopy
>SectionCopy
{
<Points: 1 = first corner of region, 2 = opposite corner}
SelectScale
This copies the specified region to the clipboard.
Compatibility: All versions.
SectionCut
>SectionCut
{}
This cuts all entities at their intersection with the rectangular cutting region. This is the preferred version and is the same as Cutoff.
Compatibility: All versions.
SectionCutByLine
>SectionCutByLine
{
<SelectOnly s - which entities to cut[0 = cut everything, 1 = cut selected]
<SelectAfter a - which entities to select after the cut[0 = select inside only, 1 = select outside only, 2 = select both, 3 = select nothing]
<Type t - which entities to keep after the cut[0 = keep inside section, 1 = keep outside section, 2 = keep both]
<Point 1 - a point on the line used as a cut boundary}
This cuts away a section of the drawing enclosed by the specified line, circle or curve.
Compatibility: Version 13 and later.
Example:>Circle{
<Pointxyz 10, 10, 0<Pointxyz 15, 10, 0
}>2DBox{
<Type 1<Orientation 0<Pointxyz 0, 8, 0<Pointxyz 20, 12, 0
}>SectionCutByLine{
<SelectOnly 0<Type 1<SelectAfter 3<Pointxyz 0, 8, 0
}
SectionDeleteCutoff
>SectionDeleteCutoff
{<Points: 1 = first corner of region, 2 = opposite corner
}
This deletes a rectangular section of the drawing and is the same as CutoffDel (which is the preferred usage).
Note: In version 17 and later, SectionDeleteCutoff is automatically mapped to the new SectionTrim command.
Compatibility: All versions; deprecated for use in Version 17 and later.
SectionTrim
>SectionTrim{
<Point 1 – first corner of trim rectangle<Point 2 – opposite corner of trim rectangle<SelectOnly [so] 0 = trim everything, 1 = trim selected entities
only<TrimArea [inside] 0 = trim away everything OUTSIDE the rectangle,
1 = trim everything INSIDE the rectangle}This deletes either the inside or outside of a rectangular section of the drawing or selected entities.
Note: In version 17 and later SectionDeleteCutoff and CutoffDel are automatically mapped to the SectionTrim command.
Compatibility: Version 17 and later.
SelectScale
Segment
>Segment
{
<Segment nsno. of segments; ignored if SpecifyDistance is not 0
<SpecifyDistance sd[0-no (default), 1 = yes
<RemoveLeftovers r[0 = no, 1 = yes]
<SetPointAndDirection sp[0 = no, 1 = yes]
<PointsPoint 1 – specifies the line to be segmented and if SetPointAndDirection is 1, also specifies an exact segment breakPoint 2 – optional; if SetPointAndDirection is 1, this point indicates which end of the line should besegmented starting from point 1. If this point is omitted, the entire line is segmented.
}
This breaks a line into equal segments.
Compatibility: All versions.
Example:>Line{
<Pointxyz 10, 0, 0<Pointxyz 30, 60, 0
}>Segment{
<Segment 20<Linesnap 15, 10, 0
}
SelectAddPoint
>SelectAddPoint
{
Point 1: Point on the entity where a point is to be added.
Point 2: The location of the new point.}
This adds a new point to a selected line or curve much as you can manually in Point Select Mode.
Note: 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; otherwise Point 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 (e.g. entity point 2 for the first segment, or entity point 3 for the second segment, etc.), the new point is added to that segment; knowing this can help avoid the problems of item 2 above (you should perhaps avoid inserting a point at the very first point in a line or curve unless it is a closed entity).
Compatibility: Version 16 and later.
Example:' SelAddPt.d3m' Test of the SelectAddPoint macro command.' First, we'll draw a line to play with>Line{
<Pointxyz 10, 10, 0<Pointxyz 30, 10, 0<Pointxyz 30, 20, 0<Pointxyz 10, 25, 0<Pointxyz 10, 10, 0}
' Next we must select the line to be modified>PointSelect{
<Pointxyz 10, 10, 0}' We also *MUST* be in Point Select ModeIf Not Sys(345) Then
>PointSelectMode{}
End If' Now we use SelectAddPoint to add a point to a specific segment' on the selected line.' Point 1 specifies which segment is to be bent,' Point 2 specifies the vertex of the new bend.>SelectAddPoint{
' Note that the first point here is EXACTLY ON the line's' first segment.<Pointxyz 12, 10, 0<Pointxyz 15, 5, 0
}
SelectScale' This next attempt doesn't work as you might expect!' 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{
<Pointxyz 15, 26, 0<Pointxyz 15, 40, 0
}' But, wait – there's a workaround!' Whenever you set the first point exactly on, or close enough' to Gravity snap to, the END point of the segment (which could' be determined ahead of time using the Entity statement and' reading the points into an array. ' In this case, we know the point locations and order, so we'll' gravity to the second point we set (which is now the third' point in the entity.>SelectAddPoint{
<Gravity 30, 20, 0<Pointxyz 35, 15, 0
}' Finally, you can JUST specify one point; if it's close enough' to an existing segment, the point will be added to the nearest' segment. Otherwise, the point will be added to the first' segment of the line or curve.>SelectAddPoint{
<Pointxyz 10, 17.5, 0}End
SelectAll
>SelectAll
{}
This selects all editable entities in the drawing.
Note: The behavior of SelectAll changed in version 12. SelectAll no longer selects all 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) use SelectEverything.
Compatibility: All versions; note behavior change for Versions 13 and later.
SelectDelete
>SelectDelete
{}
This erases the selected entities and is the same as Erase.
Compatibility: All versions.
SelectDuplicate
>SelectDuplicate
{}
This makes a copy of all selected entities and is the same as Duplicate.
Compatibility: All versions.
SelectDuplicateToLayer
>SelectDuplicateToLayer
{
<Layer newlayer}
This copies selected entities to the specified layer and is the same as DuplicateToLayer.
Compatibility: All versions.
SelectEverything
>SelectEverything
{}
SelectScale
This selects all entities in the drawing (even those on non-visible and non-editable layers – which it makes editable). Only password-protected layers are skipped. In Version 12 and older this was the behavior of SelectAll.
Compatibility: Version 13 and later.
SelectImageSource
>SelectImageSource
{}
Compatibility: All versions.
SelectionFilter
>SelectionFilter
{}
This opens the Selection Filter dialog.
Compatibility: All versions.
SelectLayer
>SelectLayer{
<Layer n
The layer number to be selected. There can be multiple Layer parameters in the command to select more than one layer
<Type t
[0 (default) - selects only the listed layers. All other items de-selected.
1 - Adds the listed layers to the current selection set.
-1 - Removes the selected layers from the selection set.]}
This allows the selection or the selection of one or more layers.
Note: This command will overwrite the editable and visible flags for any listed layers. In other words, if Layer 3 is invisible or non-editable, selecting it with SelectLayer will change Layer 3 to be both visible and editable. Pay attention to what you're doing!
Compatibility: All versions.
Example:
>SelectLayer{
<Layer 1<Layer 5<Layer 11<Type 0 ' default; just here for clarity
}' oops...I didn't want layer 11 after all...>SelectLayer{
<Layer 11<Type -1
}
SelectMirror
>SelectMirror
{}
This creates a mirror copy of the selected entities and is the same as Mirror.
Compatibility: All versions.
SelectMode
>SelectMode
{}
This toggles Point Select Mode and is the same as PointSelectMode.
Compatibility: All versions.
SelectModeChange
>SelectModeChange
{}
SelectScale
This toggles between 2-D Selection Mode and 3-D Selection Mode.
Compatibility: All versions.
SelectMove
>SelectMove
{}
This moves the selected entities to a new location and is the same as Move.
Compatibility: All versions.
SelectOrtho
>SelectOrtho
{}
This aligns the selected entities with the X, Y and Z axes if the entities are almost parallel to the axes; it is the same as Ortho.
Compatibility: All versions.
SelectPrevious
>SelectPrevious
{}
This re-selects the previously selected entity(s).
Compatibility: All versions.
SelectScale
>SelectScale
{<Scale xscale, yscale, zscale
}
This changes the scale of the selected entities.
Compatibility: All versions.
Example:>Sphere{
<Pointxyz 10, 10, 0<Pointxyz 10, 0, 0
}>PointSelect{
<Pointxyz 10, 0, 0}>SelectScale{
<Scale 2.0, 1.25, 3.0}
SelectScaleOrtho
>SelectScaleOrtho
{<Zoomfactor f
}
This makes the selected entities larger or smaller.
Compatibility: All versions.
Example:>Sphere{
<Pointxyz 10, 10, 0<Pointxyz 10, 0, 0
}>PointSelect{
<Pointxyz 10, 0, 0}>SelectScaleOrtho{
<ZoomFactor 1.5}
SelectSlant
>SelectSlant
{
SelectScale<Type tAxis on which the selected entity is to be skewed[0 = x, 1 = y, 2 = z, 3 = free]<Angle askew angle [0 to 360]<Point 1 – reference point<Point 2 – new position for reference point
}
This slants the selected entities along the X, Y, or Z axis or a free direction.
Compatibility: All versions.
Example:>Sphere{
<Pointxyz 10, 10, 0<Pointxyz 10, 0, 0
}>PointSelect{
<Pointxyz 10, 0, 0}>SelectScale{
<Scale 2.0, 1.25, 3.0}
SemiCircle
>SemiCircle
{<Type t
[0 = arc, 1 = vector arc]}
This draws a semicircle in counterclockwise direction from the first to the second point.
Compatibility: All versions.
Example:>SemiCircle{
<Color 0,0,0<Layer 1<LineStyle 0,2.0000,0.0000<PointXYZ 127.1498,145.6490,0.0000<PointXYZ 155.1600,142.6791,0.0000
<PointXYZ 152.7457,150.4489,0.0000<Type 0
}
SendAllFiles
>SendAllFiles{
<Type t [0 = drawing, 1 = image] *New in Version 15}
This sends all open drawings in an email as attachments.
Compatibility: All versions. Type parameter only exists in Version 15 and later.
SendCurrentFile
>SendCurrentFile
{
<Type t [0 = drawing, 1 = image] *New in Version 15}
This sends the active drawing as an email attachment.
Compatibility: All versions. Type parameter only exists in Version 15 and later.
SetColor
>SetColor
{<Color redValue, greenValue, blueValue
}
This changes the current drawing color.
Compatibility: All versions.
SetDCADTile
>SetDcadTile
{}
SelectScale
This makes the current view window arrangement the default DesignCAD tile arrangement. Note: there are separate tile settings for 2-D mode and 3-D mode.
Compatibility: All versions.
SetDimensionOptions
>SetDimensionOptions
{<OptDimType i
[0 = Linear, 1 = Angle, 2 = Arc, 3 = Chamfer, 4 = Diameter, 5 = Radius, 6 = Coordinate, 7 = Baseline, 8 = Extended, 9 = Progressive, 10 = Radius Progressive, 11 = Distance Only, 12 = Pullout, 13 = Balloon]Type of dimension being configured.
<OptFixedLength f [0 = no, 1 = yes]Extension lines have fixed length?
<OptDimLength lLength of fixed dimension lines
<OptVarLength v [0 = no, 1 = yes]Extension lines have variable length?
<OptDimGap gGap between point measured and bottom of leader line
<OptDashAfterFeet a [0 = no, 1 = yes]sets option for dash after feet
<OptDashBeforeFraction b [0 = no, 1 = yes]sets option for dash before fraction
<OptDimTextFormat x[0 = decimal, 1 = fractional, 2 = feet+decimal inches, 3 = feet+fractional inches]
<OptDimTextPrec p [-7 to 15]precision of displayed measurement
<OptDimTextLoc e [varies by type]location of the text relative to the arrows.
<OptDimTextOrientation o [varies by type]text orientation
<OptDimTextSize ssize of dimension text
<OptSameAsText sameAs [0 = no, 1 = yes]dimension text same size as regular text?
<OptDimTextPos plane[0 = aligned, 1 = xy, 2 = zy, 3 = zx]controls the plane of the displayed text
<OptDimLinePos lp[0 = arrows inside, 1 = arrows outside
OptDimLineOffset offspace between consecutive baseline dimensions
<OptDimArrowType atarrowhead type (see Arrow for the types)
<OptDimArrowSize asarrowhead size
<OptDimSaveDefault default [0 = no, 1 = yes]save settings as program defaults?
<OptDimResetDefault} restore [0 = no, 1 = yes]restore original settings?
This changes the default dimension settings.
Compatibility: All versions.
SetDrawingHandle
>SetDrawingHandle
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Points: 1 = 1st handle, 2 = 2nd handle, 3 = 3rd handle}
This sets the drawing handles which are used when loading symbols or merging drawings and is the same as DrawingHandle.
Compatibility: All versions.
Example:>2DBox{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 0
}>SetDrawingHandle{
<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 10, 0
}
SetGridCenter
>SetGridCenter
{<Point 1 = new center for display grid
}
SelectScale
This sets a new location for the center of the display grid (and the snap grid if Sys(1010) is set to 1).
Example: Make the snap and display grids align with the left and bottom edges of a box.Sys(1010) = 1 ' synchronize grids>2DBox{
<Pointxyz 2.6825, 7.1025, 0<Pointrel 25, 10, 0
}>SetGridCenter{
<Pointxyz 2.6825, 7.1025, 0}
Compatibility: All versions.
SetHandle
>SetHandle
{
<Type t *New in Version 15
[0 = any location, 1 = center, 2 = lower left front, 3 = lower right front, etc]New macros should explicitly set this parameter to avoid problems resulting from the user choosing another handle location manually
<Points: 1 = 1st handle, 2 = 2nd handle, 3 = 3rd handle}
This sets the selection handles for the currently selected entities.
Compatibility: All versions. The Type parameter only exists in version 15 and later.
Example:>Ellipse{
<Type 2<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 0, 10, 0
}>PointSelect{
<Pointxyz 0, 10, 0}>SetHandle{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0<Pointxyz 0, 10, 0<Type 0
}>Duplicate{
<Pointxyz 0, 0, 10<Pointxyz 0, 10, 10<Pointxyz -5, 0, 10
}
SetPoints>SetPoints
{<Maxpoints n – maximum number of points accepted<CmdPrompt prmpt$ – status-bar message<Incomplete i – optional wait for more points
[0 = don't wait, 1 = wait]Note: If this parameter is set to zero (or omitted) the SetPoints command will not wait for the user to set ANY points.
<Points p1, ... optional
}
This gets a sequence of points from the user and stores them in the point buffer. It is possible tocall this command with the first one or more points pre-set by the macro. SetPoints is quite similar to the SETPOINT Statement except that this command allows you to preset the initial points and the SETPOINT statement does not.
Compatibility: All versions.
Example:Sys(41) = 23 ' angled 2-D Box rubberband>SetPoints{
<MaxPoints 3 ' accepts 3 points in all<CmdPrompt "Set a point for the box height"<Pointxyz 20, 10, 0<Pointxyz 32, 17.5, 0<Incomplete 1
}' quit if less than 3 pointsIf Sys(1) < 3 Then End
Dim x(3)Dim y(3)Dim z(3)
SelectScale
npts = Sys(1)For i = 1 To npts
Pointval x(i) y(i) z(i) iNext i
>2DBox{
<Color 0,0,255<Layer 7<Orientation 1 ' angled box<Type 1 ' vector resultFor i = 1 To npts <Pointxyz [x(i), y(i), z(i)]Next i
}
SetPrintOptions
>SetPrintOptions
{<PrintToFile f
[0 = no, 1 = yes]<ShowDim d
[0 = no, 1 = yes]<ShowText t
[0 = no, 1 = yes]<ShowArrow a
[0 = no, 1 = yes]<ShowLine l
[0 = no, 1 = yes]
}
This sets some default print settings.
Compatibility: All versions.
SetShadeStyle
>SetShadeStyle
{
<ShadeStyle s[0 = quick, 1 = gouraud, 2 = gouraud anti-aliased, 3 = phong, 4 = phong anti-aliased]
<EnableTransparency t[0 = off, 1 = on]
<EnableFog f[0 = off, 1 = on]
<FogStyle s[0 = linear, 1 = exp, 2 = exp2]
<Fogdensity dfog density as a percentage (ex. 10 = 10%)
<FogStart fsfog start position relative to drawing depth at the current viewing angle(ex. 0.2 = 20% into the drawing)
<FogEnd fefog ending position (location of 100% density) relative to drawing depth at the current viewing angle (ex. 0.9 = 90% into the drawing)
<FogColor r, g, bfog color
<EnableBackgroundFog fb[0 = no, 1 = yes]
}
This sets the shading style for non-accelerated shading.
Compatibility: Version 14 and later.
SetStartPoint
>SetStartPoint
{<Point 1 = starting location for macro
}
This sets (or prompts the user for) a starting point for the macro. If you do not explicitly set the point in your macro (e.g. if you call SetStartPoint with no parameters inside the braces) the user will be prompted to set a starting point.
Compatibility: All versions.
Note: If no starting point is set all values are measured from the true origin. If thispoint is set it becomes the drawing's temporary origin for the duration of the macro. This means that all x, y and z values are measured from the starting point not from the true origin. When the macro ends the original origin is restored.
SetView
>SetView
SelectScale{}
This interactively changes the viewing angles.
Compatibility: All versions.
SetViewerPoints
>SetViewerPoints
{<Points: 1 = target point , 2 = camera location
}
This changes the point being observed and the location of the observer.
Compatibility: All versions.
Example:>SetViewerPoints{
<Pointxyz 0, 0, 0 ' look at this point<Pointxyz 200, 300, -1000 ' from here
}
ShadeCommand
ShadeCommand
{<ShowLine sl
[0 = no show, 1 = show lines]<ShowArrow sa
[0 = no show, 1 = show arrows]<ShowDim sd
[0 = no show, 1 = show dimensions]<ShowText st
[0 = no show, 1 = show text]}
This opens the Shade dialog.
Compatibility: All versions.
ShadeSection
ShadeSection
{<ShowLine sl
0 = no show, 1 = show lines]<ShowArrow sa
[0 = no show, 1 = show arrows]<ShowDim sd
[0 = no show, 1 = show dimensions]<ShowText st
[0 = no show, 1 = show text]<Points: 1 = 1st corner of region, 2 = 2nd corner of region
}
Use this to shade a region of the view using DesignCAD's native shading algorithm.
Compatibility: All versions.
ShadeView
ShadeView
{<ShowLine sl
[0 = no show, 1 = show lines]<ShowArrow sa
[0 = no show, 1 = show arrows]<ShowDim sd
[0 = no show, 1 = show dimensions]<ShowText st
[0 = no show, 1 = show text]}
Shade the active view using DesignCAD's native shading algorithm.
Compatibility: All versions.
ShowAttributes
>ShowAttributes
{}
This toggles the visibility of Attribute entities.
Compatibility: All versions.
SelectScale
ShowConstructionLines
>ShowConstructionLines
{}
This toggles the display of construction lines.
Compatibility: Version 13 and later.
ShowDrawingHandles
>ShowDrawingHandles
{}
This toggles the visibility of the drawing handles (if any) for the drawing.
Compatibility: Version 15 and later.
ShowGrid
>ShowGrid
{}
This toggles the Display Grid on or off.
Compatibility: All versions.
Example: Make sure the display grid is off.If (Sys(15)) Then
>ShowGrid{}
End If
ShowHide
>ShowHide
{}
This opens the View Options folder.
Compatibility: All versions.
ShowSymbolHandles
>ShowSymbolHandles
{}
This toggles the visibility of the symbol handles (if any) for all symbols and blocks in the drawing.
Compatibility: Version 15 and later.
ShowToolbox
>ShowToolbox
{<Toolboxname "name"
Displayed name of toolbox under View | Options<Visible v
[0 = show the toolbox, 1 = hide the toolbox]}
This shows or hides the named custom toolbox.
Compatibility: All versions.
Sketch
>Sketch
{}
This draws a line using the sketch tool.
Compatibility: All versions.
Slice
>Slice
{<SelectOnly s
[0 = False, 1 = True]<Type t
SelectScale
[0 = custom cutting plane, 1 = constant-X cutting plane, 2 = constant-Y cutting plane, 3 = constant-Z cutting plane]
<Points(custom): 1-3 = cutting plane, 4 (optional) = side to delete after the slice. If point 4 is omitted, both halves remain after the slice.<Points(constant X, Y, or Z): 1 = cutting plane, 2 (optional) = side to delete after the slice. If point 2 is omitted, both halves remain after the slice.
}
This slices away part of the drawing (or part of the selection) along a specific cutting plane.
Compatibility: All versions. The Type parameter is only available in Version 13 and later; previous versions always required 3 or 4 points.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 10, 10, 10
}>Slice{
<SelectedOnly 0' Slice along the plane X=5<Type 1' By only setting 1 point, we keep both sides' of the slice<Pointxyz 5, 5, 0
}
SliceBySurface
>SliceBySurface
{<Points: 1 = entity to be sliced, 2 = cutting surface (order of points can be reversed)
}
This slices an entity along a cutting surface. The cutting surface must extend beyond the edges of the entity to be sliced.
Compatibility: All versions.
Example:If (Sys(344)) Then
>2DMode
{}
End If
>Cylinder{
<Pointxyz 0, -10, 0<Pointxyz 5, -10, 0<Pointxyz 5, 10, 0
}
>Plane{
<Pointxyz -6.0, 0, -6.0<Pointxyz 6.0, 0, -6.0<Pointxyz 6.0, 0, 6.0<Pointxyz -6.0, 0, 6.0
}
>SliceBySurface{
<Pointxyz 5, -10, 0<Pointxyz 6.0, 0, 6.0
}
>PointSelect{
<Pointxyz 5, 10, 0}>SetHandle{
<Pointxyz 5, 10, 0}>Move{
<Pointxyz 5, 15, 0}
SmoothLine
>SmoothLine{}
This moves the selected lines by averaging points.
Compatibility: All versions.
SelectScale
SmoothLine2
>SmoothLine2{}
This moves the selected lines using slope detection.
Compatibility: All versions.
SmoothOff
>SmoothOff
{}
This turns facet smoothing OFF for smooth shading.
Compatibility: All versions.
SmoothOn
>SmoothOn
{}
This turns facet smoothing ON for smooth shading.
Compatibility: All versions.
SmoothSetting
>SmoothSetting
{}
This opens the dialog for setting line smoothing preferences. The smoothing settings can also be specified directly by setting Sys(1020), Sys(1021), Sys(1022) and Sys(1023).
Compatibility: Version 13 and later.
SnapGrid
>SnapGrid
{}
This toggles the snap grid on or off.
Compatibility: All versions.
Example:If Not(Sys(17) Then
>SnapGrid{}
End If
SnapPreviewMode
>SnapPreviewMode
{}
This toggles the snap preview cursor on or off.
Compatibility: All versions.
Example:>SnapPreviewMode{}
SnapSize
>SnapSize
{}
This opens the Grid Options dialog and is the same as GridOptions.
Compatibility: All versions.
SnapToolBox
>SnapToolbox
{}
This toggles the Snap Toolbox on or off.
SelectScale
Compatibility: All versions.
SolidAdd
>SolidAdd
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Points: 1, 2 = solids to be added}
This adds two solids together.
Compatibility: All versions.
Example:>Cone{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0<Pointxyz 5, 20, 0
}>Sphere{
<Pointxyz 0, 20, 0<pointxyz 0, 25, 0
}>SolidAdd{
<Pointxyz 5, 0, 0<pointxyz 0, 25, 0
}
SolidDefine
>SolidDefine
{}
This defines the selected entities as a solid.
Compatibility: All versions.
SolidExplode
>SolidExplode
{}
This explodes the selected solid(s).
Compatibility: All versions.
SolidIntersect
>SolidIntersect
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Points: 1, 2 = solids to be intersected}
This explodes a solid entity into grids and planes.
Compatibility: All versions.
Example:>Cone{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0<Pointxyz 5, 20, 0
}>Sphere{
<Pointxyz 0, 20, 0<pointxyz 0, 25, 0
}> SolidIntersect{
<Pointxyz 5, 0, 0<pointxyz 0, 25, 0
}
SolidSegregate
>SolidSegregate
{
SelectScale<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Points: 1, 2 = solids to be segregated}
This separates two overlapping solids into three sections – the non-overlapped part of solid 1, the non-overlapped part of solid 2 and the overlapping region of both.
Compatibility: All versions.
Example:>Cone{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0<Pointxyz 5, 20, 0
}>Sphere{
<Pointxyz 0, 20, 0<pointxyz 0, 25, 0
}>SolidSegregate{
<Pointxyz 5, 0, 0<Pointxyz 0, 25, 0
}
SolidSubtract
>SolidSubtract
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter."
<Points: 1 = solid to be removed, 2 = solid to be left behind}
This subtracts solid 1 from solid 2.
Compatibility: All versions.
Example:>Cone{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0
<Pointxyz 5, 20, 0}>Sphere{
<Pointxyz 0, 20, 0<Pointxyz 0, 25, 0
}>SolidSub{
<Pointxyz 5, 0, 0<Pointxyz 0, 25, 0
}
SolidXOr
>SolidXOr
{<Incomplete
If this parameter is included, the command will wait for the user to either (a) set enough points to complete the command or (b) end the command by pressing "Enter".
<Points: 1, 2 = solids to be exclusive-or'ed}
This removes the overlapping portion of two solids.
Compatibility: All versions.
Example:>Cone{
<Pointxyz 0, 0, 0<Pointxyz 5, 0, 0<Pointxyz 5, 20, 0
}>Sphere{
<Pointxyz 0, 20, 0<Pointxyz 0, 25, 0
}>SolidXOr{
<Pointxyz 5, 0, 0<Pointxyz 0, 25, 0
}
Sphere
>Sphere
SelectScale{
<Latitude laNumber of divisions from pole to pole
<Longitude loNumber of divisions around the equator
<Orientation o[0 = point 2 on vertex on equator, 1 = point 2 on midpoint on equator, 2 = point 2 on a pole]
<Points: 1 = center, 2 = radius}
This draws a sphere.
Compatibility: All versions.
Split
>Split
{<Center bcenter
[0 = segment not centered, 1 = deleted segment centered on first point]<Distance d
the length of the segment to be removed<Cap bopen
[0 = don't cap double lines at the split, 1 – cap double lines]<SelectOnly bselonly
[0 = allow non-selected lines to be split, 1 = only split selected lines]<Points: 1 = beginning or center of split, 2 = direction of split from first point (if not centered)
}
This creates a gap of a preset length in a line or double line.
Compatibility: Version 15 and later.
Split2
>Split2
{<Cap bopen
[0 = don't cap double lines at the split, 1 – cap double lines]<SelectOnly bselonly
[0 = allow non-selected lines to be split, 1 = only split selected lines]<Points: 1 = beginning of split, 2 = end of split
}
This creates a gap in a line, or double line, splitting the entity at the two points you set.
Compatibility: Version 15 and later.
StatusBar
>StatusBar
{}
This toggles the status bar on or off.
Compatibility: All versions.
Stretch
>Stretch
{<2Drange r
[0 = no, 1 = yes]<SelectOnly s
[0 = n0, 1 = yes]<Points: 1-2 = area/volume to stretch, 3 = start point, 4 = end point
}
This stretches one or more entities.
Compatibility: All versions.
Example:
>2DBox{
<Pointxyz -20, -20, 0<Pointxyz 20, 10, 0
}>PointSelect{
<Pointxyz -20, -20, 0}>Stretch{
<SelectOnly 1<2DRange 1<Pointxyz 15, -26, 0<Pointxyz 25, 15, 0<Pointxyz 20, 10, 0<Pointxyz 25, 10, 0
}
SelectScale
SurfaceArea
>SurfaceArea
{<Point on entity you wish to measure
}
This calculates the surface area of an entity; the result is stored in Sys(655).
Note: The SurfaceArea command only displays the information in a dialog. To store the area result in a variable, use the Area() function.
Compatibility: All versions.
Example: Draw a right triangular plane with a length of 10 and a height of 20; the surface area should be (10 x 20) / 2 = 100.
>Plane{
<Pointxyz 0, 0, 0<Pointxyz 0, 20, 0<Pointxyz 10, 0, 0
}>SurfaceArea{
<Pointxyz 0, 20, 0}
SurfaceConnect
>SurfaceConnect
{<NBreak b
number of breaks between connected lines<NSurf s
number of breaks along each selected line<Type t
[0 = line, 1 = curve, 2 = smooth]<UseOriginalPoints uo – not implemented yet
0 = no, 1 = yes – overrides the NSurf setting if yes<OriginalPointOrder po – not implemented yet
[0 = no, 1 = yes]<Points: 1-n = lines to connect
}
This connects two or more lines or curves with a surface grid.
Compatibility: All versions.
Example:>Curve{
<PointXYZ 0.0000, 0.0000, 0.0000<PointXYZ 14.0000, 4.0000, 0.0000<PointXYZ 28.0000, -2.0000, 0.0000<Type 0
}
>Curve{
<PointXYZ 0.0000, 0.0000, 40.0000<PointXYZ 14.0000, 7.0000, 40.0000<PointXYZ 28.0000, 0.0000, 40.0000<Type 0
}
>SurfaceConnect{
<PointXYZ 14.0000, 4.0000, 0.0000<PointXYZ 14.0000, 10.0000, 20.0000<PointXYZ 14.0000, 7.0000, 40.0000<Type 2<NSurf 20<NBreak 10
}
SurfaceIntersection
>SurfaceIntersection
{<Points: 1, 2 = intersecting surfaces
}
This draws a line along the intersection of two surfaces.
Compatibility: All versions.
Example:>Circle{
<Type 2<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 0 10
}
SelectScale>Ellipse{
<Type 2<Pointxyz 1, 1, 1<Pointxyz 1, 0, 10<Pointxyz 1, 10, 10
}>SurfaceIntersection{
<Pointxyz 10, 0, 0<Pointxyz 1, 10, 10
}
Sweep
>Sweep
{<Axis a
[0 = x, 1 = y, 2 = z, 3 = 2-point, 4 = line, 5 = plane]<Angle b
sweep angle<Ncopy nc
number of copies (NOT including the original)<Offset o
Distance of final copy from first copy along the sweep axis<point 1 = center of sweep
}
This creates a surface of rotation by sweeping a shape about an axis.
Compatibility: All versions.
Example: Draw a helix.>Circle{
<Type 2<Pointxyz 10, 0, 0<Pointxyz 10, 2, 0<Pointxyz 0, 0, 0
}
>PointSelect{
<Pointxyz 10, 2, 0}
>Sweep{
<Axis 1
<Angle 1800<Ncopy 60<Offset 30<Pointxyz 0, 0, 0
}
SymbolExplode
>SymbolExplode
{}
This explodes a symbol into its component pieces.
Compatibility: All versions.
SymbolLoad
>SymbolLoad{
<Filename "symbol.ext"symbol to be loaded
<Scale s[0 = changeable scale, 1 = original scale]
<Type t[0 = not selected after merge, 1 = selected after merge]
<Reference r[0 = embedded, 1 = loaded by reference]
<LoadAsBlock b (Version 13 and later)[0 = load as symbol, 1 = load as block]
<Points: 1,2,3 = handle placement}
This loads an external drawing as a symbol. To merge the contents of another drawing (as if you had activated the "explode symbol" option in the dialog) use Merge.
Note: As with the Merge command and other file-related commands, you can use an asterisk at the beginning of the filename as a shortcut reference tothe directory containing the DesignCAD program.
Compatibility: All versions; the LoadAsBlock parameter is only present in Version 13 and later.
Example:name$ = "*\symbol\window.dcd">SymbolLoad{
SelectScale<Layer 1<Filename [name$]<Pointxyz 10, 3, 25.25<Pointxyz 14, 3, 25.25<Scale 1
}
TangentBetween
>TangentBetween
{<Points: 1, 2 = circles tangent to the line
}
This draws a line tangent to two circles.
Compatibility: All versions.
Example:>Circle{
<Type 0<Pointxyz 12, 12, 0<Pointxyz 12, 15, 0
}>Circle{
<Pointxyz -15, -10, 0<Pointxyz -15, -5, 0
}>TangentBetween{
<Pointxyz 12, 15, 0<Pointxyz -15, -15, 0
}
TangentFrom
>TangentFrom
{<Points: 1 = starting point on circle, 2 = end of line
}
This draws a line from a tangent on a circle to a specific end point.
Compatibility: All versions.
Note: Point 2 is not the physical endpoint of the line; actually, the line goes from point 1 to an imaginary, perpendicular line which passes through point 2.
Example:>Circle{
<Type 0<Pointxyz 15, 10, 0<Pointxyz 12, 7, 0
}>TangentFrom{
<Pointxyz 12, 7<Pointxyz 5, 20, 0
}
TangentTo
>TangentTo
{<Points: 1 = beginning of line, 2 = circle
}
This draws a line from a specific starting location to a point tangent to a circle.
Compatibility: All versions.
Example:>Circle{
<Pointxyz 15, 5, 0<Pointxyz 15, 8, 0
}>TangentTo{
<Pointxyz 0, 0, 0<Pointxyz 15, 2, 0
}
Text
>Text
{<Style t
0 = normal, 1 = bold, 2 = italic, 3 = bold italic<Justification j
SelectScale
0 = left, 1 = center, 2 = right<Size s
text size<Angle a
the default text angle (if only one point is set)<Font font$
the full name of the Windows font, ex. "Times New Roman"<Text text$
the text contents<DrawAs2DText
If this parameter is present, draw 2-D text. If this parameter is omitted, draw 3-D text.<Type t
0 = normal text, 1 = vector text<Points: 1 = placement, 2 = angle and length, 3 = height and direction
}
This draws 2-D or 3-D text.
Note: This is a combined Text command, which can be used for drawing 2-D textor 3-D text. For backward compatibility with existing macros, the Text macro command will continue to draw 3-D text if the DrawAs2DText parameter is omitted and the Text2D macro command still works as always.
Compatibility: All versions.
Example:t$ = "What is this Text command, anyway?"Sys(33) = 0 'force TrueType text. 1 = vector text>Text{
<Style 2<Justification 1<Size 3<Font "Courier New"<Text [t$]<Angle 0<DrawAs2DText<Pointxyz 15, 0, 0<Pointxyz 25, 0, 0
}
Text2D
>Text2D
{<Style t
[0 = normal, 1 = bold, 2 = italic, 3 = bold italic]<Justification j
[0 = left, 1 = center, 2 = right]<Size s
text size<Angle a
default text angle (if only one point is set)<Font font$
the full name of the Windows font, ex. "Times New Roman"<Text text$
the text contents<Type t
0 = normal text, 1 = vector text<Points: 1 = placement, 2 = angle
}
This draws only 2-D text.
Compatibility: All versions.
Example:t$ = "Let's draw some 2-D text now."Sys(33) = 1 'use vector font>Text2D{
<Style 2<Justification 1<Size 3<Font "Simplex_Win"<Text [t$]<Angle 0<Pointxyz 15, 0, 0
}
Text3D
>Text3D
{<Style t
[0 = normal, 1 = bold, 2 = italic, 3 = bold italic]<Justification j
[0 = left, 1 = center, 2 = right]<Size s
text size<Angle a
default text angle (if only one point is set)<Font font$
the full name of the Windows font, ex. "Times New Roman"
SelectScale<Text text$
the text contents<Type t
0 = normal text, 1 = vector text<Points: 1 = placement, 2 = angle and length, 3 = height and direction
}
This draws only 3-D text.
Compatibility: All versions.
Example:Sys(33) = 0 ' use TrueType fontt$ = "What is this Text3D command, anyway?">Text3D{
<Style 2<Justification 1<Size 3<Font "Times New Roman"<Text [t$]<Angle 0<Pointxyz 15, 0, 0
}
TextArc
>TextArc
{<Style t
0 = normal, 1 = bold, 2 = italic, 3 = bold italic<Font font$
the full name of the Windows font, ex. "Times New Roman"<Text text$
the text contents<Scale q
the relative height of the text<Type t
0 = normal text, 1 = vector text<Points: 1 = start of arc, 2 = point on arc, 3 = end of arc
}
This draws a text arc.
Compatibility: All versions.
Example:>TextArc
{<Style 1<Font "Arial"<Text "So this is a text arc!"<Scale 1.5<Pointxyz 0, 0, 0<Pointxyz 20, 15, 0<Pointxyz 40, 0, 0
}
TextBlock
>TextBlock
{<Style t
0 = normal, 1 = bold, 2 = italic, 3 = bold italic<Justification j
0 = left, 1 = center, 2 = right<Angle a
the default text angle (if only one point is set)<Font font$
the full name of the Windows font, ex. "Times New Roman"<Size s
text size<Distance d
line spacing; distance between the bottom of one line and the top of the next, relative to the text size. So, for "double spaced" lines, use 1.0.
<TextBegininforms DesignCAD that the text block is defined in the macro, not by user input. Omit this if the user is to fill in the text himself.
<Text text$a complete line of text to include in the text block
<BlankLineUse this parameter to specify a blank line of text in the block.
}
This draws a block of text.
Compatibility: All versions.
Example:>TextBlock{
<Distance 0.5<TextBegin<Text "This is the first line."<BlankLine<Text "This should follow a blank line"
SelectScale<Text "and this should not."<BlankLine<BlankLine<Text "This is the last line."<Justification 1<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 0, -10, 0
}
TextOutlineFill
>TextOutlineFill
{}
This toggles between filled and unfilled text.
Compatibility: All versions.
TickMark
>TickMark
{<Segment s
number of divisions<Distance d
distance along divisions<Division div
number of small divisions for each large division<LargeMark lm
size of large tickmark<SmallMark sm
size of small tickmark<Type t
0 = set tickmarks by distance; 1 = divide line into Segment pieces<Points: 1 = line to be ticked, 2 = side for tickmarks
}
This draws tickmarks along a line.
Compatibility: All versions.
Example:>Line{
<Pointxyz 10, 10, 0
<Pointrel 25, 0, 0}>Line{
<Pointxyz 10, 20, 0<Pointrel 25, 0, 0
}>Tickmark{
<Type 0<Segment 10<Division 5<SmallMark 0.5<LargeMark 1<Pointxyz 10, 10, 0<Pointxyz 10, 11, 0
}>Tickmark{
<type 1<Distance 10<Division 5<Pointxyz 10, 20, 0<Pointxyz 10, 21, 0
}
TileH
>TileH
{}
This tiles the view windows horizontally.
Compatibility: All versions.
TileV
>TileV
{}
This tiles the view windows vertically.
Compatibility: All versions.
SelectScale
ToolBar
>Toolbar
{}
This toggles the toolbar on or off.
Compatibility: All versions.
Torus
>Torus
{<Orientation o
[0 = vertex, 1 = midpoint]<Latitude l
number of segments around the torus' outer perimeter (looking "down")<Latitude m
number of facets around the tube's inner cross-section (looking "through")<Points: 1 = central axis, 2 = central radius, 3 = radius of tube
}
This draws a torus (donut) shape.
Compatibility: All versions.
Example:>Torus{
<Pointxyz 25, 0, 0<Pointxyz 0, 0, 0<Pointxyz 0, 5, 0<Orientation 0<Longitude 8<Latitude 36<Color 128, 128, 152
}
Trim1
>Trim1
{<Type
[0 = keep selected part, 1 = trim shorter end]<Points: 1 = line to be trimmed, 2 = trim reference line
}
This trims one line to its intersection with another line.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 10, 35, 0<Pointxyz 0, 50, 0
}>Line{
<Pointxyz -3, -4, 0<Pointxyz 0, 18, 0<Pointxyz 30, 45, 0
}>Trim1{
<Pointxyz 2, 20, 0<Pointxyz 4, 15, 0<Type 0
}>Trim1{
<Linesnap 8, 29, 0<Linesnap 2, 20, 0<Type 1
}
Trim2
>Trim2
{<Type t
[0 = keep selected part, 1 = trim shorter end]<Points: 1, 2 = lines to be trimmed
}
This trims two lines to their point of intersection.
Compatibility: All versions.
Example:>Line{
SelectScale<Pointxyz 0, 0, 0<Pointxyz 10, 35, 0<Pointxyz 0, 50, 0
}
>Line{
<Pointxyz -3, -4, 0<Pointxyz 0, 18, 0<Pointxyz 30, 45, 0
}>Trim2{
<Pointxyz 2, 20, 0<Pointxyz 4, 15, 0<Type 0
}
Trim3
>Trim3{
<Points: 1 = line to be trimmed, 2, 3 = lines to trim between}
This trims one line between two other lines.
Compatibility: All versions.
Example:>Line{
<Pointxyz 0, 0, 0<Pointxyz 20, 0, 0
}>Line{
<Pointxyz 5, -2, 0<Pointxyz 5, 2, 0
}>Line{
<Pointxyz 13, -2, 0<Pointxyz 13, 2, 0
}>Trim3{
<Pointxyz 0, 0, 0<Pointxyz 5, 2, 0
<Pointxyz 13, -2, 0}
TrimDouble
>TrimDouble
{<SelectOnly s *New in Version 15[0 = no, 1 = yes (only selected entities will be trimmed)]<Points: 1 = corner of area to trim, 2 = other corner of area
}
This trims the intersection of two pairs of parallel lines. This command only works in 2-D Drafting Mode and all four lines must lie in the same plane.
Compatibility: All versions. The SelectOnly parameter is only in Version 15 and later.
Example:If Not(Sys(344)) Then
>2DMode{}End If
>Line{
<PointXYZ 0, 0, 0<PointXYZ 0, 28, 0
}>Parallel{
<PointXYZ 0, 28, 0<PointXYZ 2, 28, 0
}>Line{
<LineStyle 0, 2, 0<PointXYZ -11, 18, 0<PointXYZ 12, 18, 0
}>Line{
<PointXYZ 12, 16, 0<PointXYZ -11, 16, 0
}>TrimDouble{
<SelectOnly 0<PointXYZ -2 , 15, 0
SelectScale<PointXYZ 4 , 19, 0
}
TrimMultiLines
>TrimMultiLines
{<Points: 1 = first line to clip, 2 = next line to clip, ..., last = line to be trimmed against.
}
This trims a series of lines to their intersections with a reference line.
Compatibility: All versions.
Example:>Line{
<PointXYZ 0, 0, 0<PointXYZ 28, 0, 0
}>PointSelect{
<PointXYZ 0, 0, 0}}>Array{
<PointXYZ 0, 5, 0<NCopy 5, 0, 0
}>Line{
<PointXYZ 25, -5, 0<PointXYZ 25, 25, 0
}>TrimMultiLines{
<PointXYZ 0, 0, 0<PointXYZ 0, 5, 0<PointXYZ 0, 10, 0<PointXYZ 0, 15, 0<PointXYZ 0, 20, 0<PointXYZ 25, 25, 0
}
TruncatedCone
>TruncatedCone
{<Orientation o
[0 = vertex, 1 = midpoint]<NFace n<Points: 1 = center of base, 2 = base radius, 3 = height(and direction), 4 = top radius
}
This draws a truncated cone.
Compatibility: All versions.
Example:>TruncatedCone{
<Pointxyz 10, 0, 0<Pointxyz 0, 0, 0<Pointxyz 0, 20, 0<Pointxyz 5, 20, 0
}
Tube
>Tube{
<Orientation o[0 = vertex, 1 = midpoint]
<NFace n<Points: 1 = center, 2 = radius1, 3 = height(and direction), 4 = radius2
}
This draws a cylindrical shell.
Compatibility: All versions.
Example:>Tube{
<NFace 36<Orientation 1<Pointxyz 0, 0, 0<Pointxyz 10, 0, 0<Pointxyz 10, 30, 0<Pointxyz 11, 30, 0
}
SelectScale
Undo
>Undo
{}
Undo the result of the last command.
Compatibility: All versions.
Example:>Line{
<Pointxyz 25, 0, 0<Pointxyz 25, 10, 0<Pointxyz 30, 10, 0
}>FitToWindow{}Message "About to undo the line">Undo{}Message "About to redo the line">Redo{}
Units
>Units{
<Length lnew distance between the specified points
<Points: 1, 2 = distance to measure}
This defines the distance between any two points and rescales the entire drawing accordingly.
Special Note: The Units command cannot be "Undone" with the Undo command.Use it with extreme caution.NEVER set the Units value for a measurable distance to zero - this can destroy your data!Scale and ScaleOrtho are much better choices for almost every purpose.
Compatibility: All versions.
Example: Convert a drawing from feet to centimeters.'assumes one drawing unit is currently one foot.>Line{
<Pointxyz 10,10, 0<Pointxyz 20, 10, 0
}>Dimension{
<Format 0<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0<Pointxyz 20, 14, 0<Size 1
}>FitToWindow{}>Units{
' set two points 1 inch apart and set that ' distance to 2.54<Pointxyz 0, 0, 0<Pointxyz [1/12], 0, 0<Length 2.54
}
UnitsOfMeasurement
>UnitsOfMeasurement{
<CurrentDrawing u [0 = unitless, 1 = inches, 2 – feet, 3 = miles, 4 = mm, 5= cm, 6 = m, 7 = km (See also Sys(1100))] – sets the base units for the current drawing (no scaling is performed).
<NewDrawing v [0 = unitless, 1 = inches, etc. (See also Sys(1100))] – sets the default base units for any new drawings that are created.
<UnitlessDrawing w [0 = unitless, 1 = inches, etc. (See also Sys(1100))] – sets the base units to assume if merging or embedding a unitless symbol
<Incomplete [for display the dialog, must be the last statement]}
This sets the drawing units options.
Compatibility: Version 15 and later.
Example: This up the measurement units for the current drawing.
SelectScale>UnitsOfMeasurement{
<CurrentDrawing 1 'change current drawing unit to be inches<NewDrawing 1 ' set defaulut unit for new drawings to inches<UnitlessDrawing 2 ' assume merged unitless files are in feet
}
UnWorkplane
>UnWorkplane
{}
This restores the default working plane.
Compatibility: All versions.
Example: See Workplane.
UserDefinedViewsEditor
>UserDefinedViewsEditor
{}
This opens the editor for user-defined views.
Compatibility: Version 17 and later.
VectorConvert
>VectorConvert
{
}
This converts the currently selected entities to line entities.
Compatibility: All versions.
ViewChange
>ViewChange
{<Angle ax, ay, az
rotation angles about x, y and z<Type t
[0 = perspective, 1 = parallel]<PRP 0, 0, distance
distance from target<VRP vx, vy, vz
viewer reference point (camera location)<Zoomfactor f
}
This changes the current view angles and view distance.
Compatibility: All versions.
Example:>Box{
<Pointxyz -20, -20, -20<Pointxyz 20, 20, 20
}>ViewChange{
<Type 0<Angle 30, 30, 30<Zoomfactor 2.00<VRP 10, 10, 0<PRP 0, 0, 2000
}
ViewerLeft
>ViewerLeft
{}
This rotates the camera to the left.
Compatibility: All versions.
ViewerRight
>ViewerRight
{}
This rotates the camera to the right.
SelectScale
Compatibility: All versions.
ViewRead
>ViewRead
{<Filename "filename.dcv"
}
This loads a screen configuration (*.dcv) file.
Compatibility: All versions.
ViewRedo
>ViewRedo
{}
This reverts the view settings that were active before the last ZoomPrevious.
Compatibility: All versions.
ViewSave
>ViewSave
{<Filename "filename.dcv"
}
This saves a screen configuration file.
Compatibility: All versions.
ViewToolBox
>ViewToolBox
{}
This toggles the View toolbox on or off.
Compatibility: All versions.
Volume
>Volume
{<Point 1 = entity to measure
}
This calculates the volume and surface area of an entity. The Surface Area result is returned in Sys(655); the Volume result is returned in Sys(656).
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointrel 10, 10, 10
}>Volume{
<Pointxyz 0, 0, 0}
VPlane
>VPlane
{}
This draws a rectangular plane of specified width perpendicular to a given line and point; it is thesame as PerpendicularPlane.
Compatibility: All versions.
VrmlOut
>VrmlOut
{<Filename "file.wrl"
}
This exports the drawing in VRML format.
Compatibility: All versions.
SelectScale
Wall
>Wall
{<Thick t - wall thickness<Points: 1 = corner, 2 = opposite corner
}
This draws a rectangular section of wall.
Compatibility: All versions.
Example:>Wall{
<Thick 0.5<Pointxyz 0, 0, 0<Pointxyz 35, 10, 0
}
Weld
>Weld
{}
This welds the selected entities into a single group.
Compatibility: All versions.
Example:>Line{
<Pointxyz 10, 10, 0<Pointxyz 20, 10, 0<Pointxyz 20, 30, 0<Pointxyz 10, 30, 0<Pointxyz 10, 10, 0
}>Circle{
<Pointxyz 10, 10, 0<Pointxyz 2, 10, 0<Pointxyz 10, 15, 0
}>PointSelect{
<Pointxyz 10, 30, 0}>PointSelect{
<Type 1<Pointxyz 2, 10, 0
}>Weld{}
Window
>Window
{
<Type t[0 = Custom Width, 1 = 2 ft. 6 in. window, 3 = 3 ft. window, 4 = 4 ft. window]
<Center ca [0 = window not centered on point 1, 1 = window centered on point 1. Corresponds to the “CenterAlign” checkbox in the Door command dialog.]
<Size s – specifies the width of the window. Only affects Type 0.
<Text – specifies the text that is drawn with the window. This corresponds to the "Remark" field in the Window command dialog.
<Point1 = window center or leading edge of window(depends on the Center parameter)
<Point2 = window orientation – this point indicates the window direction.}
This draws a window (similar to Door).
Compatibility: All versions.
Example:>Line{
<Color 255,0,0<Layer 1<LineStyle 0, 2.0000, 0.0000<Width 0.5<Filled 0<Cap 3<AutoTrim 0<Alignment 1<PointXYZ 10, 10, 0<PointXYZ 10, 39.5, 0<PointXYZ 50, 39.5, 0
}
SelectScale>Window{
<PointXYZ 24.4, 39.0, 0<PointXYZ 30.4, 39.6, 0<Type 2<Center 1<Size 2.5<Text "2-6"
}
>Window{
<PointXYZ 9.0, 23.7, 0<PointXYZ 9.0, 30, 0<Type 4<Center 0<Size 3.0<Text "3-0"
}
WmfIn
>WmfIn
{<Filename "filename.wmf"
}
This imports a WMF file into the current drawing.
Compatibility: All versions.
Example:>WmfIn{
<Filename "*\test.wmf"<Layer 12
}
WmfOut
>WmfOut
{<Filename "filename.wmf"
}
This exports the current drawing in WMF format.
Compatibility: All versions.
Example:>Box{
<Pointxyz 0, 0, 0<Pointxyz 25, 12, 15
}>FitToWindow{}>WmfOut{
<Filename "*\test.wmf"}
Workplane>Workplane
{<Points: 1 = workplane origin,
2 = point on plane's positive x axis, 3 = point on plane's positive y axis
<Name workplanename$ – the name of this working plane<Text description$ – a text description of the working plane. You may embed"\r\n" in the string to wrap text to the next line in the dialog window.
}
This defines a custom working plane (a user’s custom coordinate system). As soon as the workplane is defined the coordinate system is transferred to the plane's coordinate system. The new coordinate system remains in effect until UnWorkplane is issued.
Compatibility: All versions. The Name and Text parameters only exist for Version 13 and later.
Example:>Box{
<Color 0, 0, 0<Pointxyz 0, 0, 0<Pointxyz 20, 20, 20
}>Slice{
<Pointxyz 10, 20, 0<Pointxyz 20, 20, 10<Pointxyz 20, 10, 0<Pointxyz 20, 20, 0
}>Workplane{
SelectScale<Pointxyz 10, 20, 0<Pointxyz 20, 20, 10<Pointxyz 5, 30, 5<Name "CornerUCS"<Text "UCS along sliced corner"
}>Line{
<Color 255, 0, 0<Pointxyz 5, 5, 0<Pointrel 10, 0, 0<Pointrel 0, 10, 0<Pointrel 0, 0, 10
}>Unworkplane{}>Line{
<Color 0, 0, 255<Pointxyz 5, 5, 0<Pointrel 10, 0, 0<Pointrel 0, 10, 0<Pointrel 0, 0, 10
}
XyzIn
>XyzIn
{<Type t
[1 = connect with line, 2 = connect with curve, 3 = mark points with a small cross, 4 = mark points with a small circle]
<Size sradius of circle or cross for type 3 or 4
<Filename "Filename.ext"}
Imports an XYZ coordinate file into the current drawing.
Compatibility: All versions.
Note: You can use an asterisk in front of the filename just as you can with DxfIn.
Example:>XyzIn{
<Color 64, 220, 128
<Layer 4<Type 3<Size 0.25<Filename "*\test.xyz"
}
Zoom
>Zoom
{<Zoomfactor zf
zoom factor<Point 1 = center of zoom
}
This zooms the active view in or out.
Compatibility: All versions.
Example:>Zoom{
<Zoomfactor 2.5<Pointxyz 5, 20, 12
}
ZoomIn
>ZoomIn
{<Point 1 = center of zoom
}
This zooms the active view in.
Compatibility: All versions.
ZoomOut
>ZoomOut
{<Point 1 = center of zoom
}
This zooms the active view out.
SelectScale
Compatibility: All versions.
ZoomPrevious
>ZoomPrevious
{}
This reverts the active view to the previous zoom setting.
Compatibility: All versions.
ZoomWindow
>ZoomWindow
{<Points: 1, 2 = opposite corners of zoom region
}
This zooms the active view to the region specified.
Compatibility: All versions.
Example:>ZoomWindow{
<Pointxyz 12, 12, 0<pointxyz 35, 25, 0
}
SelectScale
QUERY and CHANGE Parameters
Query and Change offer the ability to examine and change many kinds of information about an entity that has been selected with the Entity statement. Parameters are categorized by the type of entity they affect. Here is the current list of entity parameters that can be queried and/or changed. Default aliases for these parameters are declared in dcadalias.d3i.
Common Entity Parameters
The following parameters are common to most entities:ENT_TYPEENT_LAYERENT_LAYERNAMEENT_COLORENT_LINETYPEENT_LINETYPENAMEENT_LINETYPESCALEENT_LINEWIDTHENT_LINEFILLENT_LINEWEIGHTENT_FIXEDWIDTHENT_SELECTEDENT_NPTSENT_POINTENT_MINBOUNDENT_MAXBOUNDENT_MATERIALENT_MATERIALNAMEENT_NHANDLESENT_GROUPINDEXENT_SOLIDINDEXENT_COLORBYLAYERENT_LINESTYLEBYLAYER
Double Line Entity Parameters
DoubleLine entity type numbers are:92 – Double Line93 – Double Curve94 – Double Bezier
95 – Double Circle/Arc96 – Double Elliptical Arc97 – Double Ellipse
The following parameters are specific to double line entities:DL_TRIMDL_WIDTHDL_CAPSDL_FILLDL_ALIGNDL_HATCHDL_HATCHNAMEDL_HATCHSCALEDL_HATCHANGLE
Circle/Arc Entity Parameters
Circle/Arc entity type numbers are:16 – Circle/Circular Arc95 – Double Circle/Arc
The following parameters are specific to circles and arcs:CA_CENTERCA_RADIUSCA_STARTANGLECA_ENDANGLECA_SPANANGLECA_DIRECTIONCA_STARTPOINTCA_ENDPOINT
Ellipse/Elliptical Arc Entity Parameters
Ellipse/Elliptical Arc entity type numbers are:2 – Ellipse7 – Elliptical Arc96 – Double Elliptical Arc97 – Double Ellipse
The following parameters are specific to ellipses and elliptical arc:EA_CENTER EA_RADIUS1EA_RADIUS2
SelectScale
EA_STARTANGLEEA_ENDANGLEEA_SPANANGLEEA_STARTPOINTEA_ENDPOINTEA_AXIS1EA_AXIS2
Text Entity Parameters
Text entity type numbers are:3 – 3-D Text13 – 2-D Text15 – Attribute22 – Text Arc71 – Attribute Definition
The following parameters are specific to text entities:T_INSERTIONPOINTT_SIZET_JUSTIFICATIONT_BOLDT_ITALICT_ANGLET_FONTTYPET_2DTEXTT_TEXT
Attribute Definition Entity Parameters
Attribute Definition entity type numbers are (currently only the one):71 – Attribute Definition
The following parameters are specific to attribute definition entities:A_VISIBLEA_TAGA_PROMPTA_CONSTANTA_VALUE
Text Arc Entity Parameters
Text Arc entity type numbers are (currently only the one):22 – Text Arc
The following parameters are specific to text arc entities:TA_CENTERTA_RADIUSTA_STARTANGLETA_ENDANGLETA_SPANANGLETA_STARTPOINTTA_ENDPOINTTA_VSCALETA_DIRECTION
Hatch Entity Parameters
Hatch entity type numbers are (currently only the one):17 – Hatch
The following parameters are specific to hatch entities:H_PATTERNH_PATTERNNAMEH_SCALEH_ANGLEH_TYPE
Arrow Entity Parameters
Arrow entity type numbers are (currently only the one):25 – Arrow
The following parameters are specific to arrow entities:AW_TYPEAW_SCALEAW_SIZEAW_DOUBLE
SelectScale
Dimension Entity Parameters
Dimension entity type numbers are:74 – Angle Dimension75 – Linear Dimension76 – Diameter/Radius Dimension77 – Arc Dimension78 – Progressive Radial Dimension79 – Progressive Linear Dimension80 – Chamfer Dimension81 – Coordinate Dimension
The following parameters are specific to dimension entities:D_ARROWTYPED_ARROWSCALED_ARROWSIZED_TEXTSIZED_FONTTYPED_FONTD_PRECISIOND_FIXEDTEXTD_TRUNCATEZEROSD_TEXTBOLDD_TEXTITALICD_TEXTFORMATD_TEXTLOCATION
Construction Line Entity Parameters
Construction Line entity type numbers are (currently only the one):68 – Construction Line
The following parameters are specific to construction line entities:CL_RAYCL_INSERTIONPOINTCL_DIRECTION
Point Mark Entity Parameters
Point Mark entity type numbers are (currently only the one):70 – Point Mark
The following parameters are specific to point mark entities:
PM_TYPEPM_SIZEPM_CENTER
Bitmap Entity Parameters
Bitmap entity type numbers are (currently only the one):90 – Bitmap
The following parameters are specific to bitmap entities; they begin with BM_ and are in the &H0D00 range:BM_INSERTIONPOINTBM_NAMEBM_TYPEBM_WIDTHBM_HEIGHTBM_ANGLE
Symbol Entity Parameters
Symbol entity type numbers are:26 – Symbol (this type includes both blocks and symbols. Check the SY_TYPE parameter to
see which one it is.)The following parameters are specific to symbol entities; they begin with SY_ and are in the &H0E00 range.SY_INSERTIONPOINTSY_NAMESY_TYPESY_XSCALESY_YSCALESY_ZSCALESY_ATTDEFCOUNTSY_ATTDEFTAGSY_ATTDEFPROMPTSY_ATTDEFVALUESY_ATTDEFCONSTANTSY_ATTRIBUTECOUNTSY_ATTRIBUTE
SelectScale
ENT_TYPE Parameter
ENT_TYPEDeclaration: Alias ENT_TYPE &H0101 Arguments: One number (an integer), representing the entity type (e.g. 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 same result as
Sys(90).Query Usage:
Query Ent_Type, etypewhere etype is a numeric variable representing the entity's type.
Compatibility: Version 14 and later.Example:
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 Then Message "This is a circle or arc"Else Message "This is not a circle or arc."End IfEnd
ENT_LAYER Parameter
ENT_LAYERDeclaration: Alias ENT_LAYER &H0102 Arguments: One number (integer, [0, 1000]) representing the layer number.Accessibility: Query/ChangePurpose: This parameter allows you to determine and/or change the entity's layer
number. 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 (no parentheses).
Compatibility: Version 14 and later.Example:
Include "dcadalias.d3i"Entity 1Query Ent_Layer, elayerIf elayer > 100 and elayer < 199 Then
Change Ent_Layer, 199Update 'ALWAYS Update the entity when done with Change.
End IfEnd
ENT_LAYERNAME Parameter
ENT_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 variable
Change Usage:Change Ent_LayerName, elayname$where elayname$ can be a string variable or expression. If the specified layer name does not exist, the entity's layer will not be changed.
Compatibility: Version 14 and later.Example:
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
ENT_COLOR Parameter
ENT_COLORDeclaration: Alias ENT_COLOR &H0104
SelectScale
Arguments: 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. The
Query 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 variables
Change Usage:Change Ent_Color, redval, greenval, bluevalwhere redval, greenval,and blueval are numeric variables or expressions
Compatibility: Version 14 and later.Example:
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
ENT_LINETYPE Parameter
ENT_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 in DcLstyle.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 variable
Change UsageChange Ent_LineType, eltype
where eltype is a numeric variable or expressionCompatibility: Version 14 and later.Example:
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 Then
Change Ent_Linetype, 2Else
Change Ent_Linetype, 0End IfUpdate 'ALWAYS Update the entity when done with ChangeEnd
ENT_LINETYPENAME Parameter
ENT_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 by
name.Query Usage
Query Ent_LineTypeName, eltypename$where eltypename$ is a string variable
Change UsageChange Ent_LineTypeName, eltypename$where eltypename$ is a string variable or expression
Compatibility: Version 14 and later.Example:
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" Then
Change Ent_LinetypeName, "Solid"Else
Change Ent_LinetypeName, "Dashed"End IfUpdate 'ALWAYS Update the entity when done with Change
SelectScale
End
ENT_LINETYPESCALE Parameter
ENT_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 would see in the Info Box).Query Usage:
Query Ent_LineScale, eltypescalewhere eltypescale is a numeric variable
Change UsageChange Ent_LineScale, eltypescalewhere eltypescale is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_LINEWIDTH Parameter
ENT_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 would see in the Info Box).
Query Usage:Query Ent_LineWidth, elwidthwhere elwidth is a numeric variable
Change Usage:Change Ent_LineWidth, elwidthwhere elwidth is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_LINEFILL Parameter
ENT_LINEFILL
Declaration: Alias ENT_LINEFILL &H0109Arguments: One number (integer [0, 1]) indicating if the line is filled or not
Values: 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 variable
Change Usage:Change Ent_LineFill, elfilledwhere elfilled is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_LINEWEIGHT Parameter
ENT_LINEWEIGHTDeclaration: Alias ENT_LINEWEIGHT &H010AArguments: One number (floating-point) representing the fixed line width in hundredths
of a millimeterAccessibility: Query/ChangePurpose: This parameter allows you to read or set the entity's fixed line width (a fixed
line width remains constant regardless of zoom factor or print scale). The Query result 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 variable
Change UsageChange Ent_LineWeight, elweightwhere elweight is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_FIXEDWIDTH Parameter
ENT_FIXEDWIDTHDeclaration: Alias ENT_FIXEDWIDTH &H010BArguments: One number (integer [0, 1]) indicating if the entity uses a fixed weight or not.
Values: 0 = standard width, 1 = fixed width (doesn't scale when zooming/printing)Accessibility: Query/Change
SelectScale
Purpose: This parameter allows you to determine and change whether the entity uses a 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 variable
Change Usage:Change Ent_FixedWidth, elfixedwhere elfixed is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_SELECTED Parameter
ENT_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 is
selected or not. The Query result is the same as Sys(96).Query Usage:
Query Ent_Selected, eselectedwhere eselected is a numeric variable
Change Usage:Change Ent_Selected, eselectedwhere eselected is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_NPTS Parameter
ENT_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. The Query result is the same as Sys(99)Query Usage:
Query Ent_Npts, epointswhere epoints is a numeric variable
Compatibility: Version 14 and later.
ENT_POINT Parameter
ENT_POINTDeclaration: Alias ENT_POINT &H010EArguments: One number (integer) representing which point to examine and three
numbers (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 single
point in the entity. The results of a Query are the same as the results of a matching Pointval statement. After one or more points have edited using the Change statement, the entity should be updated using the Update statement. This will be especially important if you plan to examine the Ent_MinBound and Ent_MaxBound parameters (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 numeric variables.
Change Usage:Change Ent_Point, i, ptX, ptY, ptZwhere i, ptX, ptY and ptZ are all numeric variables or expressions.
Compatibility: Version 14 and later.
ENT_MINBOUND Parameter
ENT_MINBOUNDDeclaration: Alias ENT_MINBOUND &H010FArguments: Three numbers (floating-point) representing the minimum XYX coordinate
of the entity's bounding boxAccessibility: Query onlyPurpose: This parameter allows you to find out the minimum X, Y and Z values of the
entity's bounding box.Query Usage:
Query Ent_MinBound, minX, minY, minZwhere minX, minY and minZ are numeric variables.
Compatibility: Version 14 and later.
ENT_MAXBOUND Parameter
ENT_MAXBOUND
SelectScale
Declaration: Alias ENT_MAXBOUND &H0110Arguments: Three numbers (floating-point) representing the maximum XYX coordinate
of the entity's bounding boxAccessibility: Query onlyPurpose: This parameter allows you to find out the maximum X, Y and Z values of the
entity's bounding box.Query Usage:
Query Ent_MaxBound, maxX, maxY, maxZwhere maxX, maxY and maxZ are numeric variables.
Compatibility: Version 14 and later.
ENT_MATERIAL Parameter
ENT_MATERIALDeclaration: Alias ENT_MATERIAL &H0111Arguments: One number (integer) representing the material's index in the material tableAccessibility: 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 variable
Change Usage:Change Ent_Material, ematwhere emat is a numeric variable or expression
Compatibility: Version 14 and later.
ENT_MATERIALNAME Parameter
ENT_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 variable
Change Usage:Change Ent_MaterialName, ematname$where ematname$ is a string variable or expression
Compatibility: Version 14 and later.
ENT_NHANDLES Parameter
ENT_NHANDLESDeclaration: Alias ENT_NHANDLES &H0113Arguments: One number (integer) indicating how many "sticky" handles are associated
with the entity.Accessibility: Query/ChangePurpose: This parameter allows you to determine how many handles are set for the entity.Query Usage:
Query Ent_Nhandles, ehandleswhere ehandles is a numeric variable
Change Usage:Change Ent_Nhandles, ehandleswhere ehandles is a numeric expression or variable
Compatibility: Version 14 and later.
ENT_HANDLE Parameter
ENT_HANDLEDeclaration: Alias ENT_HANDLE &H0114Arguments: one number (integer) for the index of the handle of interest and three
numbers (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 specific
handle on the entity.Note: Modifying an entity's points with the Change command (such as moving a
circle's center) will not automatically move the handles to match; the handles must be explicitly updated using Change Ent_Handle.
Query Usage:Query Ent_Handle, hindex, hx, hy, hz
where hindex is a numeric variable or expression and hx, hy and hz are numeric variables.
Change Usage:Change Ent_Handle, hindex, hx, hy, hz
where hindex, hx, hy and hz are all numeric variables or expressions.Compatibility: Version 14 and later.
SelectScale
ENT_GROUPINDEX Parameter
ENT_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 variable
Change Usage:Change Ent_GroupIndex, egroupwhere egroup is a numeric expression or variable
Compatibility: Version 14 and later.
ENT_SOLIDINDEX Parameter
ENT_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 variable
Change Usage:Change Ent_SolidIndex, esolidwhere esolid is a numeric expression or variable
Compatibility: Version 14 and later.
ENT_COLORBYLAYER Parameter
ENT_COLORBYLAYERDeclaration: Alias ENT_COLORBYLAYER &H0117Arguments: One number (integer) to indicate if the entity takes the color of its host layerAccessibility: 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 0 indicates that the entity's color is independent of its host layer.
Query Usage:Query Ent_ColorByLayer, ecbylayerwhere ecbylayer is a numeric variable
Change Usage:Change Ent_ColorByLayer, ecbylayerwhere ecbylayer is a numeric expression or variable
Compatibility: Version 14 and later.
ENT_LINESTYLEBYLAYER Parameter
ENT_LINESTYLEBYLAYERDeclaration: Alias ENT_LINESTYLEBYLAYER &H0118Arguments: One number (integer) to indicate if the entity takes the linestyle of its host
layerAccessibility: Query/ChangePurpose: This parameter allows you to query or change the entity's linestyle
association. A value of 1 indicates that the entity's linestyle is set by its layer; a valueof 0 indicates that the entity's linestyle is independent of its host layer.
Query Usage:Query Ent_LineStyleByLayer, elsbylayerwhere elsbylayer is a numeric variable
Change Usage:Change Ent_LineStyleByLayer, elsbylayerwhere elsbylayer is a numeric expression or variable
Compatibility: Version 14 and later.
DL_TRIM Parameter
DL_TRIMDeclaration: Alias DL_TRIM &H0201Arguments: One number (integer [0, 1]) representing the doubleline entity's trim setting
Values: 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 1
SelectScale
Compatibility: Version 14 and later.
DL_WIDTH Parameter
DL_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 doubleline
entity.Query Usage:
Query DL_WIDTH, edlwidthwhere edlwidth is a numeric variable to hold the entity's current width
Change Usage:Change DL_WIDTH, edlwidthwhere edlwidth is a numeric variable or expression that specifies the desired newwidth.
Compatibility: Version 14 and later.
DL_CAPS Parameter
DL_CAPSDeclaration: Alias DL_CAPS &H0203Arguments: One number (integer [0, 3]) which represents the doubleline entity's cap
style.Values: 0 = no endcaps, 1 = cap starting end, 2 = cap trailing end, 3 = cap both ends
Accessibility: Query/ChangePurpose: To examine or change the endcap style of the doubleline entity.Query Usage:
Query DL_CAPS, edlcapstylewhere edlcapstyle is a numeric variable
Change Usage:Change DL_CAPS, edlcapstylewhere edlcapstyle is a numeric variable or expression that evaluates to 0, 1, 2, or3
Compatibility: Version 14 and later.
DL_FILL Parameter
DL_FILLDeclaration: Alias DL_FILL &H0204Arguments: One number (integer [0, 1]) which represents the doubleline entity's fill flag.
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 variable
Change Usage:Change DL_FILL, edlfillwhere edlfill is a numeric variable or expression that evaluates to 0 or 1
Compatibility: Version 14 and later.
DL_ALIGN Parameter
DL_ALIGNDeclaration: Alias DL_ALIGN &H0205Arguments: One numer (integer [0, 1, 2]) that represents the doubleline entity's alignment
Values: 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 variable
Change Usage:Change DL_ALIGN, edlalignwhere edlalign is a numeric variable or expression that evaluates to 1, 2, or 3
Compatibility: Version 14 and later.
DL_HATCH Parameter
DL_HATCHDeclaration: Alias DL_HATCH &H0206Arguments: One number (integer) that repesents the index of the fill pattern used by the
entity.
SelectScale
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the hatch pattern index used to
fill the double line entity.Query Usage:
Query DL_HATCH, edlhatchindexwhere edlhatchindex is a numeric variable
Change Usage:Change DL_HATCH, edlhatchindexwhere edlhatchindex is a numeric variable or expression
Compatibility: Version 14 and later.
DL_HATCHNAME Parameter
DL_HATCHNAMEDeclaration: Alias DL_HATCHNAME &H0207Arguments: One string that represents the name of the fill pattern used by the double-
line entity.Accessibility: Query/ChangePurpose: This parameter allows you to query or change the fill pattern name for the
doubleline entity.Query Usage:
Query DL_HATCHNAME, edlhatchname$where edlhatchname$ is a string variable
Change Usage:Change DL_HATCHNAME, edlhatchname$where edlhatchname$ is a string expression or variable.
Compatibility: Version 14 and later.
DL_HATCHSCALE Parameter
DL_HATCHSCALEDeclaration: Alias DL_HATCHSCALE &H0208Arguments: One number (floating-point) representing the hatch pattern scale used by
the entity's fill patternAccessibility: Query/ChangePurpose: This parameter allows you to query or change the scale used by the
doubleline entity's fill pattern.Query Usage:
Query DL_HATCHSCALE, edlhatchscalewhere edlhatchscale is a numeric variable
Change Usage:Change DL_HATCHSCALE, edlhatchscalewhere edlhatchscale is a numeric variable or expression
Compatibility: Version 14 and later.
DL_HATCHANGLE Parameter
DL_HATCHANGLEDeclaration: Alias DL_HATCHANGLE &H0209Arguments: One number (floating-point) representing the angle used by the entity's fill
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 variable
Change UsageChange DL_HATCHANGLE, edlhatchanglewhere edlhatchangle is a numeric variable or expression
Compatibility: Version 14 and later.
CA_CENTER Parameter
CA_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 span angle.
Query Usage:Query CA_CENTER, cx, cy, czwhere cx, cy and cz are all numeric variables
Query Usage:Change CA_CENTER, cx, cy, czwhere cx, cy and cz are all numeric variables or expressions
Compatibility: Version 14 and later.
SelectScale
CA_RADIUS Parameter
CA_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 ending angles, or the span angle.
Query Usage:Query CA_RADIUS, crwhere cr is a numeric variable
Query Usage:Change CA_Radius, crwhere cr is a numeric variable or expression
Compatibility: Version 14 and later.
CA_STARTANGLE Parameter
CA_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 the ending angle.
Query Usage:Query CA_StartAngle, csawhere csa is a numeric variable
Query Usage:Change CA_ StartAngle, crwhere csa is a numeric variable or expression
Compatibility: Version 14 and later.
CA_ENDANGLE Parameter
CA_ENDANGLEDeclaration: Alias CA_ENDANGLE &H0304Arguments: One floating-point number for the circle/arc's ending angle
Accessibility: Query onlyPurpose: This parameter allows you to query the circle's ending angle. The ending
angle cannot be modified directly, but it is automatically changed if you modify the start angle or the span angle.
Query Usage:Query CA_EndAngle, ceawhere cea is a numeric variable
Compatibility: Version 14 and later.
CA_SPANANGLE Parameter
CA_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 the ending angle. Setting the span angle to 0 is treated as setting the span angle to 360.If the absolute value of the span angle exceeds 360, the angle's size is reduced by 360 degree increments until it is less than 360. Negative span angles are allowed.
Query Usage:Query CA_SpanAngle, cspanwhere cspan is a numeric variable
Query Usage:Change CA_ SpanAngle, cspanwhere cspan is a numeric variable or expression
Compatibility: Version 14 and later.
CA_DIRECTION Parameter
CA_DIRECTIONDeclaration: Alias CA_DIRECTION &H0306Arguments: One number (integer [-1, 1]) for the arc's direction
Values: -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 variable
Compatibility: Version 14 and later.
SelectScale
CA_STARTPOINT Parameter
CA_STARTPOINTDeclaration: Alias CA_STARTPOINT &H0307Arguments: Three floating-point numbers for the coordinate of the starting point of the
arc or circle.Accessibility: Query onlyPurpose: This parameter allows you to determine the starting coordinate of the circle or
arc. The distance from the center to the starting point is the same as the circle's radius and the angle of the segment from the center to the starting point determines the arc's start angle.
Query Usage:Query CA_StartPoint, sx, sy, szwhere sx, sy and sz are numeric variables
Compatibility: Version 14 and later.
CA_ENDPOINT Parameter
CA_ENDPOINTDeclaration: Alias CA_ENDPOINT &H0308Arguments: Three floating-point numbers for the coordinate of the endpoint of the arc orcircle.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 guaranteed to be the same as the circle's radius; however, the angle of the line from the center to 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 later.
EA_CENTER Parameter
EA_CENTERDeclaration: Alias EA_CENTER &H0401Arguments: Three floating-point numbers for the coordinate of the ellipse's centerAccessibility: Query/Change
Purpose: This parameter allows you to query or change the center location of an ellipse or elliptical arc. Changing the center will move the entire ellipse - the span angle, start angle, end angle and radii remain the same.
Query Usage:Query EA_Center, cx, cy, czwhere cx, cy and cz are numeric variables
Change Usage:Change EA_Center, cx, cy, czwhere cx, cy and cz are numeric variables or expressions
Compatibility: Version 14 and later.
EA_RADIUS1 Parameter
EA_RADIUS1Declaration: Alias EA_RADIUS1 &H0402Arguments: One floating-point number representing the first radius of the ellipse or
elliptical arc (this is not necessarily the longest radius).Accessibility: Query/ChangePurpose: This parameter allows you to query and change the first radius of the elliptical
arc. Changes to the first radius will not change the second radius, but may affect the location of the starting and ending points of the ellipse or elliptical arc and the endpoint of the first axis.
Query Usage:Query EA_Radius1, r1where r1 is a numeric variable
Change Usage:Change EA_Radius1, r1where r1 is a numeric variable or expression
Compatibility: Version 14 and later.
EA_RADIUS2 Parameter
EA_RADIUS2Declaration: Alias EA_RADIUS2 &H0403Arguments: One floating-point number representing the second radius of the ellipse or
elliptical arc (this is not necessarily the longest radius).Accessibility: Query/ChangePurpose: This parameter allows you to query or change the second radius of the
elliptical arc. Changes to the second radius will not change the first radius, but may
SelectScale
change the location of the starting and ending points of an elliptical arc and the endpoint of the second axis.
Query Usage:Query EA_Radius2, r2where r2 is a numeric variable
Change Usage:Change EA_Radius2, r2where r2 is a numeric variable or expression
Compatibility: Version 14 and later.
EA_STARTANGLE Parameter
EA_STARTANGLEDeclaration: Alias EA_STARTANGLE &H0404Arguments: One floating-point number representing the starting angle of the ellipse or
elliptical arc, relative to the first axis.Accessibility: Query/ChangePurpose: This parameter allows you to query and change the starting angle of the
elliptical arc. Changing this value will shift the End Angle by an equal amount, but will not affect the Span Angle.
Query Usage:Query EA_StartAngle, estartwhere estart is a numeric variable
Change Usage:Change EA_StartAngle, estartwhere estart can be a numeric variable or expression
Compatibility: Version 14 and later.
EA_ENDANGLE Parameter
EA_ENDANGLEDeclaration: Alias EA_ENDANGLE &H0405Arguments: One floating-point number representing the ending angle of the ellipse or
elliptical 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 the Start Angle or Span Angle
Query Usage:Query EA_EndAngle, eend
where eend is a numeric variableCompatibility: Version 14 and later.
EA_SPANANGLE Parameter
EA_SPANANGLEDeclaration: Alias EA_SPANANGLE &H0406Arguments: One floating-point number representing the span angle of the ellipse or
elliptical 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 0 istreated as setting the span angle to 360. If the absolute value of the span angle exceeds 360, the angle's size is reduced by 360 degree increments until it is less than 360. Negative span angles are allowed.
Query Usage:Query EA_SpanAngle, espanwhere espan is a numeric variable
Change Usage:Change EA_SpanAngle, espanwhere espan can be a numeric variable or expression
Compatibility: Version 14 and later.
EA_STARTPOINT Parameter
EA_STARTPOINTDeclaration: Alias EA_STARTPOINT &H0407Arguments: Three floating-point numbers representing the coordinate of the beginning
of the elliptical arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of the elliptical
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 later.
SelectScale
EA_ENDPOINT Parameter
EA_ENDPOINTDeclaration: Alias EA_ENDPOINT &H0408Arguments: Three floating-point numbers representing the coordinate of the end of the
elliptical 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 elliptical arc's perimeter; however, the angle of the line from the center to the endpoint is the same 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 later.
EA_AXIS1 Parameter
EA_AXIS1Declaration: Alias EA_AXIS1 &H0409Arguments: Three floating-point numbers representing the coordinate of the end of the
first axis (not necessarily the longest axis).Accessibility: Query onlyPurpose: This parameter allows you to determine the endpoint of the first axis of the
elliptical arc (the axis from which the starting angle is measured). To change this value, 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 later.
EA_AXIS2 Parameter
EA_AXIS2Declaration: Alias EA_AXIS1 &H040AArguments: Three floating-point numbers representing the coordinate of the end of the
second axis (not necessarily the shortest axis).Accessibility: Query only
Purpose: This parameter allows you to determine the endpoint of the second axis of the elliptical arc. To change this value, you must change the second radius with EA_RADIUS2.
Query Usage:Query EA_Axis2, x2, y2, z2where x2, y2 and z2 are all numeric variables.
Compatibility: Version 14 and later.
T_INSERTIONPOINT Parameter
T_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 the
drawing. For 3-D Text, 2-D Text, Attributes, or an Attribute Definition, the insertion point will be the justification basepoint – i.e. lower left corner for left-justified, lower midpoint 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 later.
T_SIZE Parameter
T_SIZEDeclaration: Alias T_SIZE &H0502Arguments: One floating-point number representing the height of the text in drawing
units.Accessibility: Query/ChangePurpose: This parameter allows you to easily determine and change the text entity's text
size. When changing the text size, the text is re-scaled around the insertion point.Query Usage:
Query T_SIZE, tsizeWhere tsize is a numeric variable
Change Usage:
SelectScale
Change T_Size, tsizeWhere tsize can be a numeric variable or expression
Compatibility: Version 14 and later.
T_JUSTIFICATION Parameter
T_JUSTIFICATIONDeclaration: Alias T_JUSTIFICATION &H0503Arguments: One number (integer [0, 1, 2]) representing the text justification
Values: 0 = left justification, 1 = center justification, 2 = right justification.Accessibility: Query/ChangePurpose: This parameter allows you to determine and change the justification of a text
entity. When changing the justification, the text shifts position around the insertion point, which does not move.
Query Usage:Query T_Justification, tjustwhere tjust is a numeric variable
Change Usage:Change T_Justification, tjustwhere tjust can be a numeric variable or expression
Compatibility: Version 14 and later.
T_BOLD Parameter
T_BOLDDeclaration: Alias T_BOLD &H0504Arguments: One number (integer [0, 1]) representing whether the text is bold or normal.
Values: 0 = normal, 1 = boldAccessibility: Query/ChangePurpose: This parameter allows you to determine if a text entity is bold or not. (Bold only
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 later.
T_ITALIC Parameter
T_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 variable
Change Usage:Change T_Italic, titalwhere tital can be a numeric variable or expression
Compatibility: Version 14 and later.
T_ANGLE Parameter
T_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 text
entity. When you change the angle, the tilt is centered on the insertion point.Query Usage:
Query T_Angle, tanglewhere tangle is a numeric variable
Change Usage:Change T_Angle, tanglewhere tangle can be a numeric variable or expression.
Compatibility: Version 14 and later.
T_FONTTYPE Parameter
T_FONTTYPEDeclaration: Alias T_FONTTYPE &H0507Arguments: One number (integer [0, 1]) representing the type of font used for this text
entity.
SelectScale
Values: 0 = TrueType, 1 = VectorAccessibility: Query OnlyPurpose: This parameter allows you to determine the type of font used to display the
text.Query Usage:
Query T_FontType, tftypewhere tftype is a numeric variable
Compatibility: Version 14 and later.
T_FONT Parameter
T_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 the text.Query Usage:
Query T_Font, tfont$where tfont$ is a string variable
Change Usage:Change T_Font, tfont$where tfont$ can be a string variable or expression.
Compatibility: Version 14 and later.
T_2DTEXT Parameter
T_2DTEXTDeclaration: Alias T_2DTEXT &H0509Arguments: One number (integer [0, 1]) representing the entity's status as 2-D text.
Values: 0 = 3-D text, 1 = 2-D textAccessibility: Query onlyPurpose: This parameter allows you to query if the text entity is displayed in 2-D or 3-D
format.Query Usage:Query T_2DText, t2dmode
where t2dmode is a numeric variableCompatibility: Version 14 and later.
T_TEXT Parameter
T_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 using theT_Text parameter. You must use the A_Tag or A_Value parameter to change its textproperties.
Query Usage:Query T_Text, ttext$where ttext$ is a string variable
Change Usage:Change T_Text, ttext$where ttext$ can be a string variable or expression
Compatibility: Version 14 and later.
A_VISIBLE Parameter
A_VISIBLEDeclaration: Alias A_VISIBLE &H0601Arguments: one numeric value (integer [0,1]), indicating whether the attribute definition
is visible or not. This setting will only take effect when the attribute definition is part of 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 visibility setting.
Note that this parameter has the opposite sense of the "Invisible" checkbox in the Info Box. A value of 1 here (visible) would result in the Info Box "Invisible" box being unchecked.
Query Usage:Query A_VISIBLE, aviswhere avis is a numeric variable
Change Usage:Change A_VISIBLE, aviswhere avis is a numeric variable or expression
Compatibility: Version 14 and later.
SelectScale
A_TAG Parameter
A_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 variable
Change Usage:Change A_Tag, atag$where atag$ can be a string variable or expression
Compatibility: Version 14 and later.
A_PROMPT Parameter
A_PROMPTDeclaration: Alias A_PROMPT &H0603Arguments: A string representing the user prompt when a new block containing this
attribute definition is inserted into the drawing.Accessibility: Query/ChangePurpose: This parameter allows you to query and change the prompt string for an
attribute definition that is not part of a block.Note: If you try to change the prompt string on a constant attribute definition, the
change will have no effect on the attribute definition. In such a case, you must first remove the Constant parameter, update the entity and then change the prompt string as desired.
Query Usage:Query A_Prompt, aprompt$where aprompt$ is a string variable
Change Usage:Change A_Prompt, aprompt$where aprompt$ is a string variable or expression
Compatibility: Version 14 and later.
A_CONSTANT Parameter
A_CONSTANTDeclaration: Alias A_CONSTANT &H0604Arguments: One number (integer, [0, 1]) representing whether or not the attribute
definition's text contents are fixed.Values: 0 = changeable, 1 = constant
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the status of the text contents
of an attribute definition (one that is not part of a block).Query Usage:
Query A_Constant, aconstwhere aconst is a numeric variable
Change Usage:Change A_Constant, aconstwhere aconst can be a numeric variable or expression
Compatibility: Version 14 and later.
A_VALUE Parameter
A_VALUEDeclaration: Alias A_VALUE &H0605Arguments: One string representing the text contents of the attribute definition – this is
the 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 a stand-
alone attribute definition (one that is not part of a block).Query Usage:
Query A_Value, aval$where aval$ is a string variable
Change Usage:Change A_Value, aval$where aval$ can be a string variable or expression
Compatibility: Version 14 and later.
A_HORIZONTAL Parameter (new in version 15)
A_HORIZONTALDeclaration: Alias A_HORIZONTAL &H0606
SelectScale
Arguments: One integer indicating whether the attribute should always be displayed as horizontal text. If the value is set to one, the T_ANGLE parameter for the current entity will be set to zero.
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the text contents of a stand-
alone attribute definition (one that is not part of a block).Query Usage:
Query A_Value, aval$where aval$ is a string variable
Change Usage:Change A_Value, aval$where aval$ can be a string variable or expression
Compatibility: Version 15 and later.
TA_CENTER Parameter
TA_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 text arc.
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 variables
Change Usage:Change TA_Center, cx, cy, czwhere cx, cy and cz are numeric variables or expressions
Compatibility: Version 14 and later.
TA_RADIUS Parameter
TA_RADIUSDeclaration: Alias TA_RADIUS &H0702Arguments: One floating-point number for the radius of the text arc (the distance from
center 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 variable
Compatibility: Version 14 and later.
TA_STARTANGLE Parameter
TA_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 variable
Compatibility: Version 14 and later.
TA_ENDANGLE Parameter
TA_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 variable
Compatibility: Version 14 and later.
TA_SPANANGLE Parameter
TA_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 the
span angle of the text arc, you must increase or decrease the TA_ENDANGLE parameter.
Query Usage:Query TA_Radius, tspan
SelectScale
where tspan is a numeric variableCompatibility: Version 14 and later.
TA_STARTPOINT Parameter
TA_STARTPOINTDeclaration: Alias TA_STARTPOINT &H0706Arguments: Three floating-point numbers representing the coordinate of the beginning
of the text arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of the text arc.Query Usage:
Query TA_StartPoint, xs, ys, zswhere xs, ys and zs are all numeric variables.
Compatibility: Version 14 and later.
TA_ENDPOINT Parameter
TA_ENDPOINTDeclaration: Alias TA_ENDPOINT &H0707Arguments: Three floating-point numbers representing the coordinate of the end of the
text arc.Accessibility: Query onlyPurpose: This parameter allows you to determine the exact starting point of the text arc.
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 later.
TA_VSCALE Parameter
TA_VSCALEDeclaration: Alias TA_VSCALE &H0708Arguments: One floating-point number representing the vertical scale factor for the text.Accessibility: Query only (Query/Change Version 14.0.004+)Purpose: This parameter allows you to determine the relative height of the text in the
text 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 later.
TA_DIRECTION Parameter
TA_DIRECTIONDeclaration: Alias TA_DIRECTION &H0709Arguments: One number (integer [-1, 1]) representing the direction of the text along the
arc.Values: -1 = counterclockwise, 1 = clockwise
Accessibility: 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 counterclockwise text is on the inside of the arc.
Query Usage:Query TA_Direction, tadirwhere tadir is a numeric variable.
Compatibility: Version 14 and later.
H_PATTERN Parameter
H_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 a
hatch 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 later.
SelectScale
H_PATTERNNAME Parameter
H_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 pattern by
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 later.
H_SCALE Parameter
H_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 later.
H_ANGLE Parameter
H_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 hatch
pattern 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 later.
H_TYPE Parameter
H_TYPEDeclaration: Alias H_TYPE &H0805Arguments: An numeric value (integer [0,1]) indicating whether the hatch pattern is a
vector 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 pattern is
a vector pattern or a raster pattern. Raster patterns cannot be scaled.Query Usage:
Query H_Type, htypewhere htype is a numeric variable
Compatibility: Version 14 and later.
AW_TYPE Parameter
AW_TYPEDeclaration: Alias AW_TYPE &H0901Arguments: A numeric value (integer [0-13]) indicating the arrowhead type (see Arrow for the types).Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change an arrow
entity'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 later.
SelectScale
AW_SCALE Parameter
AW_SCALEDeclaration: Alias AW_SCALE &H0902Arguments: One floating-point value representing the arrowhead scale relative to
current text size.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine or change how large the
arrowhead is relative to the current text size. This parameter mirrors the value shown 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 later.Example:
Include "Dcadalias.d3i"
If Sys(80) < 1 Then End
GetSelect 1, jEntity j
Query ENT_Type etypeIf etype <> 24 Then Message "Select an arrow first!" EndEnd If
Query AW_Type, atypeQuery AW_Scale, ascaleQuery AW_Size, asizeQuery AW_Double, adouble
fmt$ = "Type: %d Scale: %0.3f Size: %0.3f Double: %d"Format msg$, fmt$, atype, ascale, asize, adoubleMessage msg$
Change AW_Scale, ascale*0.75UpdateRegenEnd
AW_SIZE Parameter
AW_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 later.
AW_DOUBLE Parameter
AW_DOUBLEDeclaration: Alias AW_DOUBLE &H0904Arguments: One numeric value (integer [0, 1]) indicating whether the arrow is double-
headed or not.Values: 0 = single-headed, 1 = double-headed
Accessibility: Query/ChangePurpose: This parameter can be used to determine or change whether the arrow has
one 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.
D_ARROWTYPE Parameter
D_ARROWTYPEDeclaration: Alias D_ARROWTYPE &H0A01 Arguments: A numeric value (integer [0 - 13]) indicating the dimension arrowhead type
(see Arrow for the types).Accessibility: Query/Change
SelectScale
Purpose: This parameter allows the programmer to determine or change a dimension entity'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 later.
D_ARROWSCALE Parameter
D_ARROWSCALEDeclaration: Alias D_ARROWSCALE &H0A02Arguments: One floating-point value representing the dimension's arrowhead scale
relative to the dimension text size.Accessibility: Query/ChangePurpose: This parameter is used to determine how large the arrowhead is relative to the
dimension text size. This parameter mirrors the value shown in the "Arrow Size" fieldin 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 later.
D_ARROWSIZE Parameter
D_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 the dimension
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 later.
D_TEXTSIZE Parameter
D_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 of the
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 later.
D_FONTTYPE Parameter
D_FONTTYPEDeclaration: Alias D_FONTTYPE &H0A05Arguments: One number (integer [0, 1]) representing the type of font used for this
dimension entity.Values: 0 = TrueType, 1 = Vector
Accessibility: Query OnlyPurpose: This parameter allows you to query the type of font used to display the
dimension.Query Usage:
Query D_FontType, ftypewhere ftype is a numeric variable.
Compatibility: Version 14 and later.
D_FONT Parameter
D_FONTDeclaration: Alias D_FONT &H0A06
SelectScale
Arguments: 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 the dimension. Changing the font name may also change the D_FontType parameter, if for example you switch from a TrueType font to a vector font. To specify a vector font, be sure to use the font's filename (i.e. use "Simplex2_Win.vfn", not "Simplex 2 for Windows").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 later.
D_PRECISION Parameter
D_PRECISIONDeclaration: Alias D_PRECISION &H0A07Arguments: A number (integer [-7 to 15]) representing the number of digits to be
displayed to the right of the decimal. Negative values round to increasing powers of 10 – for example -3 would round the value off to the nearest thousand. In the case offractional formats, the number represents the smallest fractional power of two that will be measured – for example, 4 will round fractions to the nearest 16th, 5 to the nearest 32nd, etc.
Accessibility: Query/ChangePurpose: This parameter allows you to determine, or specify, how precisely a dimension
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 later.
D_FIXEDTEXT Parameter
D_FIXEDTEXTDeclaration: Alias D_FIXEDTEXT &H0A09
Arguments: A number (integer [0, 1]) indicating whether the dimension displays a fixed string 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 string of
text instead of the actual measured value.Query Usage:
Query D_FixedText, dfixedwhere dfixed is a numeric variable
Compatibility: Version 14 and later.
D_TRUNCATEZEROS Parameter
D_TRUNCATEZEROSDeclaration: Alias D_TRUNCATEZEROS &H0A0AArguments: A number (integer [0, 1]) indicating whether the dimension truncates trailing
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 dimension
displays trailing zeros or not.Query Usage:
Query D_TruncateZeros, dtruncwhere dtrunc is a numeric variable
Change Usage:Change D_TruncateZeros, dtruncwhere dtrunc is a numeric variable or expression
Compatibility: Version 14 and later.
D_TEXTBOLD Parameter
D_TEXTBOLDDeclaration: Alias D_TEXTBOLD &H0A0BArguments: A number (integer [0, 1]) indicating whether the dimension text is normal or
bold.Values: 0 = normal, 1 = bold
Accessibility: Query/ChangePurpose: This parameter allows you to determine or specifiy whether a dimension
displays its text in bold style.Query Usage:
SelectScale
Query D_TextBold, dboldwhere dbold is a numeric variable
Change Usage:Change D_ TextBold, dboldwhere dbold is a numeric variable or expression
Compatibility: Version 14 and later.
D_TEXTITALIC Parameter
D_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 dimension
displays its text in italic style.Query Usage:
Query D_TextItalic, ditalwhere dital is a numeric variable
Change Usage:Change D_ TextItalic, ditalwhere dital is a numeric variable or expression
Compatibility: Version 14 and later.
D_TEXTFORMAT Parameter
D_TEXTFORMATDeclaration: Alias D_TEXTFORMAT &H0A13Arguments: One number (integer [0, 1, 2, 3]) representing the numeric format of the
displayed text.Values: 0 = decimal, 1 = fractional, 2 = feet and decimal inches, 3 = feet and fractional inches.
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the format used to display the
dimension text.Query Usage:
Query D_TextFormat, tformatwhere tformat is a numeric variable.
Change Usage:Change D_TextFormat, tformat
where tformat is a numeric variable or expression.Compatibility: Version 14 and later.
D_TEXTLOCATION Parameter
D_TEXTLOCATIONDeclaration: Alias D_TEXTLOCATION &H0A14Arguments: One number (integer [0 - 8]) representing the location of the displayed text
relative to the arrows.Values: 0 = centered, 1 = above, 2 = below, 3 = right, 4 = upper right, 5 = lower right, 6 = left, 7 = upper left, 8 = lower left.
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the position of the dimension
text.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 later.
CL_RAY Parameter
CL_RAYDeclaration: Alias CL_RAY &H0B01Arguments: A number (integer [0, 1]) indicating whether the construction line extends in
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 construction line
extends in one direction or in both.Query Usage:
Query CL_RAY, cdirwhere cdir is a numeric variable
Change Usage:Change CL_RAY, cdirwhere cdir is a numeric variable or expression
Compatibility: Version 14 and later.
SelectScale
CL_INSERTIONPOINT Parameter
CL_INSERTIONPOINTDeclaration: Alias CL_INSERTIONPOINT &H0B02Arguments: Three floating-point numbers for the coordinate of the construction line's
insertion pointAccessibility: Query/ChangePurpose: This parameter allows you to query or change the starting location of a
construction 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 variables
Change Usage:Change CL_InsertionPoint, cx, cy, czwhere cx, cy and cz are numeric variables or expressions
Compatibility: Version 14 and later.
CL_DIRECTION Parameter
CL_DIRECTIONDeclaration: Alias CL_DIRECTION &H0B03Arguments: Three floating-point numbers for the direction of the construction line
relative to the insertion point. The values of the arguments are relative offsets from the insertion point.
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the direction of a construction
line.Query Usage:
Query CL_Direction, dx, dy, dzwhere dx, dy and dz are numeric variables
Change Usage:Change CL_InsertionPoint, dx, dy, dzwhere dx, dy and dz are numeric variables or expressions
Compatibility: Version 14 and later.
PM_TYPE Parameter
PM_TYPEDeclaration: Alias PM_TYPE &H0C01Arguments: A number (integer [0, 1, 2, 3, 4]) representing the format of the pointmark
entity.Values: 0 = cross, 1 = cross+circle, 2 = cross+square, 3 = cross+square+circle, 4 = filled dot
Accessibility: Query/ChangePurpose: This parameter allows you to query or change the shape of a pointmark entity.Query Usage:
Query PM_Type, pmtypewhere pmtype is a numeric variable
Change Usage:Change PM_Type, pmtypewhere pmtype is a numeric variable or expression
Compatibility: Version 14 and later.
PM_SIZE Parameter
PM_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's size.Query Usage:
Query PM_Size, pmsizewhere pmsize is a numeric variable
Change Usage:Change PM_Size, pmsizewhere pmsize is a numeric variable or expression
Compatibility: Version 14 and later.
PM_CENTER Parameter
PM_CENTERDeclaration: Alias PM_CENTER &H0C03Arguments: Three floating point numbers for the x, y and z components of the
pointmark's center location.
SelectScale
Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine and/or change the center
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 later.Example:
' 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, pmz
fmt$ = "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, pmzUpdateRegen
Query PM_Type, pmtypeQuery PM_Size, pmsizeQuery PM_Center, pmx, pmy, pmz
fmt$ = "Type: %d size: %f Center: %f, %f, %f"Format msg$, fmt$, pmtype, pmsize, pmx, pmy, pmzMessage msg$
End
BM_INSERTIONPOINT Parameter
BM_INSERTIONPOINTDeclaration: Alias BM_INSERTIONPOINT &H0D01Arguments: Three floating-point numbers for the x, y and z component of the lower left
corner of the bitmap.
Accessibility: Query/ChangePurpose: Ths parameter allows the programmer to locate or move the insertion point of
the 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 later.
BM_NAME Parameter
BM_NAMEDeclaration: Alias BM_NAME &H0D02Arguments: A string containing the original filename of the inserted image (path not included).Accessibility: Query OnlyPurpose: This paramer retrieves the original filename used as a source for the bitmap entity.Query Usage:
Query BM_Name, bmname$where bmname$ is a string variable.
Compatibility: Version 14 and later.
BM_TYPE Parameter
BM_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 is embedded
into the drawing file or if it is an external reference. External references must be sentalong with the drawing file if the drawing is to be shared with other users.
Query Usage:Query BM_Type, bmtypewhere bmtype is a numeric variable
Compatibility: Version 14 and later.
SelectScale
BM_WIDTH Parameter
BM_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 variable
Compatibility: Version 14 and later.
BM_HEIGHT Parameter
BM_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 variable
Compatibility: Version 14 and later.
BM_ANGLE Parameter
BM_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 rotation anglein the viewing plane.Query Usage:
Query BM_Angle, bmanglewhere bmangle is a numeric variable
Compatibility: Version 14 and later.Example:
' assumes a bitmap has already been loaded and selectedInclude "*\dcadalias.d3i"GetSelect 1, i
Entity iQuery BM_Name, bmname$Query BM_InsertionPoint, bmx, bmy, bmzQuery BM_Type, bmtypeQuery BM_Width, bmwidthQuery BM_Height, bmheightQuery BM_Angle, bmangle
fmt$ = "Name: %s; Type: %d; Width: %f; height: %f; angle: %f"Format msg$, fmt$, bmname$, bmtype, bmwidth, bmheight, bmangleMessage msg$End
SY_INSERTIONPOINT Parameter
SY_INSERTIONPOINTDeclaration: Alias SY_INSERTIONPOINT &H0E01Arguments: Three floating-point numbers for the x, y and z component of the lower left
corner of the bitmap.Accessibility: Query/ChangePurpose: Ths parameter allows the programmer to locate or move the insertion point of
the 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 later.
SY_NAME Parameter
SY_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 symbol or block entity.Query Usage:
Query SY_Name, sname$where sname$ is a string variable.
Compatibility: Version 14 and later.
SelectScale
SY_TYPE Parameter
SY_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 an
embedded symbol, a reference to an external symbol, or a block. External references must be sent along with the drawing file if the drawing is to be shared with other users.
Query Usage:Query BM_Type, stypewhere stype is a numeric variable
Compatibility: Version 14 and later.
SY_XSCALE Parameter
SY_XSCALEDeclaration: Alias SY_XSCALE &H0E04Arguments: A floating-point number representing the symbol's scale factor (or the
block's scale factor along its x axis).Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the scale factor of the
symbol (or x-scale factor of the block). Only blocks can be scaled independently along x, y and z. Symbols are scaled globally along all three axes.
Query Usage:Query SY_XScale, scalexwhere scalex is a numeric variable
Change Usage:Change SY_XScale, scalexwhere scalex is a numeric variable or expression.
Compatibility: Version 14 and later.
SY_YSCALE Parameter
SY_YSCALEDeclaration: Alias SY_YSCALE &H0E05
Arguments: A floating-point number representing the block's scale factor along its y axis.
Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the y-scale factor of the
block. Only blocks can be scaled independently along x, y and z. Symbols are scaled globally along all three axes and only use the SY_XScale parameter.
Query Usage:Query SY_YScale, scaleywhere scaley is a numeric variable
Change Usage:Change SY_YScale, scaleywhere scaley is a numeric variable or expression.
Compatibility: Version 14 and later.
SY_ZSCALE Parameter
SY_ZSCALEDeclaration: Alias SY_ZSCALE &H0E06Arguments: A floating-point number representing the block's scale factor along its z
axis.Accessibility: Query/ChangePurpose: This parameter allows the programmer to determine the z-scale factor of the
block. Only blocks can be scaled independently along x, y and z. Symbols are scaled globally along all three axes and only use the SY_XScale parameter.
Query Usage:Query SY_ZScale, scalezwhere scalez is a numeric variable
Change Usage:Change SY_ZScale, scalezwhere scalez is a numeric variable or expression.
Compatibility: Version 14 and later.
SY_ATTDEFCOUNT Parameter
SY_ATTDEFCOUNTDeclaration: Alias SY_ATTDEFCOUNT &H0E07Arguments: An integer representing the number of Attribute Definition entities that are
contained inside the current block entity.Accessibility: Query only
SelectScale
Purpose: This parameter allows the programmer to determine how many Attribute Definition entities are inside the block. Using the parameters listed below, it is possible to iterate through all attribute definitions in a block and retrieve all the attribute definition data.
Query Usage:Query SY_AttDefCount, adcountwhere adcount is a numeric variable
Compatibility: Version 14 and later.
SY_ATTDEFTAG Parameter
SY_ATTDEFTAGDeclaration: Alias SY_ATTDEFTAG &H0E08Arguments: An integer for the index of the desired Attribute Definition in this block and a
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 a specific
Attribute Definition in a block.Query Usage:
Query SY_AttDefTag, adindex, adtag$where adindex is a numeric variable and adtag$ is a string variable
Compatibility: Version 14 and later.
SY_ATTDEFPROMPT Parameter
SY_ATTDEFPROMPTDeclaration: Alias SY_ATTDEFPROMPT &H0E09Arguments: An integer for the index of the desired Attribute Definition in this block and a
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 a
specific Attribute Definition in a block.Query Usage:
Query SY_AttDefPrompt, adindex, adprompt$where adindex is a numeric variable and adprompt$ is a string variable
Compatibility: Version 14 and later.
SY_ATTDEFVALUE Parameter
SY_ATTDEFVALUEDeclaration: Alias SY_ATTDEFVALUE &H0E0AArguments: An integer for the index of the desired Attribute Definition in this block and a
string to hold the Value string of the indexed Attribute Definition.Accessibility: Query/ChangePurpose: This parameter allows the programmer to extract the Value text contents from
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 variable
Change Usage:Change SY_AttDefValue, adindex, advalue$where adindex is a numeric variable or expression and advalue$ is a string variable or expression
Compatibility: Version 14 and later.
SY_ATTDEFCONSTANT Parameter
SY_ATTDEFCONSTANTDeclaration: Alias SY_ATTDEFCONSTANT &H0E0BArguments: Two integers. The first is the index of the desired Attribute Definition in the block and the second (integer [0, 1]) indicates whether the Attribute Definition has a constant or changeable Value string.
Values: 0 = changeable, 1 = constantAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine whether the Value string
of the specified Attribute Definition can be changed..Query Usage:
Query SY_AttDefConstant, adconstwhere adconst is a numeric variable
Compatibility: Version 14 and later.
SY_ATTRIBUTECOUNT Parameter
SY_ATTRIBUTECOUNTDeclaration: Alias SY_ATTRIBUTECOUNT &H0E0C
SelectScale
Arguments: An integer representing the number of Attribute entities that are contained inside the current block entity.
Accessibility: Query onlyPurpose: This parameter allows the programmer to determine how many Attribute
entities are inside the block. Using the parameter listed below, it is possible to iteratethrough all attribute entities in a block and retrieve all the attribute data.
Query Usage:Query SY_AttributeCount, atcountwhere atcount is a numeric variable
Compatibility: Version 14 and later.
SY_ATTRIBUTE Parameter
SY_ATTRIBUTEDeclaration: Alias SY_ATTRIBUTE &H0E0DArguments: An integer for the index of the desired Attribute entity in this block or symbol
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 a
specific Attribute in a block.Query Usage:
Query SY_Attribute, atindex, attext$where atindex is a numeric variable and attext$ is a string variable
Compatibility: Version 14 and later.
SY_ATTDEFVISIBLE Parameter
SY_ATTDEFVISIBLEDeclaration: Alias SY_ATTDEFVISIBLE &H0E0EArguments: Two integers. The first is the index of the desired Attribute Definition in the block and the second (integer [0, 1]) indicates whether the Attribute Definition value text is hidden or visible.
Values: 0 = hidden, 1 = visibleAccessibility: Query OnlyPurpose: This parameter allows the programmer to determine whether the Value string
of the specified Attribute Definition is visible or hidden.Query Usage:
Query SY_AttDefVisible, adviswhere advis is a numeric variable
Compatibility: Version 14 and later.
Top Related