lee3310 Posted December 14, 2022 Share Posted December 14, 2022 Does linked ref works both ways ? e.g: A.SetLinkedRef(B, mKW) B.GetLinkedRef(mKW) == A ? or do i have to duplicate it ? A.SetLinkedRef(B, mKW) B.SetLinkedRef(A, mKW)Thanks Link to comment Share on other sites More sharing options...
hereami Posted December 14, 2022 Share Posted December 14, 2022 Second. In first case B doesn't have LinkedRef(mKW), because why should. Link to comment Share on other sites More sharing options...
lee3310 Posted December 14, 2022 Author Share Posted December 14, 2022 (edited) T Second. In first case B doesn't have LinkedRef(mKW), because why should.Thought so. I was hoping that if A is linked to B also means that B is linked to A (lighten the scrip). Edited December 14, 2022 by lee3310 Link to comment Share on other sites More sharing options...
hereami Posted December 14, 2022 Share Posted December 14, 2022 (edited) Writing a virus? ;) ps. I'm not sure actually, if there isn't such a function to retrieve parent ref(s), maybe somebody else knows better. Edited December 14, 2022 by hereami Link to comment Share on other sites More sharing options...
SKKmods Posted December 14, 2022 Share Posted December 14, 2022 Yes linkedrefs can be queried from the target by GetRefsLinkedToMe which retuns an array for multiple connections on the same keyword. A. SetLinkedRef(B, mKW)A. GetLinkedRef(mKW) == B B. GetRefsLinkedToMe(mKW) == A Link to comment Share on other sites More sharing options...
LarannKiar Posted December 14, 2022 Share Posted December 14, 2022 (edited) Too bad GetRefsLinkedToMe() doesn't work if apLinkKeyword = None. (Not sure why). Edited December 14, 2022 by LarannKiar Link to comment Share on other sites More sharing options...
lee3310 Posted December 14, 2022 Author Share Posted December 14, 2022 (edited) Yes linkedrefs can be queried from the target by GetRefsLinkedToMe which retuns an array for multiple connections on the same keyword. A. SetLinkedRef(B, mKW)A. GetLinkedRef(mKW) == B B. GetRefsLinkedToMe(mKW) == AExcellent, thanks.So if i understand correctly, you can't link one reference to multiple objects using one keyword A. SetLinkedRef(B, mKW)A. SetLinkedRef(C, mKW)A. SetLinkedRef(D, mKW)but you can link them all to one reference and use GetRefsLinkedToMe() or, chain-link them together like this:A. SetLinkedRef(B, mKW)B. SetLinkedRef(C, mKW)C. SetLinkedRef(D, mKW)and use A.GetLinkedRefChain(mKW). Edited December 14, 2022 by lee3310 Link to comment Share on other sites More sharing options...
lee3310 Posted December 14, 2022 Author Share Posted December 14, 2022 Good to know :thumbsup: Too bad GetRefsLinkedToMe() doesn't work if apLinkKeyword = None. (Not sure why). Link to comment Share on other sites More sharing options...
Recommended Posts