How to obtain the id of a node
Hi, I am exporting models from MPS. Basically I export all the models as trees, this schema works decently with children but it does not work with references. To do that I would need to assign an ID to every node. Does not have they already an ID? How can I access it?
Please sign in to leave a comment.
If you have a node<Concept> - typed variable, you can cast it to SNode or use the "downcase to lower semantics level" operation:
Regards,
Mihail
Regards,
Federico
For dearest Googlers, I'm using this now:
interface concept behavior IIdConcept { public string getId() {
this/.getConcept().getName() + this/.getNodeId().toString();
}
}
// For
concept GeographicSite extends BaseConcept implements IIdConcept
// It makes Ids like this:
// GeographicSite8458086500259349004