Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
IQUADRATAG
253 Views, 0 Replies

Property LibraryName (ReferencedFileDescriptor) in onSaveDocument-Event

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