
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having difficulties with accessing the Mass Properties of a part with this code.
Dim oDoc As Document = ThisApplication.ActiveDocument
Dim oMassProps As MassProperties
oMassProps = oDoc.ComponentDefinition.MassProperties
Which produces this error:
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
Changing the first line to this resolves the issue:
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
However the code is part of a large loop which goes through all referenced documents of an assembly, so I can't use PartDocument as there are other document types also.
The strange thing is I have numerous part documents which don't produce the error. Its only this one, which I have attached for reference.
Solved! Go to Solution.