AddStaticCodeBlockReplacement: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Jeffm (talk | contribs)
No edit summary
Jeffm (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:


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

Latest revision as of 21:07, 29 June 2020

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')
   AddStaticCodeBlockReplacement('TailStockIn','%ZCLEAR%', 'Z', OpFieldData#('ZClear'))
   AddStaticCodeBlockReplacement('TailStockIn','%XCLEAR%', 'X', OpFieldData#('XClear'))
   AddStaticCodeBlockReplacement('TailStockIn','%ZDIST%', 'Z', OpFieldData#(‘ZDistance’))
   OutputStaticCodeBlock('TailStockIn')