AddStaticCodeBlockReplacement

From Compost Wiki
Revision as of 21:06, 29 June 2020 by Jeffm (talk | contribs)
Jump to navigation Jump to search

AddStaticCodeBlockReplacement('BlockName', 'SearchValue','FORMAT', RelacementValue#)

Description

This command evaluates the number argument and formats it with the specified format, and then finds all instances of the replacement label in the specified block name and replaces the text with the formatted value.


Stats

ID 1023
Type Command
Class All Machines
Scope Global
Min Version 13.8.42


Example

   [[ResetStaticCodeBlockReplacments('TailStockIn')
   AddStaticCodeBlockReplacemnt('TailStockIn','%ZCLEAR%', 'Z', OpFieldData#('ZClear'))
   AddStaticCodeBlockReplacemnt('TailStockIn','%XCLEAR%', 'X', OpFieldData#('XClear'))
   AddStaticCodeBlockReplacemnt('TailStockIn','%ZDIST%', 'Z', OpFieldData#(‘ZDistance’))
   OutputStaticCodeBlock('TailStockIn')