Document.ReferencedDocuments is implemented as a stack, why?

Document.ReferencedDocuments is implemented as a stack, why?

CattabianiI
Collaborator Collaborator
548 Views
1 Reply
Message 1 of 2

Document.ReferencedDocuments is implemented as a stack, why?

CattabianiI
Collaborator
Collaborator

Out of curiosity why `Document.ReferencedDocuments` is implemented as a stack?

To try that:

1. open an assembly

2. add these lines in an iLogic rule: 

SyntaxEditor Code Snippet

Dim doc As Document = ThisApplication.ActiveDocument
MsgBox(doc.ReferencedDocuments.Item(1).FullFileName)

3. place one document

4. run the rule

5. repeat from step 3

 

0 Likes
549 Views
1 Reply
Reply (1)
Message 2 of 2

dgreatice
Collaborator
Collaborator

use this:

 

Dim doc As Document = ThisApplication.ActiveDocument
Dim RefDoc As Document
For Each RefDoc In doc.ReferencedDocuments
	MsgBox(RefDoc.FullFileName)
Next

 

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes