Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [v8i ss3, MDL] How to get elementID from descriptor

$
0
0

[quote user="Manko"]How do I get element ID from element descriptor?[/quote]

ElementID GetElementIdFromDescriptor (MSElementDescr const* pElm)
{
  return mdlElement_getID (&pElm->el);
}

[quote user="Manko"]MSElementDescr**       edPP;[/quote]

It would be unusual to need to declare a pointer-to-pointer-to-descriptor.  It's more usual to declare a variable of type MSElementDescr*.  You may need to pass the address of your variable to an MDL function to assign.  Like this...

MSElementDescr* pElm = 0;
if (SUCCESS == mdlElmdscr_read (&pElm, ...)) // address of pElm is MSElementDescr**
{
  ... do something with pElm
  mdlElmdscr_freeAll (&pElm);
}

Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>