You can attached documents by scripting the
Worksession command using
Hi Dale, I have the same issue. I’m trying to find the attached document paths from an existing Worksession.
The script is not working for the following scenario,
1.Open new template
2. Attach another 3dm file
3. Save the active model and worksession
4. Then run script
Sub GetAttachedDocPath() Dim fileName fileName = Rhino.WorkSessionFileName If IsNull(fileName) Then Rhino.Print "WorkSession Not Saved" Exit Sub End If Rhino.Print fileName Dim arrModelPaths, strPath arrModelPaths = Rhino.WorkSessionModelNames If IsNull(arrModelPaths) Then Rhino.Print "No Attchment" Exit Sub End If For Each strPath In arrModelPaths Rhino.Print strPath Next End Sub
Following your instructions, the script works as expected. What am I missing?
After step 4,
It always returns "WorkSession Not Saved"
Note: Once close the model and open again it works.
Sorry, I can still not repeat what you are report. I am using Rhino 6, by the way. Have you tested with this version? Otherwise, I’ll need some files and perhaps a video.
That said, even if this doesn’t work correctly in Rhino 5, it won’t be fixed…