ReplaceSpecialWord

In MANUSpost developer, you can write special codes starting with “##” and ending with “##” inside Commands.

This method is used to change these special codes inside commands later when the post processor runs.

We do not use this method very often, however we use it when we have to write a code at the beginning of the NC program or at the beginning operatiojn starts, but what will be written can only be determined at the later stages of post processing.

Note that, the commands will not be changed by using this method, the change will only be done inside the NC program generated.

This method takes two parameters, both of which must be string.

Example usage:

Let’s say we wrote “##TEST##” inside “Format Operation Start”.

Later, if we use this method as shown below in a script:

ReplaceSpecialWord(“TEST”,”G129”)

All “TEST” expressions written inside operation start commands will be replaced with “G129” in the NC program generated.

Note that, ## signs are removed in the NC program output.

Also note that, it is important when this method is activated. For instance, if you use this method in a script defined at “Event Program Start”, nothing will be changed in the NC program, because this method only affects the Commands coming before this method. Therefore, it is best to use this method at “Event Program End”, if you want this method to affect all Commands.

Also note that, if you call this method multiple times during post processing, the commands that are chagned at the first call will not be affected from the next calls.