Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: Anonymous

In both of those two codes, it looks like you need to replace:

Dim refDoc As Document = ThisApplication.Documents.Open(view.ReferencedFile.FullFileName)

with this:

Dim refDoc As Document = ThisApplication.Documents.Open(view.ReferencedDocumentDescriptor.FullDocumentName)

because the 'view' object (DrawingView) doesn't support ReferencedFile directly.

Plus, the 'Open' function actually prefers the FullDocumentName vs the FullFileName (though usually not necessary unless dealing with documents within an assembly).

Here are the links for those objects.

DrawingView Object

DrawingView.ReferencedDocumentDescriptor Property

DocumentDescriptor Object 

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)