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

Can't find path of referenced file

I can't find the right text to get the File path of a referenced document within an IAM.

I have the code below. This gets me the full path (including filename) for each child of the parent IAM (from which the rule was run). I'm just using a message box as a simple diagnostic tool, to show what I'm getting.

Instead of "FullFileName", how do I get the Path WITHOUT the filename and extension?

Yes, ThisDoc.Path works when I'm within the "root level", but refDoc.Path is not working in this case.

I feel I'm missing something obvious.

 

Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oDoc As Document = ThisDoc.Document
For Each refDoc As Document In oDoc.AllReferencedDocuments
    MessageBox.Show(refDoc.FullFileName, "file path")

 

Inventor Professional 2021
Vault Professional 2021