Hi,
I’ve got a custom OP with a File parameter (to load files from disk), I’m trying to figure out how to get the value of that File param when it changes but I can’t find that anywhere in the sample source or documentation, anyone got an idea about that?
Thanks.
You’ll have to keep the string around as a private variable and compare to it every execute
// in header file
private:
std::string myFilepath = "";
then
// in cpp file:
const char* updatedFilepath = inputs->getParFilePath("File");
if (myFilepath.compare(updatedFilepath) != 0) {
// the updated filepath changed.
myFilepath = updatedFilepath;
// reload something
}
I eventually figured it out, thanks a lot!