Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GiD_Event_LoadModelSPDBeforeTransformProblemType: will be called when a GiD project is loaded. It receives the argument filespd, which is the path of the file which is being opened, but with the extension .spd (specific problemtype data). This path is tipically the file of the model where the problemtype store its own datajust before transforming a model from a problem type to a new problem type version.

If it returns -cancel- as a value then the transformation will not be invoked.

file: the name of the model to be transformed;
oldproblemtype: the name of the previous problem type;
newproblemtype: the name of the problem type to be transformed.

Code Block
proc GiD_Event_LoadModelSPDBeforeTransformProblemType { file filespdoldproblemtype newproblemtype } {
  ...body...
  set value ...
  return $value
}


Note: GiD_Event_AfterLoadGIDProject Will AfterTransformProblemType: will be called when a GiD project is loaded, but not when a problem type is loaded, then could be used instead of GiD_Event_LoadModelSPD as an oportunity to load the problemtype data of the model.GiD_Event_LoadProblemtypeSPD: will be called when a problem type is loaded. It receives the argument filespd, which is the path of the file which is being opened, but with the extension .spd (specific problemtype data).
This path is tipically the file of the problemtype where the problemtype define its own datajust after transforming a model from a problem type to a new problem type version.

It must return a list of the items: value and messages
value 1 if there were model changes done in this procedure, 0 else.
If it returns -cancel- as a special value, then the transformation messages won't be shown.
file: the name of the model to be transformed;
oldproblemtype: the name of the previous problem type;
newproblemtype: the name of the problem type to be transformed.
messages: explains the transforming operations done.

Code Block
proc GiD_Event_LoadProblemtypeSPDAfterTransformProblemType { filespd file oldproblemtype newproblemtype messages } {
}

Note: LoadGIDProject is a deprecated confusing event, that is called in both cases: GiD_Event_LoadModelSPD and GiD_Event_LoadProblemtypeSPD

GiD_Event_SaveModelSPD: will be called when the currently open file is saved to disk. It receives the argument filespd, which is the path of the file being saved, but with the extension .spd (specific problemtype data). This path can be useful if you want to write specific information about the problem type in a new file.

Code Block
proc GiD_Event_SaveModelSPD { filespd } {
}

...


  ...body...
  set value ...
  return [list $value $messages]
}