Does anyone have any small snippets of code they can post as an example of how to use GetLinks or GetLinksBySQLCond? This seems to be a problem with many others too. I referred to the CAOText.dvb example from SDK but I can not get it to work when I write it in C#. Here is what I have and I can not get it to work. I am attempting to get the links from a user selected AutoCAD object, after the user selects the linktemplate from a list box. The problem is at the GetLinks method (last line of code). I have tried passing in different types of objIDs such as array of longs, array of ObjectIDs and still no luck. Ahy help would be appreciated, thanks.
CAO.DbConnect dbConnect = new CAO.DbConnect(); Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
//linktemplate object retrieved from user selected menu CAO.LinkTemplate objLinkTemplate = dbConnect.GetLinkTemplates(doc.AcadDocument).Item(this.lbLinkList.SelectedItem.ToString());