How to add Reference Info to Master file?

Hi experts,

In PW, I checked out a DGN file (called "Ref"), and then used my MVBA to attach this file to another file in PW (called "Master") successfully.  But this reference info can not be recognized by PW unless I used PWE's scan references. So what I need to do is add this reference info into Master's reference info, in other words, I need to do "Scan references" by code...

 I searched this forum, got sevearl threads, like

 Adding reference information via aaApi_CreateReferenceInformation2;

Attach a reference file programmetrickly (pardon my language :-)) using Object GUID or similar

So I used

aaApi_CreateReferenceInformation2 (1, &MasterGuid, 0, &RefGuid, 0, 177, 0, 2);

added a record successfully into dms_refinfo table, but PW still can't recognize this ref. It seems the first argument is not correct, so my question is what does the first argument refElemId  mean? How can I get this value? Did I miss any other steps to scan references?

Thanks a lot in advance.

Parents Reply Children