Message 1 of 1
Property LibraryName (ReferencedFileDescriptor) in onSaveDocument-Event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I try to figure out, wether a component is member of an external library or not (e.g. Cadenas). As far as I know I have to use the property "LibraryName" wich is part of the ReferencedFileDescriptor. But how can I get fom a "Document"-Object to the ReferencedFileDescriptor?
Private Sub oAppEvents_OnSaveDocument(ByVal DocumentObject As Document, ByVal BeforeOrAfter As EventTimingEnum, ByVal Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) _ Handles m_oAppEvents.OnSaveDocument
' Ignore Content-Center
If DocumentObject.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
Dim part As Inventor.PartDocument = DocumentObject
If part.ComponentDefinition.IsContentMember Then
HandlingCode = HandlingCodeEnum.kEventNotHandled
Exit Sub
End If
End If
' Ignore library-components.
?
Thank you in advance.
Greetings
Christian