Look up exact rules and syntax
Exact syntax, commands, and configuration options for LogiDraft.
Functions
Expression Operators
+-*/%==!=><>=<=&&||
Lookup Tables
- Structure: column-based
- Queries: exact key lookup, numeric range lookup
Math And Trig
ABSABS(number)
Example:ABS(-5)ACOSACOS(number)
Example:ACOS(0.5)ASINASIN(number)
Example:ASIN(0.5)ATANATAN(number)
Example:ATAN(1)CEILINGCEILING(number, significance, [mode])
Example:CEILING(12.2, 5)COSCOS(angle)
Example:COS(RADIANS(60))DEGREESDEGREES(radians)
Example:DEGREES(PI()/2)FLOORFLOOR(number, significance)
Example:FLOOR(12.9, 5)HYPOTHYPOT(x, y, ...)
Example:HYPOT(Width, Height)LNLN(number)
Example:LN(10)LOGLOG(number, base)
Example:LOG(1000, 10)MAXMAX(value1, value2, ...)
Example:MAX(Width, Height)MINMIN(value1, value2, ...)
Example:MIN(Width, Height)MODMOD(dividend, divisor)
Example:MOD(Index, 2)PIPI()
Example:PI()POWPOW(base, exponent)
Example:POW(2, 3)RADIANSRADIANS(degrees)
Example:RADIANS(45)ROUNDROUND(number, [digits])
Example:ROUND(Length / 25.4, 2)SINSIN(angle)
Example:SIN(RADIANS(30))SQRTSQRT(number)
Example:SQRT(Area)TANTAN(angle)
Example:TAN(RADIANS(45))EXPEXP(number)
Example:EXP(1)SIGNSIGN(number)
Example:SIGN(Offset)
Logic And Aggregates
IFIF(test, value_if_true, value_if_false)
Example:IF(Motor_Qty == 2, 250, 150)ANDAND(a, b, ...)
Example:AND(Width > 0, Height > 0)OROR(a, b, ...)
Example:OR(State == "A", State == "B")NOTNOT(value)
Example:NOT(IsHidden)SWITCHSWITCH(expression, value1, result1, [value2, result2, ...], [default])
Example:SWITCH(Size, "S", 100, "M", 150, "L", 200, 0)SUMSUM(a, b, ...)
Example:SUM(Width, Height, Depth)AVERAGEAVERAGE(a, b, ...)
Example:AVERAGE(A, B, C)COUNTCOUNT(a, b, ...)
Example:COUNT(A, B, C)SUMIFSUMIF(range, criteria, [sum_range])
Example:SUMIF([1,2,3], ">1")COUNTIFCOUNTIF(range, criteria)
Example:COUNTIF([1,2,3], ">1")
Text
CONCATENATECONCATENATE(text1, text2, ...)
Example:CONCATENATE("P-", PartNo)LENLEN(text)
Example:LEN(Label)LOWERLOWER(text)
Example:LOWER(Code)REPLACEREPLACE(old_text, start_num, num_chars, new_text) | REPLACE(text, find_text, new_text)
Example:REPLACE("MTR-100", "100", "125")UPPERUPPER(text)
Example:UPPER(Tag)
Lookup Tables
LUT_EXACTLUT_EXACT(tableName, outColumn, keyColumn, keyValue, ...)
Example:LUT_EXACT("Sizes", "Width", "Code", "A")
Additional key pairs continue as keyColumn, keyValue, keyColumn, keyValue.LUT_RANGELUT_RANGE(tableName, outColumn, keyColumn, keyValue, mode)
Example:LUT_RANGE("Sizes", "Width", "Length", Length, "floor")
Valid mode values are "floor" and "ceil".
Injection Syntax
Syntax
{Name}
Example:{Width}text with {Name}
Example:Panel {PanelCode} - {Voltage}=expression
Evaluated formula.
Example:=IF({Motor_Qty} == 2, 250, 150)
Parameters
- Types:
number,string,boolean - Value forms: literal,
=expression,{Name}
Evaluation
{Name}resolves a scoped value.=expressionevaluates a formula result.
Injectable Fields
- Geometry
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.size - Dimensions And Text
dimension.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.fill - Block References
blockRef.insertionPoint.x,blockRef.insertionPoint.y,blockRef.scale.x,blockRef.scale.y,blockRef.rotation,blockRef.params - Directives
moveDirective.offset.dx,moveDirective.offset.dy,moveDirective.length,moveDirective.angle,rotateDirective.angle,scaleDirective.factor,arrayDirective.offset,arrayDirective.copies,arrayDirective.angle,arrayDirective.offset2,arrayDirective.copies2,insertDirective.visible
Directives
Supported Directive Types
Movetype: "moveDirective"
Translates target primitives by dx/dy in cardinal mode or by length/angle in polar mode.
Example:mode: "polar", length: "=Run", angle: 90
Properties: base, offset.dx, offset.dy, length, angle, mode, targetIds, tag.Rotatetype: "rotateDirective"
Rotates targets around the directive base point.
Example:angle: "{RotationAngle}"
Properties: base, angle, targetIds, tag.Scaletype: "scaleDirective"
Scales targets around the directive base point. Zero scale is sanitized away.
Example:factor: "=IF(IsLarge, 2, 1)"
Properties: base, factor, targetIds, tag.Arraytype: "arrayDirective"
Creates additional translated copies. It supports 1D arrays and optional 2D rows.
Example:offset: 100, copies: 3, angle: 0, twoD: true, offset2: 50, copies2: 2
Properties: base, offset, copies, angle, twoD, offset2, copies2, targetIds, hideTargets, tag.
copies and copies2 are additional copies, not total instance counts.Inserttype: "insertDirective"
Controls visibility of targeted primitives through the visible property.
Example:visible: "{ShowAccessory}"
Properties: base, visible, targetIds, tag.
- Authoring Commands
addMoveDirective,addRotateDirective,addScaleDirective,addArrayDirective, andaddInsertDirective. setMoveTargets <directiveId>,setRotateTargets <directiveId>,setScaleTargets <directiveId>,setArrayTargets <directiveId>, andsetInsertTargets <directiveId>.reorderDirectives <directiveId> ...
CLI Commands
Tab: autocompleteCtrl+C:copyCtrl+V:pasteDelete:delete
Drawing And Annotation
lineline [x1 y1 x2 y2]
Creates a line. Without full coordinates it runs interactively.
Example:line 0 0 100 0polylinepolyline [x1 y1 x2 y2 ...]
Creates a polyline from typed points or pointer input.
Example:polylinesplinespline [points...]
Creates a spline interactively from clicked or typed points.
Example:splinerectanglerectangle [x1 y1 x2 y2]
Creates a rectangle from corner points.
Example:rectangle 0 0 200 100polygonpolygon [interactive]
Creates a polygon interactively.
Example:polygoncirclecircle [interactive]
Creates a circle interactively from center and radius input.
Example:circlearcarc [interactive]
Creates an arc interactively.
Example:arcellipseellipse [interactive]
Creates an ellipse interactively.
Example:ellipsepointpoint [x y]
Places a point marker.
Example:point 0 0texttext [interactive]
Places text with interactive prompts.
Example:textdimensiondimension [interactive]
Creates a linear dimension.
Example:dimensionangularDimensionangularDimension [interactive]
Creates an angular dimension.
Example:angularDimensionhatchhatch [p|s] x1 y1 x2 y2 x3 y3 ...
Creates a closed hatch boundary. p or polyline uses polyline mode, s or spline uses spline mode.
Example:hatch p 0 0 100 0 100 50 0 50
Selection And Modify
selectselect
Starts click-or-drag selection. Shift adds and Ctrl removes.
Example:selectmovemove [x1 y1 x2 y2]
Moves the current selection. Supports typed coordinates or interactive points.
Example:move 0 0 50 0copycopy [interactive]
Copies the current selection with interactive placement.
Example:copypastepaste [interactive]
Pastes clipboard content and places it in the current workspace.
Example:pasterotaterotate [interactive]
Rotates the current selection.
Example:rotatescalescale [interactive]
Scales the current selection.
Example:scalemirrormirror [interactive]
Mirrors the current selection. This is a modify command, not a directive type.
Example:mirrortrimtrim [interactive]
Trims selected geometry against cutting edges.
Example:trimextendextend [interactive]
Extends selected geometry to a boundary.
Example:extenddeletedelete [id ...]
Deletes the current selection or explicit primitive ids.
Example:deletegripEditgripEdit [interactive]
Edits grip positions for supported primitives.
Example:gripEditconvertPolylineToSplineconvertPolylineToSpline [interactive]
Converts selected polyline geometry to spline geometry.
Example:convertPolylineToSplinepl2splinepl2spline [interactive]
Alias for convertPolylineToSpline.
Example:pl2spline
Blocks And Block Instances
blockblock [name] [x y]
Creates a block from the current selection. If no base point is provided it prompts for one.
Example:block MotorMount 0 0insertinsert <block> [x y] | insert g <globalBlock> [x y]
Inserts a local block or a copied global block. Tab toggles local/global selection while prompting.
Example:insert Valve 100 200beditbedit [blockId]
Opens block editor for the given block id or for the selected block reference.
Example:bedit blk_123saveBlocksaveBlock
Saves the current local or global block editor definition.
Example:saveBlockrenameBlockrenameBlock <newName>
Renames the block currently open in block editor.
Example:renameBlock MotorMountmanageBlockEntitymanageBlockEntity <param|var|state> <action> ...
Adds, renames, deletes, duplicates, or reorders block parameters, variables, and states.
Example:manageBlockEntity param add Width
Actions vary by entity: add, rename, delete, reorder, duplicate.updateBlockParamupdateBlockParam <blockRefId> <paramId> <value>
Updates one block reference parameter, resolves inherited and injected values, and recomputes logic.
Example:updateBlockParam ref_12 param_width =IF(UseAlt, 200, 100)updateBlockParamsBatchupdateBlockParamsBatch <jsonIds> <paramId> <value>
Applies the same parameter update to multiple block references.
Example:updateBlockParamsBatch ["ref_1","ref_2"] param_width 250updateBlockRefStateupdateBlockRefState <blockRefId> <stateId>
Forces a block reference to a specific state id.
Example:updateBlockRefState ref_12 state_altsetEditingBlockStatesetEditingBlockState <stateId>
Switches the active state inside block editor and loads that state primitives.
Example:setEditingBlockState state_2updateBlockSelectionFormulaupdateBlockSelectionFormula <formula>
Updates the block selection formula used for automatic state selection.
Example:updateBlockSelectionFormula IF(Size > 100, "Large", "Small")updateBlockDefaultStateupdateBlockDefaultState <stateId>
Sets the block default state id.
Example:updateBlockDefaultState state_default
Directive Authoring
addMoveDirectiveaddMoveDirective
Adds a move directive marker in block editor.
Example:addMoveDirectiveaddRotateDirectiveaddRotateDirective
Adds a rotate directive marker in block editor.
Example:addRotateDirectiveaddScaleDirectiveaddScaleDirective
Adds a scale directive marker in block editor.
Example:addScaleDirectiveaddArrayDirectiveaddArrayDirective
Adds an array directive marker in block editor.
Example:addArrayDirectiveaddInsertDirectiveaddInsertDirective
Adds an insert visibility directive marker in block editor.
Example:addInsertDirectivesetMoveTargetssetMoveTargets <directiveId>
Selects targets for a move directive.
Example:setMoveTargets dir_move_1setRotateTargetssetRotateTargets <directiveId>
Selects targets for a rotate directive.
Example:setRotateTargets dir_rot_1setScaleTargetssetScaleTargets <directiveId>
Selects targets for a scale directive.
Example:setScaleTargets dir_scale_1setArrayTargetssetArrayTargets <directiveId>
Selects targets for an array directive.
Example:setArrayTargets dir_array_1setInsertTargetssetInsertTargets <directiveId>
Selects targets for an insert visibility directive.
Example:setInsertTargets dir_insert_1reorderDirectivesreorderDirectives <directiveId> ...
Applies a full new directive id order. The argument list must include every directive id exactly once.
Example:reorderDirectives dir_a dir_b dir_c
Block Definition Metadata
updateLocalParameterupdateLocalParameter <paramId> <value>
Updates a local block parameter default value.
Example:updateLocalParameter param_width 100updateLocalParameterOptionsupdateLocalParameterOptions <paramId> <optionsArray>
Sets parameter option values from an array payload.
Example:updateLocalParameterOptions param_mode ["A","B","C"]updateLocalParameterTypeupdateLocalParameterType <paramId> <number|string|boolean>
Changes the local parameter type.
Example:updateLocalParameterType param_width numberupdateLocalVariableDefaultupdateLocalVariableDefault <varId> <value>
Updates a variable fallback default value.
Example:updateLocalVariableDefault var_total 0updateLocalVariableFormulaupdateLocalVariableFormula <varId> <formula>
Updates a local variable formula.
Example:updateLocalVariableFormula var_total =Width*HeightupdateLocalVariableTypeupdateLocalVariableType <varId> <number|string|boolean>
Changes the local variable type.
Example:updateLocalVariableType var_total number
Primitive And Dimension Utilities
updatePrimitiveupdatePrimitive <id> <property> <value>
Updates one primitive property. The value is parsed from JSON first, then number, then string.
Example:updatePrimitive prim_1 rotation 90updatePrimitiveBatchupdatePrimitiveBatch <jsonIds> <property> <value>
Applies one primitive property update to multiple ids.
Example:updatePrimitiveBatch ["p1","p2"] layer "Default"setDimensionRefsetDimensionRef <dimensionId> <start|end|center>
Binds a dimension endpoint or center to another primitive grip.
Example:setDimensionRef dim_1 start
Document, Sheet, Import, Export, And System
saveSheetsaveSheet
Writes current workspace primitives and view back into the active sheet definition.
Example:saveSheetrenameSheetrenameSheet <sheetId> <newName>
Renames a sheet definition and notifies workspace UI.
Example:renameSheet sheet_12 Layout-AdeleteSheetdeleteSheet <sheetId>
Deletes the target sheet definition.
Example:deleteSheet sheet_12exportDxfexportDxf
Exports the active workspace as flattened DXF.
Example:exportDxfexportLogiDraftexportLogiDraft
Exports the current document as a LogiDraft .ldoc file.
Example:exportLogiDraftimportDxfimportDxf
Opens a file picker, imports DXF, creates a new sheet, and loads imported blocks and layers.
Example:importDxfimportLogiDraftimportLogiDraft
Shows the Dashboard-only .ldoc import route.
Example:importLogiDraftsettingssettings snap <grid|object|tolerance|snapType> <value>
Updates snap settings. Snap types are endpoint, midpoint, center, geometricCenter, node, quadrant, and intersection.
Example:settings snap tolerance 12undoundo [steps]
Undoes one or more history steps. Default is 1.
Example:undo 2redoredo [steps]
Redoes one or more history steps. Default is 1.
Example:redo 2
Artifacts Reference
Output Format
flat: CSV filehierarchical: JSON file
Templates
blankparts-listschedule
Scope
documentsheets
Common Options
resolvedMode:raw,resolved,bothincludeNestedmaxDepthfileLabelsheetIds[]whenscopeissheets
Resolved Mode
rawresolvedboth
Fields
- Groups:
Meta,Params,Vars,Resolved Params,Resolved Vars - Meta fields:
sheetName,sheetId,defName,defId,refId,refName - Source kinds:
meta,param,var,resolvedParam,resolvedVar - Column keys:
key,header,source
Grouping
grouping.enabledgrouping.groupBy[]grouping.aggregates[]- Aggregate ops:
count,sum
Filters
- Operators:
contains,equals,not equals,greater than,greater or equal,less than,less or equal - Filter joins:
AND,OR