cancel
Showing results for 
Search instead for 
Did you mean: 

Edit text in methods via methods

Pioneer
Pioneer

Hello everyone,

 

for the weekend, I have a nice little problem with text replacement in methods.

I want to replace certain strings, paths (like .Model.Main.Submodel) in every single method.

Right now, I'm exporting methods to edit them via VBA, and after that they're reimported. I'm sure you can clearly see that's far from optimal.

So, before I go into designing my own and certainly flawed text replacement function - is there something like that implemented in SimTalk already?

 

Best regards

 

Tim

3 REPLIES

Re: Edit text in methods via methods

Phenom
Phenom

for simtalk replacement functions s. simtalk text functions (help)

 

or

 

http://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/Split-String/m-p/324642#M5782

Re: Edit text in methods via methods

Pioneer
Pioneer

Thanks a lot for the quick reply,

 

yes, regular expressions would be the key to it (used in the link you posted). Unfortunately, I seem to be equipped with PS 12.0.3, so ... no regex.

And I take it from your tip considering the text control functions, a plain replace function does not exist? (I did search the help, didn't turn up anything.)

 

Best regards

Re: Edit text in methods via methods

Phenom
Phenom
in this case simtalk still provides pos, omit, incl, strlen to build a replace function