- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, please would someone be able to help me. I have an assembly document, and inside this assembly my code needs to open up other documents, and convert the contents from a multivalue list parameter inside of said docs, to a list in the code.
So I'm using MultiValue.List to do this, the List portion says that you can use a doc name to specify which assembly to read the values from, but for some reason it always reads from the assembly it's being run in. It does however work if you change the doc name to a tree name, but seeing as the doc can be inside an unknown amount of assemblies down in the main doc, I would prefer to use the file name to identify it.
I will paste my code below, is the function potentially broken or an I missing something? Any help would be greatly appreciated! Thanks
Dim asmDoc As AssemblyDocument = ThisApplication.Documents.ItemByName("C:\DOVAULT\1. Projects\0000420420-69 - Sheamus Astroneering LLC\6. Drawings\0000420420-69-2.000-Column CL01.iam") Dim asmOpen As Document = ThisApplication.Documents.Open("C:\DOVAULT\1. Projects\0000420420-69 - Sheamus Astroneering LLC\6. Drawings\0000420420-69-2.000-Column CL01.iam", True) Dim revisionCommentHistoryList As New List(Of String) For Each item In MultiValue.List(asmDoc, "revisionCommentHistory") revisionCommentHistoryList.Add(item) Next MessageBox.Show("Drawings:" & vbCrLf & "" & vbCrLf & String.Join(vbCrLf, revisionCommentHistoryList.ToArray()), "test")
Solved! Go to Solution.