Unable to set a "last modified" property

Hi
the api allows to set the “Last modified” property for a IHasChildrenBaseModelElement.
When i set both “Create date time”(setPmCreateDateTime) and “Last modified”(setPmLastModified) to the same date then “Create date time” ist accepted, but the “Last modified” is overwritten with the current timestamp…
image
A way to set it without beeing overwritten?

Thanks,
Guido

Hi Guido,

The Create date is a read-only property that reflects the time at which an element/diagram was being created, while the Last modified property will be automatically updated to reflect the time on which changes are saved. May I know why you want to change them?

Best regards,
Jick Yeung

Hi Jick,

the create date seems not to be read-only, as for the element shown in my picture (created on 2021-02-11), the value i set by open api (2002-03-08) is accepted, and correctly shown, i am happy with create date behavior.
It is an import logic, the source has the two informations, visual paradigm open api defines SETTER for both, so i try to take over.

Best regards,
Guido

Hi Guido,

Thank you for your reply. I have forwarded your case to our team to study. When there is any news, I will let you know.

Best regards,
Jick Yeung

Hi Guido,

Both the Create and Last Modified Date are not supposed to be modifiable and hence, we decided to make the setters deprecated. You may consider to use Tagged Value to record the information you need.

Best regards,
Jick Yeung

Hi Jick,

thanks for the information, but this is bad news.
Using tagged values is an option, but in our case:
Import of about 125000 Modelelements (with about 4500 diagrams) would force the creation of 125000 TaggedValueContainer and 250000 TaggedValues, isn’t it, so about 375.000 additional objects in our model, for an information that has its place in the normal properties. And after the import, we would have to look in two places (properties and tagged value) to decide when an element was changed last.

Pleace consider to make the “last modified” setter functional (when it is called after creation and all other modifications of the element)

Best regards,
Guido

Hi Guido,

Thank you for your reply. We understand your need to keep additional information to model elements, which is reasonable. If a model property is supposed to be editable (e.g. name, description, etc), we will try to make them editable through the API. The create and modified date are closely related to the life cycle and state of a model. In fact, they aren’t editable through the UI. We just worry that if they are made editable, the functions that read the information and rely on that to function properly will become unstable… Let me forward your case to our team to see if they have any workaround.

Best regards,
Jick Yeung