Table of Contents

Glossary: RuntimeApi Quick-Reference

RuntimeApi is the global scope for all HiNC script commands. This page organizes every command by category with a one-line description and links to the workflow where each is typically used.


Simulation Control

Command Description Used In
PlayNcFile Execute an NC file Workflow: Basic Machining Simulation
PlayNc Execute NC code from a string Workflow: Basic Machining Simulation
PlayCsvFile Drive simulation from a CSV file Workflow: Basic Machining Simulation, Workflow: Sensor Data Mapping
RunNcFile Parse NC file and return action sequence (no auto-pacing)
RunNc Parse NC string and return action sequence (no auto-pacing)
Pace Insert a pausable checkpoint during playback Workflow: Basic Machining Simulation
Pause Pause player execution Workflow: Basic Machining Simulation
Reset Reset player state Workflow: Basic Machining Simulation
PlayAct Execute a custom action object
PlayToolingTeleport Teleport a tool to a new position
PlayClTeleport Teleport tool to a specified CL position and orientation

Configuration — Resolution

Command Description Used In
MachiningResolution_mm Set workpiece entity resolution (power-of-2 cube width in mm) Workflow: Basic Machining Simulation
DispCache_Mb Set display cache size (Mb) Workflow: Basic Machining Simulation
MachiningMotionResolution Set machining motion resolution mode Workflow: Basic Machining Simulation

Configuration — Physics

Command Description Used In
EnablePhysics Enable/disable milling force evaluation Workflow: Milling Force Parameter Training, Workflow: NC Optimization
EnableWearEffect Enable/disable tool wear effects
MillingForceCycleDivisionNum Divisions per revolution for force calculation Workflow: Milling Force Parameter Training
InitSpindleTemperature_C Initial spindle temperature (°C)
EnablePauseOnFailure Pause execution on failure Workflow: Geometry Validation
EnableCollisionDetection Enable collision detection Workflow: Geometry Validation
EnablePauseOnCollision Pause on collision Workflow: Geometry Validation

Data Export

Command Description Used In
WriteShotFiles Export waveform (shot) data CSV at given time resolution Workflow: Milling Force Parameter Training
WriteStepFiles Export step-level data CSV Workflow: Basic Machining Simulation, Workflow: Milling Force Parameter Training

Data Mapping

Command Description Used In
MapSingleByCsvFile One-to-one time-interpolation mapping from CSV Workflow: Sensor Data Mapping
MapSeriesByCsvFile One-to-many series mapping from CSV (via ActualTime) Workflow: Sensor Data Mapping
AddTimeDataByFile Specify input data with time range for local mapping Workflow: Sensor Data Mapping, Workflow: Milling Force Parameter Training
ClearTimeMappingData Clear all mapping data Workflow: Sensor Data Mapping
BeginSelection Set range mapping start point (in NC comments) Workflow: Sensor Data Mapping
EndSelection Set range mapping end point (in NC comments) Workflow: Sensor Data Mapping
LineSelection Single-line data mapping (in NC comments) Workflow: Sensor Data Mapping
EnableMapOnSelectionEnd Auto-trigger mapping when selection ends (default: true) Workflow: Sensor Data Mapping

Training

Command Description Used In
TrainMillingPara Train new milling coefficients from mapped data Workflow: Milling Force Parameter Training
ReTrainMillingPara Calibrate existing milling coefficients (10% original / 90% new) Workflow: Milling Force Parameter Training
LoadCuttingParaByFile Load cutting parameters from file into workpiece Workflow: Milling Force Parameter Training
MillingCycleDivisionNum Number of angular divisions per revolution Workflow: Milling Force Parameter Training

Optimization

Command Description Used In
OptimizeToFiles Output optimized NC files Workflow: NC Optimization
OptEnableFeedrate Enable sequential feed rate optimization Workflow: NC Optimization
OptEnableInterpolation Enable re-interpolation Workflow: NC Optimization
OptFeedrateAssignmentRatio Feed rate assignment ratio for re-interpolation Workflow: NC Optimization
OptRapidFeed_mmdmin Non-cutting region feed rate (mm/min) Workflow: NC Optimization
OptMinFeedrate_mmdmin Minimum cutting feed rate (mm/min) Workflow: NC Optimization
OptMaxFeedrate_mmdmin Maximum cutting feed rate (mm/min) Workflow: NC Optimization
OptMaxAcceleration_mmds2 Acceleration/deceleration limit (mm/s²) Workflow: NC Optimization
OptExtendedPreDistance_mm Pre-distance for cutting region calculation (mm) Workflow: NC Optimization
OptExtendedPostDistance_mm Post-distance for cutting region calculation (mm) Workflow: NC Optimization
OptSpindlePowerSafetyFactor Spindle power safety factor Workflow: NC Optimization
OptSpindleTorqueSafetyFactor Spindle torque safety factor Workflow: NC Optimization
OptThermalYieldSafetyFactor Thermal yield safety factor Workflow: NC Optimization
OptPreferedForce_N Target cutting force (N) Workflow: NC Optimization
Preserve Disable optimization for a single NC line Workflow: NC Optimization
BeginPreserve Begin optimization-disabled range Workflow: NC Optimization
EndPreserve End optimization-disabled range Workflow: NC Optimization
EnableIndividualStepAdjustmentLog Enable per-step optimization log file Workflow: NC Optimization
EmbeddedLogMode Set embedded log verbosity (None / SimpleLog / FullLog) Workflow: NC Optimization

Geometry

Command Description Used In
WriteRuntimeGeom Save runtime geometry to file Workflow: Basic Machining Simulation
ReadRuntimeGeom Load runtime geometry from file Workflow: Basic Machining Simulation
WriteRuntimeGeomToStl Export runtime geometry to STL Workflow: Basic Machining Simulation
Diff Compare simulated geometry against target Workflow: Geometry Validation
RemoveFlyPiece Remove disconnected residual material Workflow: Geometry Validation
ScanRuntimeGeomInfDefect Scan for infinite edge cut defects Workflow: Geometry Validation
ClearDefectDisplayee Clear defect visualization markers Workflow: Geometry Validation

Events

Command Description Used In
SessionStepBuilt Fired when a machining step is built Workflow: NC Optimization
SessionStepSelected Fired when a machining step is selected

Messages

Command Description Used In
Message Display a general message All workflows
ProgressMessage Display a progress message All workflows
WarningMessage Display a warning message All workflows
ErrorMessage Display an error message All workflows
AppendMessagesToFile Export messages to file (optional tag filter) All workflows
SessionProgress Session message host object Glossary: Session Progress (Messages)

Step Data Access

Command Description Used In
GetMillingStep Get step by index Workflow: Basic Machining Simulation
StepCount Total step count Workflow: Basic Machining Simulation
RegisterStepVariable Register a custom step variable Glossary: Machining Step

Runtime Management

Command Description Used In
ResetRuntime Clear event handlers, buffers, and runtime state Workflow: Basic Machining Simulation
MachiningSession Get the current machining session object

Properties — Workpiece and Fixture

Command Description Used In
Workpiece Get/set the workpiece object Workflow: Basic Machining Simulation
Fixture Get/set the fixture object Workflow: Basic Machining Simulation
Global Global variable dictionary for cross-script data sharing Glossary: Script Commands

Tool Setup

Command Description Used In
GetUniformContourTrayShiftAngle_deg Get tool contour shift angle (deg)
SetUniformContourTrayShiftAngle_deg Set tool contour shift angle (deg)
GetStickMachiningToolObservationHeight_mm Get smart tool holder observation height (mm)
SetStickMachiningToolObservationHeight_mm Set smart tool holder observation height (mm)
Note

Tool setup commands are for dynamic adjustment when actual installation conditions differ from defaults. Typically, configure these in the tool configuration file instead.


See Also