EDEM API Contact Model | Retrieving custom property value from / defined in another contact model?

MQ
MQ Altair Community Member
edited November 2022 in Community Q&A

Hi everyone,

- I am setting up two different contact models (CM), i.e., with seperate DLLs;

- In CM-1, I would like to check the value of a certain custom property defined in CM-2;

- For instance, in CM-1, I would like to retreive the value of 'Bond_Status' from CM-2, to do further operations or set certain conditions based on it.

What would be the best way to do this?

(1). Define the new custom property with exactly the same name (and category + units) in CM-1 as in the CM-2?

(2). Or any other suggestion?

Thank you.

Best regards,

MQ

Tagged:

Best Answer

  • jpmorr
    jpmorr Altair Community Member
    edited November 2022 Answer ✓

    From my experience, your suggestion (1) is about the only way to do it. If you define the same name, category and units you can share across models. Make sure to get your chaining order correct though.

Answers

  • jpmorr
    jpmorr Altair Community Member
    edited November 2022 Answer ✓

    From my experience, your suggestion (1) is about the only way to do it. If you define the same name, category and units you can share across models. Make sure to get your chaining order correct though.

  • RWood
    RWood
    Altair Employee
    edited November 2022

    Custom properties with the same name are the same custom property, as far as EDEM is concerned. For this reason you wouldn't be able to have two different custom properties named "Bond_Status". You would be able to compile the plugins, but EDEM wouldn't like it once you loaded them. They can have different indices but EDEM will see any two (or more) custom properties with the same name as the same property.

    I've no idea what would happen if you tried to have two with the same name but different units/number of elements, though my guess is that EDEM wouldn't like that either.

    Richard

  • jpmorr
    jpmorr Altair Community Member
    edited November 2022

    Custom properties with the same name are the same custom property, as far as EDEM is concerned. For this reason you wouldn't be able to have two different custom properties named "Bond_Status". You would be able to compile the plugins, but EDEM wouldn't like it once you loaded them. They can have different indices but EDEM will see any two (or more) custom properties with the same name as the same property.

    I've no idea what would happen if you tried to have two with the same name but different units/number of elements, though my guess is that EDEM wouldn't like that either.

    Richard

    Having accidentally changed units a few times in linked properties, EDEM will complain about it!