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

Open each document for view and close inside assembly.

Hello,

 

I am trying to make an external rule that will run only in an assembly document and will open each of the documents inside of it (.iam and .ipt ) view them for 3 sec then save and close, after move to next one.

i am trying to use a code like this one but i don't get it to run.

Dim referencedDocs As DocumentsEnumerator = asmDoc.AllReferencedDocuments
    For Each doc As Document In referencedDocs
        If doc.DocumentType = kPartDocumentObject Or doc.DocumentType = kAssemblyDocumentObject Then
            OpenAndViewDocument(doc)
            Thread.Sleep(5000) ' View each document for 5 seconds
            CloseDocument(doc)