How to assign a value to customer particle property

User: "Yangyang_Shen"
Altair Community Member
Updated by Yangyang_Shen

When writing an API, I know how to take the value from a customer property using the getValue function. My question is what function to use to assign a value to a customer property, while the value is calculated in the code? 

 

For example below, I use the "Particle Pore Filling" to calculate the "Particle Moisture". 

      const string CComputation::PARTICLE_POREFILLING = "Particle Pore Filling";

      const string CComputation::PARTICLE_MOISTURE = "Particle Moisture";

      const double* elem1PoreFilling = elem1PropData->getValue(PARTICLE_POREFILLING.c_str());

      double elem1Moisture = *elem1PoreFilling * elem1Mass;  

Then I want to assign the value of elem1Moisture to the PARTICLE_MOISTURE customer property. How can I do this? 

Any advice will be much appreciated! 

 

Find more posts tagged with