Help
How to use formulas and logic in authored blocks.
Exact syntax, commands, fields, and configuration options for LogiDraft.
Jump to: Functions, Injection, Directives, Commands, Primitives, Block References, Artifacts, Constraints
* / %+ -== === != !== > >= < <=&& || !condition ? a : b[1,2,3]TRUE, FALSE, true, false are supported.ABSABS(number)ABS(-5)ACOSACOS(number)ACOS(0.5)ASINASIN(number)ASIN(0.5)ATANATAN(number)ATAN(1)CEILINGCEILING(number, significance, [mode])CEILING(12.2, 5)COSCOS(angle)COS(RADIANS(60))DEGREESDEGREES(radians)DEGREES(PI()/2)FLOORFLOOR(number, significance)FLOOR(12.9, 5)HYPOTHYPOT(x, y, ...)HYPOT(Width, Height)LNLN(number)LN(10)LOGLOG(number, base)LOG(1000, 10)MAXMAX(value1, value2, ...)MAX(Width, Height)MINMIN(value1, value2, ...)MIN(Width, Height)MODMOD(dividend, divisor)MOD(Index, 2)PIPI()PI()POWPOW(base, exponent)POW(2, 3)RADIANSRADIANS(degrees)RADIANS(45)ROUNDROUND(number, [digits])ROUND(Length / 25.4, 2)SINSIN(angle)SIN(RADIANS(30))SQRTSQRT(number)SQRT(Area)TANTAN(angle)TAN(RADIANS(45))EXPEXP(number)EXP(1)SIGNSIGN(number)SIGN(Offset)IFIF(test, value_if_true, value_if_false)IF(Motor_Qty == 2, 250, 150)ANDAND(a, b, ...)AND(Width > 0, Height > 0)OROR(a, b, ...)OR(State == "A", State == "B")NOTNOT(value)NOT(IsHidden)SWITCHSWITCH(expression, value1, result1, [value2, result2, ...], [default])SWITCH(Size, "S", 100, "M", 150, "L", 200, 0)SUMSUM(a, b, ...) | SUM([a, b, ...])SUM(Width, Height, Depth)AVERAGEAVERAGE(a, b, ...)AVERAGE(A, B, C)COUNTCOUNT(a, b, ...)COUNT(A, B, C)SUMIFSUMIF(range, criteria, [sum_range])SUMIF([1,2,3], ">1")COUNTIFCOUNTIF(range, criteria)COUNTIF([1,2,3], ">1")CONCATENATECONCATENATE(text1, text2, ...)CONCATENATE("P-", PartNo)LENLEN(text)LEN(Label)LOWERLOWER(text)LOWER(Code)REPLACEREPLACE(text, find_text, new_text) | REPLACE(old_text, start_num, num_chars, new_text)REPLACE("MTR-100", "100", "125")UPPERUPPER(text)UPPER(Tag)LUT_EXACTLUT_EXACT(tableName, outColumn, keyColumn, keyValue, ...)LUT_EXACT("Sizes", "Width", "Code", "A")LUT_RANGELUT_RANGE(tableName, outColumn, keyColumn, keyValue, mode)LUT_RANGE("Sizes", "Width", "Length", Length, "floor")Learn more
Used in block fields
Syntax
{Name}{Width}text with {Name}Panel {PanelCode} - {Voltage}=expression=IF({Motor_Qty} === 2, 250, 150)Rules
{Name} resolves params first, then vars.{Width}.{{...}} is not supported.1/0; parameters require true/false.params object is not edited as a whole.Injectable Fields
line.length, circle.radius, circle.rotation, arc.radius, arc.startAngle, arc.endAngle, ellipse.radiusX, ellipse.radiusY, ellipse.rotation, polyline.segments[].length, spline.segments[].length, point.sizedimension.lineOffset, dimension.textOffsetX, dimension.textOffsetY, dimension.textRotation, dimension.textHeightMm, dimension.arrowSize, dimension.precision, dimension.radius, dimension.startAngle, dimension.endAngle, dimension.text, text.text, text.textHeightMm, text.fontSize, text.rotation, hatch.fillblockRef.insertionPoint.x, blockRef.insertionPoint.y, blockRef.scale.x, blockRef.scale.y, blockRef.rotation, per-parameter block instance fieldsmoveDirective.offset.dx, moveDirective.offset.dy, moveDirective.length, moveDirective.angle, rotateDirective.angle, scaleDirective.factor, arrayDirective.offset, arrayDirective.copies, arrayDirective.angle, arrayDirective.offset2, arrayDirective.copies2, insertDirective.visibleLearn more
Used in block definitions
Movetype: "moveDirective"mode: "polar", length: "=Run", angle: 90Rotatetype: "rotateDirective"angle: "{RotationAngle}"Scaletype: "scaleDirective"factor: "=IF(IsLarge, 2, 1)"Arraytype: "arrayDirective"offset: 100, copies: 3, angle: 0, twoD: true, offset2: 50, copies2: 2Inserttype: "insertDirective"visible: "{ShowAccessory}"Commands
targetIds and insert directive falseTargetIds are assigned through selection workflows, not manual entry.addMoveDirective, addRotateDirective, addScaleDirective, addArrayDirective, addInsertDirectivesetMoveTargets <directiveId>, setRotateTargets <directiveId>, setScaleTargets <directiveId>, setArrayTargets <directiveId>, setInsertTargets <directiveId>, setInsertFalseTargets <directiveId>reorderDirectives <directiveId> ...Learn more
insert.Tab: autocompleteCtrl+C: copyCtrl+V: pasteDelete: deletelineline [x1 y1 x2 y2]line 0 0 100 0polylinepolyline [x1 y1 x2 y2 ...]polylinesplinespline [points...]splinerectanglerectangle [x1 y1 x2 y2]rectangle 0 0 200 100polygonpolygon <sides> [centerX centerY] [radius [rotationDeg]]polygon 6 0 0 100 0circlecircle [interactive]circlearcarc [x1 y1 x2 y2 x3 y3] | arc [interactive]arc 0 0 50 50 100 0ellipseellipse [interactive]ellipsepointpoint [x y]point 0 0texttext [x y [height] content...] | text [interactive]text 0 0 12 LABELdimensiondimension [interactive]dimensionangularDimensionangularDimension [interactive]angularDimensionhatchhatch [p|s] x1 y1 x2 y2 x3 y3 ...hatch p 0 0 100 0 100 50 0 50selectselectselectmovemove [x1 y1 x2 y2]move 0 0 50 0copycopy [interactive]copypastepaste [interactive]pasterotaterotate [baseX baseY angleDeg] | rotate [interactive]rotate 0 0 90scalescale [baseX baseY] factor | scale [interactive]scale 0 0 2mirrormirror x1 y1 x2 y2 [yes|no] | mirror [interactive]mirror 0 0 100 0 notrimtrim [x y] | trim [interactive]trim 50 0extendextend [x y] | extend [interactive]extend 50 0deletedelete [id ...]deletegripEditgripEdit [interactive]gripEditconvertPolylineToSplineconvertPolylineToSpline [interactive]convertPolylineToSplinepl2splinepl2spline [interactive]pl2splineblockblock [name] [x y]block MotorMount 0 0insertinsert <block> [x y] | insert g <globalBlock> [x y]insert Valve 100 200beditbedit [blockId]bedit blk_123saveBlocksaveBlocksaveBlockrenameBlockrenameBlock <newName>renameBlock MotorMountaddMoveDirectiveaddMoveDirective [x y]addMoveDirectiveaddRotateDirectiveaddRotateDirective [x y]addRotateDirectiveaddScaleDirectiveaddScaleDirective [x y]addScaleDirectiveaddArrayDirectiveaddArrayDirective [x y]addArrayDirectiveaddInsertDirectiveaddInsertDirective [x y]addInsertDirectivesetMoveTargetssetMoveTargets <directiveId>setMoveTargets dir_move_1setRotateTargetssetRotateTargets <directiveId>setRotateTargets dir_rot_1setScaleTargetssetScaleTargets <directiveId>setScaleTargets dir_scale_1setArrayTargetssetArrayTargets <directiveId>setArrayTargets dir_array_1setInsertTargetssetInsertTargets <directiveId>setInsertTargets dir_insert_1setInsertFalseTargetssetInsertFalseTargets <directiveId>setInsertFalseTargets dir_insert_1reorderDirectivesreorderDirectives <directiveId> ...reorderDirectives dir_a dir_b dir_csaveSheetsaveSheetsaveSheetrenameSheetrenameSheet <sheetId> <newName>renameSheet sheet_12 Layout-AdeleteSheetdeleteSheet <sheetId>deleteSheet sheet_12exportDxfexportDxfexportDxfexportLogiDraftexportLogiDraftexportLogiDraftimportDxfimportDxfimportDxfimportLogiDraftimportLogiDraftimportLogiDraftsettingssettings snap <grid|object|tolerance|snapType> <value>settings snap tolerance 12undoundo [steps]undo 2redoredo [steps]redo 2rectangle and polygon commands create polyline primitives.linetype: "line"circletype: "circle"arctype: "arc"ellipsetype: "ellipse"polylinetype: "polyline"splinetype: "spline"pointtype: "point"dimensiontype: "dimension"hatchtype: "hatch"texttype: "text"blockReftype: "blockRef"blockDefinitionIdstringrefNamestring | undefinedinsertionPoint{ x: number; y: number }stateIdstring | undefinedparamsRecord<paramId, string | number | boolean> | undefinedscale{ x: number; y: number } | undefinedrotationnumber | undefinedmirroredboolean | undefinedparamValsRecord<paramId, any> | undefinedvarsRecord<varId, any> | undefinedLearn more
Artifact Types
What Artifacts Operate On
Capabilities
Output Behavior
Notes
Learn more
{{...}}.trim and extend operate only on line primitives.How to use formulas and logic in authored blocks.
How formulas, lookups, injection, and state selection work.
A practical lookup-driven sizing system.