It looks like I had to define my model instance like: 
    
    
    type
      ModelInstance* = ref object
          ....
    
    
    Run

Then just in the procs `comp:ModelInstance`: 
    
    
    proc fmi2SetupExperiment*(comp: ModelInstance; toleranceDefined: 
fmi2Boolean;
                             tolerance: fmi2Real; startTime: fmi2Real;
                             stopTimeDefined: fmi2Boolean; stopTime: fmi2Real): 
fmi2Status =
    
    
    Run

seems to keep the same address that is what I was looking for.

Reply via email to