i wanted to do this years ago. but seems like still not available, if you can't even find it then i doubt it's there.
maybe use some hacking method.
Hi Jeff,
It seems we don’t have any API to know the Data Referenced Object Source drawing.
We can check whether the Entity is a reference object using the following API, but there is none to know the source DWG file of the referenced entity.
Entity.IsReferenceObject Property
-> Gets whether the Entity is a reference object. A reference object is located in another drawing, and linked using a data shortcut or Vault. If the entity is native to the current drawing this property returns false; if it is being referenced via data shortcuts or AutoCAD Vault it returns true.
I have logged a wish list for the same in our internal system.
Could you give me an use case for this "Data Referenced Object Source drawing " ?
How this API will be useful for our developer community ?
Thanks,
Partha Sarkar
There have been a few times over the years I've tried to do something with the source drawing. I'm not recalling now what those previous reasons were. This thread was started when I was asked if I could create a command to force the sync'ing of Pipe/Structure styles of Dref'ed parts with the source drawing. This, I thought, was a great request because I often need to change parts in the source drawing which changes the style, but then I need to manually change the style of those parts in the Dref drawings.
Similar to what Justin mentioned, we have multi-stage projects (that likely did not start out as such) where the shortcuts become a complex web pointing everywhere. Since shortcuts sources can change depending on whether the user is pathed to the correct project, often users will be pointing to the incorrect version of objects without knowing it. Access to the source object references through the API would make quick work of confirming that the shortcuts are pointing to the correct objects, or creating a organization tree for the projects drawings.
Greetings,
Has the status changed? Can we now retrieve the path of the source DWG of a data reference?
If Yes, please provide a link to the forum post or provide details.
Thank You.
Kevin.
NO updates to the API I know of have discussed a possible way of doing it in the AUGI forums here
Justin