[quote user="clever_anthony"] I'm still seeking how the MSElementDescr works[/quote]
MSElement is a struct defined in <mselems.h>. You can safely declare a variable of type MSElement as I illustrated in my example.
MSElementDescr (element descriptor) is only every allocated dynamically. We never use MSElementDescr, only MSElementDescr*. You can obtain a MSElementDescr* by reading it from a model (mdlElmdscr_read) or by duplicating an existing descriptor. Because an element descriptor is dynamic, you must free it when finished using mdlElmdscr_freeAll.
In other words, you can do this...
MSElement element;
MSElementDescr* pElement = NULL;
.. but you must never do this ...
MSElementDescr element;
New Topic — New Post
If you want to prolong this discussion about MSElement, MSElementDescr, elementRef and ElemEditHandle then I suggest that you start a new post.