Linking custom objects to file

Linking custom objects to file

GabrieleZelasco
Enthusiast Enthusiast
347 Views
2 Replies
Message 1 of 3

Linking custom objects to file

GabrieleZelasco
Enthusiast
Enthusiast

Hi all,

is it possible to link one or more custom objects to file through api (C#) ? I didn't find any comprehensive code example. Thank you in advance.

0 Likes
Accepted solutions (1)
348 Views
2 Replies
Replies (2)
Message 2 of 3

jose_oltra
Advocate
Advocate
Accepted solution

Yes, it's possible through the AddLink Method

Autodesk.Connectivity.WebServices Namespace > DocumentService Class : AddLink Method


C#  
public Lnk AddLink(
   System.long parentId,
   System.string toEntityClassId,
   System.long toEntityId,
   System.string meta
)


For example: wsm.DocumentService.AddLink(custEnt.Id, "FILE", file.Id, null);

Inventor
Revit
Vault Professional
Autocad
Message 3 of 3

GabrieleZelasco
Enthusiast
Enthusiast

Thanks @jose_oltra, it works properly!

0 Likes