When using mdlLinkage_extractUsingDescr() and a Data Definition Block (4th function parameter), I get a return value of NULL (0), which according to the function documentation means "no linkage was found". I *do* get the linkage converted according to the Data Definition Block returned in the first parameter ( as specified in the documentation), but I suspect the "null" returned in this case doesn't really mean "no linkage found". When looking at some of the examples provided, they name the return value "nextLink", implying what *may* be the true meaning of the "null" returned. Just wondering if anyone can confirm or deny this is the case. When NOT using a Data Definition Block, the returned value IS the pointer to the last element linkage (again, as described in the documentation).
Thanks,
Bruce
Answer Verified By: Bruce Reeves SRNS
After re-visiting this issue, I discovered that the example I was using as a guide (circuit) has errors in the "identifyElement()" function. The documentation is indeed correct in that the return value, when null, means no linkage found. The function error was the use of mdlLinkage_extractFromElement() to put the linkage data into the same structure (BatteryLinkage) regardless of the Data Definition Block used, instead of returning the linkage data into the proper structure (WireLinkage from DATADEFID_CIRCUITLINKAGE_WIRE, LightLinkage for DATADEFID_CURCUITLINKAGE_LIGHT, and BatteryLinkage for DATADEFID_CIRCUITLINKAGE_BATTERY).