Message 1 of 6
ReferencedFile From Drawing Document

Not applicable
04-02-2003
10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This one really has me baffled. I am trying to use ReferencedFile from a
drawing view in a drawing document. All is well as long as the referenced
file is a part. However if the drawing is of an assembly any ReferencedFile
properties don't work. In fact it results in a runtime error 2147467259
(80004005). I did some digging on this runtime error and the best that I
can come up with is that it has something to do with the microsoft jet
database engine and how the file is already opened exclusively by another
user or you need permission to view this data.
This makes absolutely no sense to me. I have been trying to debug this for
some time now. I am just trying to control an addin that does the same as
the now deceased Custom Property Copy addin. I am trying to make sure I
have the assignment of ReferencedDocument going to the correct document
type, oPartDoc or oAssyDoc.
If you run this little bit of code you can see that it runs fine with a part
document placed in a drawing but will crash with an assembly document.
Dim Test As Variant
MsgBox "beforetest"
Test = oDwgDoc.ActiveSheet.DrawingViews(1).ReferencedFile.FullFileName
MsgBox Test
Does anyone know what could be happening here? How would I determine what
type of document it is since the ReferencedFile.DocumentType also causes a
crash?
Any assistance would be greatly appreciated!
Thanks!
Bryan Hemphill
Systematix Inc.
Waterloo, Ontario, Canada
drawing view in a drawing document. All is well as long as the referenced
file is a part. However if the drawing is of an assembly any ReferencedFile
properties don't work. In fact it results in a runtime error 2147467259
(80004005). I did some digging on this runtime error and the best that I
can come up with is that it has something to do with the microsoft jet
database engine and how the file is already opened exclusively by another
user or you need permission to view this data.
This makes absolutely no sense to me. I have been trying to debug this for
some time now. I am just trying to control an addin that does the same as
the now deceased Custom Property Copy addin. I am trying to make sure I
have the assignment of ReferencedDocument going to the correct document
type, oPartDoc or oAssyDoc.
If you run this little bit of code you can see that it runs fine with a part
document placed in a drawing but will crash with an assembly document.
Dim Test As Variant
MsgBox "beforetest"
Test = oDwgDoc.ActiveSheet.DrawingViews(1).ReferencedFile.FullFileName
MsgBox Test
Does anyone know what could be happening here? How would I determine what
type of document it is since the ReferencedFile.DocumentType also causes a
crash?
Any assistance would be greatly appreciated!
Thanks!
Bryan Hemphill
Systematix Inc.
Waterloo, Ontario, Canada