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

Property LibraryName (ReferencedFileDescriptor) in onSaveDocument-Event

IQUADRATAG
Contributor

Property LibraryName (ReferencedFileDescriptor) in onSaveDocument-Event

IQUADRATAG
Contributor
Contributor

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

0 Likes
Reply
253 Views
0 Replies
Replies (0)