Versions Compared

Key

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


GiD_Event_BeforeSaveGIDProject / GiD_Event_AfterSaveGIDProject AfterCreatePoint/Line/Surface/Volume: will be called just before save a GiD project. It receives the argument modelname which is the path of the model folder, without the .gid extension.

If GiD_Event_BeforeSaveGIDProject returns -cancel- then the writting is cancelled.

...

after create the entity, providing its number

Code Block
proc GiD_Event_AfterCreatePoint { num } {
}

proc GiD_Event_BeforeSaveGIDProjectAfterCreateLine { modelnamenum } {
...}
body
...
set value ...
return $valueproc GiD_Event_AfterCreateSurface { num } {
}

proc GiD_Event_AfterSaveGIDProjectAfterCreateVolume { modelnamenum } {
}


GiD_Event_AfterSaveAsGIDProjectBeforeDeletePoint/Line/Surface/Volume: will be called after GiD save its information in the new_filename location, when this folder and the model files exists, and provide the old_filename argument for example to allow to copy extra data, like result files handled by the problemtype.just before delete the entity, providing its number

Code Block
proc GiD_Event_AfterSaveAsGIDProject { old_modelname new_modelnameBeforeDeletePoint { num } {
}

proc GiD_Event_BeforeDeleteLine { num } {
}

proc GiD_Event_BeforeDeleteSurface { num } {
}

proc GiD_Event_BeforeDeleteVolume { num } {
}


GiD_Event_AfterSaveFileAfterRenumber: will be called after a renumber the geometry or the mesh file is exported to a file. It receives as arguments:

...

(to update for example fields storing entity identifiers)

  • useof : could be GEOMETRYUSE or MESHUSE
  • leveltype: the kind of entity that was renumbered.

Geometry: must be ALL_LT.
Mesh: could be NODE_LT or ELEM_LT.

  • renumeration:

Geometry: four sublists with the old and new idenfiers for points, lines, surfaces and volumes.
Mesh: a sublist with the old and new identifiers for nodes or elements.

Code Block
proc GiD_Event_AfterSaveFileAfterRenumber { filenameuseof formatleveltype errorrenumeration } {
}


GiD_Event_AfterSaveImageAfterRepair: will be called after a picture or model is saved to disk. It receives as arguments:

...

repair (the geometry and mesh), to do extra tasks at scripting level
It must return a list of the items: num_repaired and message

  • num_repaired: integer, the number of repaired things
  • message: a translated message to be shown to the used after the repair
Code Block
proc GiD_Event_AfterSaveImageAfterRepair { } {
   filenamereturn format } {[list $num_repaired $message]
}